We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7843c3 commit 7dca9bbCopy full SHA for 7dca9bb
client/src/field.ts
@@ -87,8 +87,9 @@ export class Field {
87
}
88
return;
89
90
- this.weather = id ? WEATHERS[id] : undefined;
91
- if (this.weather) {
+
+ if (id) {
92
+ this.weather = WEATHERS[id];
93
this.weatherState.id = toID(this.weather);
94
const isExtremeWeather = EXTREME_WEATHER.includes(this.weather);
95
if (poke) {
@@ -102,6 +103,9 @@ export class Field {
102
103
this.weatherState.maxDuration = this.battle.gen.num <= 3 ? 5 : 8;
104
this.weatherState.minDuration = this.battle.gen.num <= 3 ? 0 : 5;
105
106
+ } else {
107
+ this.weather = undefined;
108
+ this.weatherState = {id: '', minDuration: 0, maxDuration: 0};
109
110
111
0 commit comments