Fix Future Sight

This commit is contained in:
DizzyEggg 2018-12-02 18:47:39 +01:00
parent 945575f5d6
commit d46c3ebe5b
3 changed files with 11 additions and 11 deletions

View File

@ -5121,7 +5121,10 @@ BattleScript_MonTookFutureAttack::
BattleScript_CheckDoomDesireMiss::
accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE
BattleScript_FutureAttackAnimate::
critcalc
damagecalc
adjustdamage
jumpifmovehadnoeffect BattleScript_DoFutureAttackResult
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_FutureHitAnimDoomDesire
playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL
goto BattleScript_DoFutureAttackHit
@ -5133,6 +5136,9 @@ BattleScript_DoFutureAttackHit::
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
BattleScript_DoFutureAttackResult:
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
@ -5144,11 +5150,9 @@ BattleScript_FutureAttackEnd::
moveend 0x2, 0xE
sethword gMoveResultFlags, 0
end2
BattleScript_FutureAttackMiss::
pause 0x20
sethword gMoveResultFlags, 0
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
sethword gMoveResultFlags, MOVE_RESULT_FAILED
resultmessage
waitmessage 0x40
sethword gMoveResultFlags, 0

View File

@ -273,7 +273,6 @@ struct WishFutureKnock
{
u8 futureSightCounter[MAX_BATTLERS_COUNT];
u8 futureSightAttacker[MAX_BATTLERS_COUNT];
s32 futureSightDmg[MAX_BATTLERS_COUNT];
u16 futureSightMove[MAX_BATTLERS_COUNT];
u8 wishCounter[MAX_BATTLERS_COUNT];
u8 wishMonId[MAX_BATTLERS_COUNT];

View File

@ -1800,8 +1800,9 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
gBattlerTarget = gActiveBattler;
gBattlerAttacker = gWishFutureKnock.futureSightAttacker[gActiveBattler];
gBattleMoveDamage = gWishFutureKnock.futureSightDmg[gActiveBattler];
gSpecialStatuses[gBattlerTarget].dmg = 0xFFFF;
gCurrentMove = gWishFutureKnock.futureSightMove[gActiveBattler];
SetTypeBeforeUsingMove(gCurrentMove, gActiveBattler);
BattleScriptExecute(BattleScript_MonTookFutureAttack);
if (gWishFutureKnock.futureSightCounter[gActiveBattler] == 0
@ -1812,12 +1813,8 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
return TRUE;
}
}
// Why do I have to keep doing this to match?
{
u8 *state = &gBattleStruct->wishPerishSongState;
*state = 1;
gBattleStruct->wishPerishSongBattlerId = 0;
}
gBattleStruct->wishPerishSongState = 1;
gBattleStruct->wishPerishSongBattlerId = 0;
// fall through
case 1:
while (gBattleStruct->wishPerishSongBattlerId < gBattlersCount)