mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 04:04:15 +01:00
Fix Future Sight
This commit is contained in:
parent
945575f5d6
commit
d46c3ebe5b
@ -5121,7 +5121,10 @@ BattleScript_MonTookFutureAttack::
|
|||||||
BattleScript_CheckDoomDesireMiss::
|
BattleScript_CheckDoomDesireMiss::
|
||||||
accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE
|
accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE
|
||||||
BattleScript_FutureAttackAnimate::
|
BattleScript_FutureAttackAnimate::
|
||||||
|
critcalc
|
||||||
|
damagecalc
|
||||||
adjustdamage
|
adjustdamage
|
||||||
|
jumpifmovehadnoeffect BattleScript_DoFutureAttackResult
|
||||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_FutureHitAnimDoomDesire
|
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_FutureHitAnimDoomDesire
|
||||||
playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL
|
playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL
|
||||||
goto BattleScript_DoFutureAttackHit
|
goto BattleScript_DoFutureAttackHit
|
||||||
@ -5133,6 +5136,9 @@ BattleScript_DoFutureAttackHit::
|
|||||||
waitstate
|
waitstate
|
||||||
healthbarupdate BS_TARGET
|
healthbarupdate BS_TARGET
|
||||||
datahpupdate BS_TARGET
|
datahpupdate BS_TARGET
|
||||||
|
critmessage
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_DoFutureAttackResult:
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET, FALSE, NULL
|
||||||
@ -5144,11 +5150,9 @@ BattleScript_FutureAttackEnd::
|
|||||||
moveend 0x2, 0xE
|
moveend 0x2, 0xE
|
||||||
sethword gMoveResultFlags, 0
|
sethword gMoveResultFlags, 0
|
||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_FutureAttackMiss::
|
BattleScript_FutureAttackMiss::
|
||||||
pause 0x20
|
pause 0x20
|
||||||
sethword gMoveResultFlags, 0
|
sethword gMoveResultFlags, MOVE_RESULT_FAILED
|
||||||
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
|
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
sethword gMoveResultFlags, 0
|
sethword gMoveResultFlags, 0
|
||||||
|
@ -273,7 +273,6 @@ struct WishFutureKnock
|
|||||||
{
|
{
|
||||||
u8 futureSightCounter[MAX_BATTLERS_COUNT];
|
u8 futureSightCounter[MAX_BATTLERS_COUNT];
|
||||||
u8 futureSightAttacker[MAX_BATTLERS_COUNT];
|
u8 futureSightAttacker[MAX_BATTLERS_COUNT];
|
||||||
s32 futureSightDmg[MAX_BATTLERS_COUNT];
|
|
||||||
u16 futureSightMove[MAX_BATTLERS_COUNT];
|
u16 futureSightMove[MAX_BATTLERS_COUNT];
|
||||||
u8 wishCounter[MAX_BATTLERS_COUNT];
|
u8 wishCounter[MAX_BATTLERS_COUNT];
|
||||||
u8 wishMonId[MAX_BATTLERS_COUNT];
|
u8 wishMonId[MAX_BATTLERS_COUNT];
|
||||||
|
@ -1800,8 +1800,9 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
|
|||||||
|
|
||||||
gBattlerTarget = gActiveBattler;
|
gBattlerTarget = gActiveBattler;
|
||||||
gBattlerAttacker = gWishFutureKnock.futureSightAttacker[gActiveBattler];
|
gBattlerAttacker = gWishFutureKnock.futureSightAttacker[gActiveBattler];
|
||||||
gBattleMoveDamage = gWishFutureKnock.futureSightDmg[gActiveBattler];
|
|
||||||
gSpecialStatuses[gBattlerTarget].dmg = 0xFFFF;
|
gSpecialStatuses[gBattlerTarget].dmg = 0xFFFF;
|
||||||
|
gCurrentMove = gWishFutureKnock.futureSightMove[gActiveBattler];
|
||||||
|
SetTypeBeforeUsingMove(gCurrentMove, gActiveBattler);
|
||||||
BattleScriptExecute(BattleScript_MonTookFutureAttack);
|
BattleScriptExecute(BattleScript_MonTookFutureAttack);
|
||||||
|
|
||||||
if (gWishFutureKnock.futureSightCounter[gActiveBattler] == 0
|
if (gWishFutureKnock.futureSightCounter[gActiveBattler] == 0
|
||||||
@ -1812,12 +1813,8 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Why do I have to keep doing this to match?
|
gBattleStruct->wishPerishSongState = 1;
|
||||||
{
|
gBattleStruct->wishPerishSongBattlerId = 0;
|
||||||
u8 *state = &gBattleStruct->wishPerishSongState;
|
|
||||||
*state = 1;
|
|
||||||
gBattleStruct->wishPerishSongBattlerId = 0;
|
|
||||||
}
|
|
||||||
// fall through
|
// fall through
|
||||||
case 1:
|
case 1:
|
||||||
while (gBattleStruct->wishPerishSongBattlerId < gBattlersCount)
|
while (gBattleStruct->wishPerishSongBattlerId < gBattlersCount)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user