Merge pull request #1919 from ghoulslash/be/unseenfist

Fix unseen fist check
This commit is contained in:
Eduardo Quezada D'Ottone 2021-11-19 18:48:58 -03:00 committed by GitHub
commit 377c313771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))