From 188905225a7fbd9df172e0b7a14dad3d1b81c020 Mon Sep 17 00:00:00 2001 From: Zimmermann Gyula Date: Sat, 30 Mar 2024 10:35:49 +0100 Subject: [PATCH] Check for the correct battler's No Guard. --- 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 f3d739e7820b..bbee19244eb0 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);