fixing weather check in getCondition()

This commit is contained in:
DustinLin 2024-09-30 14:15:34 -07:00
parent 145b80f491
commit bd30841534

View File

@ -5333,7 +5333,7 @@ export class ChillyReceptionAttr extends ForceSwitchOutAttr {
getCondition(): MoveConditionFunc {
// chilly reception move will go through if the weather is change-able to snow, or the user can switch out, else move will fail
return (user, target, move) => user.scene.arena.trySetWeather(WeatherType.SNOW, true) || super.getSwitchOutCondition()(user, target, move);
return (user, target, move) => user.scene.arena.weather?.weatherType !== WeatherType.SNOW || super.getSwitchOutCondition()(user, target, move);
}
}
export class RemoveTypeAttr extends MoveEffectAttr {