Fix Spiky Shield/Jump Kick bug

Spiky Shield no longer tries to hurt a Pokemon that has already fainted. Previously this would freeze the game if Jump Kick recoil fainted a Pokemon due to the target using Spiky Shield.
This commit is contained in:
BuffelSaft 2021-02-19 13:57:29 +13:00
parent 7a237595c9
commit 2b90c0b945

View file

@ -7293,6 +7293,7 @@ BattleScript_RockyHelmetActivatesDmg:
return
BattleScript_SpikyShieldEffect::
jumpifabsent BS_ATTACKER, BattleScript_SpikyShieldRet
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
healthbarupdate BS_ATTACKER
@ -7300,6 +7301,7 @@ BattleScript_SpikyShieldEffect::
printstring STRINGID_PKMNHURTSWITH
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
BattleScript_SpikyShieldRet::
return
BattleScript_KingsShieldEffect::