Fix abilities causing permanent weather and terrains

This commit is contained in:
Flashfyre committed 2024-03-25 10:22:16 -04:00
1 parent efa8d4f3fc
commit a22d50caa7
2 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -372,7 +372,7 @@ export class PostDefendTerrainChangeAbAttr extends PostDefendAbAttr {
applyPostDefend(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
if (hitResult < HitResult.NO_EFFECT)
return pokemon.scene.arena.trySetTerrain(this.terrainType, false);
return pokemon.scene.arena.trySetTerrain(this.terrainType, true);
return false;
}
@@ -716,7 +716,7 @@ export class PostSummonWeatherChangeAbAttr extends PostSummonAbAttr {
applyPostSummon(pokemon: Pokemon, args: any[]): boolean {
if (!pokemon.scene.arena.weather?.isImmutable())
return pokemon.scene.arena.trySetWeather(this.weatherType, false);
return pokemon.scene.arena.trySetWeather(this.weatherType, true);
return false;
}
@@ -732,7 +732,7 @@ export class PostSummonTerrainChangeAbAttr extends PostSummonAbAttr {
}
applyPostSummon(pokemon: Pokemon, args: any[]): boolean {
return pokemon.scene.arena.trySetTerrain(this.terrainType, false);
return pokemon.scene.arena.trySetTerrain(this.terrainType, true);
}
}