Fixes OOB for Teatime and Flower Shield (#7214)
This commit is contained in:
parent
8d81f60313
commit
773ecd4c24
@ -1503,11 +1503,12 @@ BattleScript_EffectFlowerShield::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
savetarget
|
||||
selectfirstvalidtarget
|
||||
BattleScript_FlowerShieldIsAnyGrass:
|
||||
jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_FlowerShieldLoopStart
|
||||
jumpifnexttargetvalid BattleScript_FlowerShieldIsAnyGrass
|
||||
goto BattleScript_ButItFailed
|
||||
goto BattleScript_RestoreTargetButItFailed
|
||||
BattleScript_FlowerShieldLoopStart:
|
||||
selectfirstvalidtarget
|
||||
BattleScript_FlowerShieldLoop:
|
||||
@ -1532,6 +1533,7 @@ BattleScript_FlowerShieldString:
|
||||
BattleScript_FlowerShieldMoveTargetEnd:
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_FlowerShieldLoop
|
||||
restoretarget
|
||||
end
|
||||
|
||||
BattleScript_EffectRototiller::
|
||||
@ -4513,6 +4515,9 @@ BattleScript_ButItFailed::
|
||||
BattleScript_RestoreAttackerButItFailed:
|
||||
restoreattacker
|
||||
goto BattleScript_ButItFailed
|
||||
BattleScript_RestoreTargetButItFailed:
|
||||
restoretarget
|
||||
goto BattleScript_ButItFailed
|
||||
|
||||
BattleScript_NotAffected::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
|
||||
@ -11751,9 +11751,14 @@ static void Cmd_jumpifnexttargetvalid(void)
|
||||
}
|
||||
|
||||
if (gBattlerTarget >= gBattlersCount)
|
||||
{
|
||||
gBattlerTarget = gBattlersCount - 1;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlescriptCurrInstr = jumpInstr;
|
||||
}
|
||||
}
|
||||
|
||||
static void Cmd_tryhealhalfhealth(void)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user