From 8f6f744e7f0d5bd95d5e6b72a6a24e8879da9694 Mon Sep 17 00:00:00 2001 From: Zimmermann Gyula Date: Sat, 30 Mar 2024 11:46:15 +0100 Subject: [PATCH] Check for the correct battler's No Guard. (#4320) --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f3d739e782..bbee19244e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1546,7 +1546,7 @@ static bool32 AccuracyCalcHelper(u16 move) return TRUE; } // If the attacker has the ability No Guard and they aren't targeting a Pokemon involved in a Sky Drop with the move Sky Drop, move hits. - else if (GetBattlerAbility(gBattlerTarget) == ABILITY_NO_GUARD && (move != MOVE_SKY_DROP || gBattleStruct->skyDropTargets[gBattlerTarget] == 0xFF)) + else if (GetBattlerAbility(gBattlerAttacker) == ABILITY_NO_GUARD && (move != MOVE_SKY_DROP || gBattleStruct->skyDropTargets[gBattlerTarget] == 0xFF)) { if (!JumpIfMoveFailed(7, move)) RecordAbilityBattle(gBattlerAttacker, ABILITY_NO_GUARD);