Skip to content

Commit 7dca9bb

Browse files
vlin02scheibo
authored andcommitted
rev
1 parent e7843c3 commit 7dca9bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/src/field.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ export class Field {
8787
}
8888
return;
8989
}
90-
this.weather = id ? WEATHERS[id] : undefined;
91-
if (this.weather) {
90+
91+
if (id) {
92+
this.weather = WEATHERS[id];
9293
this.weatherState.id = toID(this.weather);
9394
const isExtremeWeather = EXTREME_WEATHER.includes(this.weather);
9495
if (poke) {
@@ -102,6 +103,9 @@ export class Field {
102103
this.weatherState.maxDuration = this.battle.gen.num <= 3 ? 5 : 8;
103104
this.weatherState.minDuration = this.battle.gen.num <= 3 ? 0 : 5;
104105
}
106+
} else {
107+
this.weather = undefined;
108+
this.weatherState = {id: '', minDuration: 0, maxDuration: 0};
105109
}
106110
}
107111

0 commit comments

Comments
 (0)