From 9f1b9008095e6900fe8e9a947a94074ee4bab860 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sun, 17 Nov 2024 20:36:55 +0100 Subject: [PATCH] Fixes Ice Face regression (#5678) --- src/battle_script_commands.c | 1 - test/battle/ability/ice_face.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 11bf05fb0f..c373778b68 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7372,7 +7372,6 @@ static bool32 DoSwitchInEffectsForBattler(u32 battler) break; case ABILITY_FORECAST: case ABILITY_FLOWER_GIFT: - case ABILITY_ICE_FACE: case ABILITY_PROTOSYNTHESIS: if (AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, i, 0, 0, 0)) return TRUE; diff --git a/test/battle/ability/ice_face.c b/test/battle/ability/ice_face.c index 54a307754c..22b67a7a53 100644 --- a/test/battle/ability/ice_face.c +++ b/test/battle/ability/ice_face.c @@ -135,3 +135,33 @@ SINGLE_BATTLE_TEST("Ice Face doesn't transform Eiscue if Cloud Nine/Air Lock is MESSAGE("Eiscue fainted!"); } } + +SINGLE_BATTLE_TEST("Ice Face is not restored if hail or snow and Eiscue are already out") +{ + u32 move; + PARAMETRIZE { move = MOVE_SNOWSCAPE; } + PARAMETRIZE { move = MOVE_HAIL; } + GIVEN { + ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL); + ASSUME(gMovesInfo[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE); + ASSUME(gMovesInfo[MOVE_HAIL].effect == EFFECT_HAIL); + PLAYER(SPECIES_EISCUE); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); MOVE(player, move); } + TURN { MOVE(opponent, MOVE_TACKLE); } + TURN { SWITCH(opponent, 1); } + } SCENE { + ABILITY_POPUP(player, ABILITY_ICE_FACE); + MESSAGE("Eiscue transformed!"); + ABILITY_POPUP(player, ABILITY_ICE_FACE); + MESSAGE("Eiscue transformed!"); + ABILITY_POPUP(player, ABILITY_ICE_FACE); + MESSAGE("Eiscue transformed!"); + NONE_OF { + ABILITY_POPUP(player, ABILITY_ICE_FACE); + MESSAGE("Eiscue transformed!"); + } + } +}