From 9733f92c7f9a52761e716fc723bbf2d27ae59e85 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Wed, 5 Jan 2022 18:48:01 +0100 Subject: [PATCH] Yawn now uses B_SLEEP_TURNS, resolves #1873 --- src/battle_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index fd32cefaa2..36e8b0a126 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2892,7 +2892,7 @@ u8 DoBattlerEndTurnEffects(void) } else { - gBattleMons[gActiveBattler].status1 |= (Random() & 3) + 2; + gBattleMons[gEffectBattler].status1 |= (B_SLEEP_TURNS >= GEN_5) ? ((Random() % 3) + 2) : ((Random() % 4) + 3); BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); BattleScriptExecute(BattleScript_YawnMakesAsleep);