Merge pull request #2024 from TheXaman/rhh_BE_B_SLEEP_TURNS

Yawn now uses B_SLEEP_TURNS
This commit is contained in:
Eduardo Quezada D'Ottone 2022-01-07 21:56:06 -03:00 committed by GitHub
commit eba4c36189
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2962,7 +2962,7 @@ u8 DoBattlerEndTurnEffects(void)
}
else
{
gBattleMons[gActiveBattler].status1 |= (Random() & 3) + 2;
gBattleMons[gActiveBattler].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);