From add3625589e2d9c6ae044fbf4965902420f66213 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Sun, 18 Sep 2022 22:47:30 -0400 Subject: [PATCH] fix natural cure, shed skin, early bird check in ShouldSwitchIfGameStatePrompt --- src/battle_ai_switch_items.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 6f5de84c40..5876e8b474 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -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))