From a96591dd4389596703a4560a7ca2167d667cf93b Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sat, 28 Jun 2025 10:14:55 +0200 Subject: [PATCH] Fixes Scald defrosting target while asleep (#7233) --- src/battle_script_commands.c | 1 + test/battle/defrost.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cdcb02d28f..8787760e74 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6956,6 +6956,7 @@ static void Cmd_moveend(void) effect = TRUE; } if (gBattleMons[gBattlerTarget].status1 & STATUS1_FROSTBITE + && IsBattlerTurnDamaged(gBattlerTarget) && IsBattlerAlive(gBattlerTarget) && gBattlerAttacker != gBattlerTarget && MoveThawsUser(originallyUsedMove) diff --git a/test/battle/defrost.c b/test/battle/defrost.c index 3d456d6673..a226a49f1e 100644 --- a/test/battle/defrost.c +++ b/test/battle/defrost.c @@ -16,3 +16,17 @@ DOUBLE_BATTLE_TEST("Defrost: A fire type spread move will thaw both targets") STATUS_ICON(opponentRight, freeze: FALSE); } } + +SINGLE_BATTLE_TEST("Defrost: Scald does not thaw targets if user is asleep") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FROSTBITE); } + OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP_TURN(3)); } + } WHEN { + TURN { MOVE(opponent, MOVE_SCALD); MOVE(player, MOVE_CELEBRATE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALD, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player); + HP_BAR(player); + } +}