From db15190508be2a61c02e0c031e45a21e7a33c976 Mon Sep 17 00:00:00 2001 From: sneed <56992013+Sneed69@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:58:37 +0300 Subject: [PATCH] Use GetBattlerAbility instead of the ability field in more places (#4746) * Fix Skill Link ignoring gastro acid, neutralising gas * Fix own tempo stopping berserk gene confusion when disabled --- src/battle_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index f785b5d142..ccb669e2a4 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3580,7 +3580,7 @@ u8 AtkCanceller_UnableToUseMove(u32 moveType) case CANCELLER_MULTIHIT_MOVES: if (gMovesInfo[gCurrentMove].effect == EFFECT_MULTI_HIT) { - u16 ability = gBattleMons[gBattlerAttacker].ability; + u32 ability = GetBattlerAbility(gBattlerAttacker); if (ability == ABILITY_SKILL_LINK) { @@ -11170,7 +11170,7 @@ void RemoveConfusionStatus(u32 battler) static bool32 CanBeInfinitelyConfused(u32 battler) { - if (gBattleMons[battler].ability == ABILITY_OWN_TEMPO + if (GetBattlerAbility(battler) == ABILITY_OWN_TEMPO || IsBattlerTerrainAffected(battler, STATUS_FIELD_MISTY_TERRAIN) || gSideStatuses[GetBattlerSide(battler)] & SIDE_STATUS_SAFEGUARD) {