Fixes Ice Face regression (#5678)

This commit is contained in:
Alex 2024-11-17 20:36:55 +01:00 committed by GitHub
parent 5388ed0cad
commit 9f1b900809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 1 deletions

View file

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

View file

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