Skip to content

Commit

Permalink
Merge pull request #1919 from ghoulslash/be/unseenfist
Browse files Browse the repository at this point in the history
Fix unseen fist check
  • Loading branch information
AsparagusEduardo authored Nov 19, 2021
2 parents 1696e60 + fb468b6 commit 377c313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -7520,7 +7520,7 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move)

// Protective Pads doesn't stop Unseen Fist from bypassing Protect effects, so IsMoveMakingContact() isn't used here.
// This means extra logic is needed to handle Shell Side Arm.
if (GetBattlerAbility(gBattlerAttacker == ABILITY_UNSEEN_FIST)
if (GetBattlerAbility(gBattlerAttacker) == ABILITY_UNSEEN_FIST
&& (gBattleMoves[move].flags & FLAG_MAKES_CONTACT || (gBattleMoves[move].effect == EFFECT_SHELL_SIDE_ARM && gSwapDamageCategory)))
return FALSE;
else if (!(gBattleMoves[move].flags & FLAG_PROTECT_AFFECTED))
Expand Down

0 comments on commit 377c313

Please sign in to comment.