Clean up Unseen Fist Check (#5420)
* Clean up Unseedn Fist Check * fix compiling
This commit is contained in:
parent
60e2c0f859
commit
b924461ae3
1 changed files with 3 additions and 7 deletions
|
@ -8541,13 +8541,9 @@ bool32 IsBattlerProtected(u32 battlerAtk, u32 battlerDef, u32 move)
|
|||
if (gProtectStructs[battlerDef].maxGuarded && IsMoveBlockedByMaxGuard(move))
|
||||
return TRUE;
|
||||
|
||||
// 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
|
||||
&& (gMovesInfo[move].makesContact
|
||||
|| (gMovesInfo[move].effect == EFFECT_SHELL_SIDE_ARM
|
||||
&& gBattleStruct->shellSideArmCategory[battlerAtk][battlerDef] == DAMAGE_CATEGORY_PHYSICAL))
|
||||
&& !gProtectStructs[battlerDef].maxGuarded) // Max Guard cannot be bypassed by Unseen Fist
|
||||
if (!gProtectStructs[battlerDef].maxGuarded // Max Guard cannot be bypassed by Unseen Fist
|
||||
&& IsMoveMakingContact(move, gBattlerAttacker)
|
||||
&& GetBattlerAbility(gBattlerAttacker) == ABILITY_UNSEEN_FIST)
|
||||
return FALSE;
|
||||
else if (gSideStatuses[GetBattlerSide(battlerDef)] & SIDE_STATUS_CRAFTY_SHIELD
|
||||
&& IS_MOVE_STATUS(move))
|
||||
|
|
Loading…
Reference in a new issue