mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Merge pull request #2042 from AsparagusEduardo/BE_unnerveChecks
Removed redundant checks for Unnerve
This commit is contained in:
commit
3e1ddf6b93
@ -4527,9 +4527,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
||||
// Quick Claw and Custap Berry
|
||||
if (!gProtectStructs[battler1].quickDraw
|
||||
&& ((holdEffectBattler1 == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * GetBattlerHoldEffectParam(battler1)) / 100)
|
||||
|| (!IsAbilityOnOpposingSide(battler1, ABILITY_UNNERVE)
|
||||
&& holdEffectBattler1 == HOLD_EFFECT_CUSTAP_BERRY
|
||||
&& HasEnoughHpToEatBerry(battler1, 4, gBattleMons[battler1].item))))
|
||||
|| (holdEffectBattler1 == HOLD_EFFECT_CUSTAP_BERRY && HasEnoughHpToEatBerry(battler1, 4, gBattleMons[battler1].item))))
|
||||
gProtectStructs[battler1].usedCustapBerry = TRUE;
|
||||
|
||||
// Battler 2
|
||||
@ -4541,9 +4539,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
||||
// Quick Claw and Custap Berry
|
||||
if (!gProtectStructs[battler2].quickDraw
|
||||
&& ((holdEffectBattler2 == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * GetBattlerHoldEffectParam(battler2)) / 100)
|
||||
|| (!IsAbilityOnOpposingSide(battler2, ABILITY_UNNERVE)
|
||||
&& holdEffectBattler2 == HOLD_EFFECT_CUSTAP_BERRY
|
||||
&& HasEnoughHpToEatBerry(battler2, 4, gBattleMons[battler2].item))))
|
||||
|| (holdEffectBattler2 == HOLD_EFFECT_CUSTAP_BERRY && HasEnoughHpToEatBerry(battler2, 4, gBattleMons[battler2].item))))
|
||||
gProtectStructs[battler2].usedCustapBerry = TRUE;
|
||||
|
||||
if (!ignoreChosenMoves)
|
||||
|
@ -959,12 +959,8 @@ bool32 IsPinchBerryItemEffect(u16 holdEffect)
|
||||
case HOLD_EFFECT_SP_DEFENSE_UP:
|
||||
case HOLD_EFFECT_CRITICAL_UP:
|
||||
case HOLD_EFFECT_RANDOM_STAT_UP:
|
||||
#ifdef HOLD_EFFECT_CUSTAP_BERRY
|
||||
case HOLD_EFFECT_CUSTAP_BERRY:
|
||||
#endif
|
||||
#ifdef HOLD_EFFECT_MICLE_BERRY
|
||||
case HOLD_EFFECT_MICLE_BERRY:
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user