Update src/battle_z_move.c

Co-authored-by: ExpoSeed <43502820+ExpoSeed@users.noreply.github.com>
This commit is contained in:
ghoulslash 2021-03-01 16:38:54 -07:00 committed by GitHub
parent fa32603e73
commit 26ada22762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -700,9 +700,9 @@ bool32 ShouldAIUseZMove(u8 battlerAtk, u8 battlerDef, u16 chosenMove)
if (IsViableZMove(battlerAtk, chosenMove))
{
#ifdef POKEMON_EXPANSION
if (defAbility == ABILITY_DISGUISE && defSpecies == SPECIES_MIMIKYU)
if (gBattleMons[battlerDef].ability == ABILITY_DISGUISE && gBattleMons[battlerDef].species == SPECIES_MIMIKYU)
return 0; // Don't waste a Z-Move busting Mimikyu's disguise
if (defAbility == ABILITY_ICEFACE && defSpecies == SPECIES_EISCUE && IS_MOVE_PHYSICAL(chosenMove))
if (gBattleMons[battlerDef].ability == ABILITY_ICE_FACE && gBattleMons[battlerDef].species == SPECIES_EISCUE && IS_MOVE_PHYSICAL(chosenMove))
return 0; // Don't waste a Z-Move busting Eiscue's Ice Face
#endif