diff --git a/src/data/ability.ts b/src/data/ability.ts index c5ae129dc3d..d10eb53e0af 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -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); } } diff --git a/src/field/arena.ts b/src/field/arena.ts index c673d4c9303..221790c598f 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -255,7 +255,7 @@ export class Arena { return true } - trySetWeather(weather: WeatherType, viaMove: boolean): boolean { + trySetWeather(weather: WeatherType, hasPokemonSource: boolean): boolean { // override hook for debugging if (WEATHER_OVERRIDE) { return this.trySetWeatherOverride(WEATHER_OVERRIDE); @@ -266,7 +266,7 @@ export class Arena { const oldWeatherType = this.weather?.weatherType || WeatherType.NONE; - this.weather = weather ? new Weather(weather, viaMove ? 5 : 0) : null; + this.weather = weather ? new Weather(weather, hasPokemonSource ? 5 : 0) : null; if (this.weather) { this.scene.tryReplacePhase(phase => phase instanceof WeatherEffectPhase && phase.weather.weatherType === oldWeatherType, new WeatherEffectPhase(this.scene, this.weather)); @@ -285,13 +285,13 @@ export class Arena { return true; } - trySetTerrain(terrain: TerrainType, viaMove: boolean, ignoreAnim: boolean = false): boolean { + trySetTerrain(terrain: TerrainType, hasPokemonSource: boolean, ignoreAnim: boolean = false): boolean { if (this.terrain?.terrainType === (terrain || undefined)) return false; const oldTerrainType = this.terrain?.terrainType || TerrainType.NONE; - this.terrain = terrain ? new Terrain(terrain, viaMove ? 5 : 0) : null; + this.terrain = terrain ? new Terrain(terrain, hasPokemonSource ? 5 : 0) : null; if (this.terrain) { if (!ignoreAnim)