From 26ada227626c25afc6a0c3d6d546a6a861eb1e2a Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Mon, 1 Mar 2021 16:38:54 -0700 Subject: [PATCH] Update src/battle_z_move.c Co-authored-by: ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> --- src/battle_z_move.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_z_move.c b/src/battle_z_move.c index d2beb3a49e..868c709487 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -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