Fixes Scald defrosting target while asleep (#7233)

This commit is contained in:
Alex 2025-06-28 10:14:55 +02:00 committed by GitHub
parent 3dda407bb0
commit a96591dd43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

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

View File

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