YawnMakesDrowsy

This commit is contained in:
kittenchilly 2025-01-03 12:07:40 -06:00
parent 2b2631a3f8
commit 2d20f1cf69
3 changed files with 17 additions and 2 deletions

View file

@ -7492,9 +7492,20 @@ BattleScript_YawnMakesAsleep::
jumpifstatus3 BS_EFFECT_BATTLER, STATUS3_SKY_DROPPED, BattleScript_YawnEnd
makevisible BS_EFFECT_BATTLER
skydropyawn
BattleScript_YawnEnd:
BattleScript_YawnEnd::
end2
BattleScript_YawnMakesDrowsy::
statusanimation BS_EFFECT_BATTLER
printstring STRINGID_PKMNGREWDROWSY
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_EFFECT_BATTLER
waitstate
jumpifstatus3 BS_EFFECT_BATTLER, STATUS3_SKY_DROPPED, BattleScript_YawnEnd
makevisible BS_EFFECT_BATTLER
skydropyawn
goto BattleScript_YawnEnd
BattleScript_EmbargoEndTurn::
printstring STRINGID_EMBARGOENDS
waitmessage B_WAIT_TIME_LONG

View file

@ -155,6 +155,7 @@ extern const u8 BattleScript_TargetPoisonHealed[];
extern const u8 BattleScript_MoveEffectDrowsy[];
extern const u8 BattleScript_MoveEffectSleep[];
extern const u8 BattleScript_YawnMakesAsleep[];
extern const u8 BattleScript_YawnMakesDrowsy[];
extern const u8 BattleScript_MoveEffectPoison[];
extern const u8 BattleScript_MoveEffectBurn[];
extern const u8 BattleScript_MoveEffectFrostbite[];

View file

@ -2716,7 +2716,10 @@ u8 DoBattlerEndTurnEffects(void)
TryActivateSleepClause(battler, gBattlerPartyIndexes[battler]);
BtlController_EmitSetMonData(battler, BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[battler].status1);
MarkBattlerForControllerExec(battler);
BattleScriptExecute(BattleScript_YawnMakesAsleep);
if (B_USE_DROWSY)
BattleScriptExecute(BattleScript_YawnMakesDrowsy);
else
BattleScriptExecute(BattleScript_YawnMakesAsleep);
}
effect++;
}