mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-28 21:30:45 +01:00
Added AI checks.
This commit is contained in:
parent
0f3fdd410a
commit
212ecb98ce
@ -2467,13 +2467,13 @@ bool32 ShouldPivot(u8 battlerAtk, u8 battlerDef, u16 defAbility, u16 move, u8 mo
|
|||||||
|
|
||||||
if (!IS_MOVE_STATUS(move) && (shouldSwitch
|
if (!IS_MOVE_STATUS(move) && (shouldSwitch
|
||||||
|| (AtMaxHp(battlerDef) && (AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_FOCUS_SASH
|
|| (AtMaxHp(battlerDef) && (AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_FOCUS_SASH
|
||||||
|| defAbility == ABILITY_STURDY || defAbility == ABILITY_MULTISCALE || defAbility == ABILITY_SHADOW_SHIELD))))
|
|| (defAbility == ABILITY_STURDY && B_STURDY >= GEN_5) || defAbility == ABILITY_MULTISCALE || defAbility == ABILITY_SHADOW_SHIELD))))
|
||||||
return PIVOT; // pivot to break sash/sturdy/multiscale
|
return PIVOT; // pivot to break sash/sturdy/multiscale
|
||||||
}
|
}
|
||||||
else if (!hasStatBoost)
|
else if (!hasStatBoost)
|
||||||
{
|
{
|
||||||
if (!IS_MOVE_STATUS(move) && (AtMaxHp(battlerDef) && (AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_FOCUS_SASH
|
if (!IS_MOVE_STATUS(move) && (AtMaxHp(battlerDef) && (AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_FOCUS_SASH
|
||||||
|| defAbility == ABILITY_STURDY || defAbility == ABILITY_MULTISCALE || defAbility == ABILITY_SHADOW_SHIELD)))
|
|| (defAbility == ABILITY_STURDY && B_STURDY >= GEN_5) || defAbility == ABILITY_MULTISCALE || defAbility == ABILITY_SHADOW_SHIELD)))
|
||||||
return PIVOT; // pivot to break sash/sturdy/multiscale
|
return PIVOT; // pivot to break sash/sturdy/multiscale
|
||||||
|
|
||||||
if (shouldSwitch)
|
if (shouldSwitch)
|
||||||
|
Loading…
Reference in New Issue
Block a user