mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 04:04:15 +01:00
Implement Unseen Fist
Unseen Fist allows contact moves to bypass protect effects, but doesn't lift the effect.
This commit is contained in:
parent
bef896c65a
commit
c4f27174c3
@ -7517,8 +7517,13 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move)
|
|||||||
else if (gProtectStructs[battlerId].protected)
|
else if (gProtectStructs[battlerId].protected)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gBattleMoves[move].flags & FLAG_PROTECT_AFFECTED))
|
// 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)
|
||||||
|
&& (gBattleMoves[move].flags & FLAG_MAKES_CONTACT || (gBattleMoves[move].effect == EFFECT_SHELL_SIDE_ARM && gSwapDamageCategory)))
|
||||||
|
return FALSE;
|
||||||
|
else if (!(gBattleMoves[move].flags & FLAG_PROTECT_AFFECTED))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else if (gBattleMoves[move].effect == MOVE_EFFECT_FEINT)
|
else if (gBattleMoves[move].effect == MOVE_EFFECT_FEINT)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user