Fixes Gulp Missile freezing the game if when attacker fainted
This commit is contained in:
parent
4528bbe01d
commit
2d1b2f28c4
@ -17993,6 +17993,7 @@ void BS_TryActivateGulpMissile(void)
|
||||
|
||||
if (!(gBattleStruct->moveResultFlags[gBattlerTarget] & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& IsBattlerTurnDamaged(gBattlerTarget)
|
||||
&& gBattleMons[gBattlerTarget].species != SPECIES_CRAMORANT
|
||||
&& GetBattlerAbility(gBattlerTarget) == ABILITY_GULP_MISSILE)
|
||||
|
||||
@ -6092,6 +6092,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& IsBattlerTurnDamaged(gBattlerTarget)
|
||||
&& IsBattlerAlive(battler)
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& gBattleMons[gBattlerTarget].species != SPECIES_CRAMORANT)
|
||||
{
|
||||
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD)
|
||||
|
||||
@ -190,3 +190,13 @@ SINGLE_BATTLE_TEST("(Gulp Missile) Transformed Cramorant Gulping lowers defense
|
||||
HP_BAR(opponent);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Gulp Missile triggered by explosion doesn't freeze the game")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_CRAMORANT);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_SURF); MOVE(player, MOVE_EXPLOSION); }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user