Skip to content

Commit

Permalink
Merge pull request #2336 from ghoulslash/be/aiswitch
Browse files Browse the repository at this point in the history
fix natural cure, shed skin, early bird check in ShouldSwitchIfGameSt…
  • Loading branch information
AsparagusEduardo authored Sep 19, 2022
2 parents f3ac3e4 + add3625 commit 6e0481e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/battle_ai_switch_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ static bool8 ShouldSwitchIfGameStatePrompt(void)
switchMon = FALSE;

//Checks to see if active Pokemon can do something against sleep
if (monAbility == (ABILITY_NATURAL_CURE | ABILITY_SHED_SKIN | ABILITY_EARLY_BIRD)
if ((monAbility == ABILITY_NATURAL_CURE
|| monAbility == ABILITY_SHED_SKIN
|| monAbility == ABILITY_EARLY_BIRD)
|| holdEffect == (HOLD_EFFECT_CURE_SLP | HOLD_EFFECT_CURE_STATUS)
|| HasMove(gActiveBattler, MOVE_SLEEP_TALK)
|| (HasMoveEffect(gActiveBattler, MOVE_SNORE) && AI_GetTypeEffectiveness(MOVE_SNORE, gActiveBattler, opposingBattler) >= UQ_4_12(1.0))
Expand Down

0 comments on commit 6e0481e

Please sign in to comment.