Skip to content

Commit

Permalink
Check for the correct battler's No Guard. (#4320)
Browse files Browse the repository at this point in the history
  • Loading branch information
GraionDilach authored Mar 30, 2024
1 parent 0acd058 commit 8f6f744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f6f744

Please sign in to comment.