1
0
mirror of https://github.com/Ninjdai1/pokeemerald.git synced 2025-03-25 23:18:22 +01:00

fix natural cure, shed skin, early bird check in ShouldSwitchIfGameStatePrompt

This commit is contained in:
ghoulslash 2022-09-18 22:47:30 -04:00
parent f3ac3e4dc3
commit add3625589

@ -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))