From 3d4de8870685b972f4d757dfe98f48c9dfb1e553 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 19 Feb 2025 16:36:54 -0800 Subject: [PATCH] Correct Snowscape weather name --- play.pokemonshowdown.com/src/battle-animations.ts | 2 +- play.pokemonshowdown.com/src/battle-text-parser.ts | 5 +++++ play.pokemonshowdown.com/src/battle-tooltips.ts | 14 +++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/play.pokemonshowdown.com/src/battle-animations.ts b/play.pokemonshowdown.com/src/battle-animations.ts index 1b18f73cd..258b9e504 100644 --- a/play.pokemonshowdown.com/src/battle-animations.ts +++ b/play.pokemonshowdown.com/src/battle-animations.ts @@ -958,7 +958,7 @@ export class BattleScene implements BattleSceneStub { primordialsea: 'Heavy Rain', sandstorm: 'Sandstorm', hail: 'Hail', - snow: 'Snow', + snowscape: 'Snow', deltastream: 'Strong Winds', }; weatherhtml = `${weatherNameTable[this.battle.weather] || this.battle.weather}`; diff --git a/play.pokemonshowdown.com/src/battle-text-parser.ts b/play.pokemonshowdown.com/src/battle-text-parser.ts index 369ee403f..0e24274ee 100644 --- a/play.pokemonshowdown.com/src/battle-text-parser.ts +++ b/play.pokemonshowdown.com/src/battle-text-parser.ts @@ -203,6 +203,11 @@ export class BattleTextParser { break; } + case '-weather': { + if (args[1] === 'Snow') args[1] = 'Snowscape'; + break; + } + case '-nothing': // OLD: |-nothing // NEW: |-activate||move:Splash diff --git a/play.pokemonshowdown.com/src/battle-tooltips.ts b/play.pokemonshowdown.com/src/battle-tooltips.ts index 2e65aa6a4..c169fb1ca 100644 --- a/play.pokemonshowdown.com/src/battle-tooltips.ts +++ b/play.pokemonshowdown.com/src/battle-tooltips.ts @@ -35,7 +35,7 @@ class ModifiableValue { this.itemName = this.battle.dex.items.get(serverPokemon.item).name; const ability = serverPokemon.ability || pokemon?.ability || serverPokemon.baseAbility; this.abilityName = this.battle.dex.abilities.get(ability).name; - this.weatherName = battle.weather === 'snow' ? 'Snow' : this.battle.dex.moves.get(battle.weather).exists ? + this.weatherName = this.battle.dex.moves.get(battle.weather).exists ? this.battle.dex.moves.get(battle.weather).name : this.battle.dex.abilities.get(battle.weather).name; } reset(value = 0, isAccuracy?: boolean) { @@ -588,7 +588,7 @@ export class BattleTooltips { zMove = this.battle.dex.moves.get(BattleTooltips.zMoveTable['Rock']); break; case 'hail': - case 'snow': + case 'snowscape': zMove = this.battle.dex.moves.get(BattleTooltips.zMoveTable['Ice']); break; } @@ -1116,13 +1116,13 @@ export class BattleTooltips { if (this.battle.gen >= 4 && this.pokemonHasType(pokemon, 'Rock') && weather === 'sandstorm') { stats.spd = Math.floor(stats.spd * 1.5); } - if (this.pokemonHasType(pokemon, 'Ice') && weather === 'snow') { + if (this.pokemonHasType(pokemon, 'Ice') && weather === 'snowscape') { stats.def = Math.floor(stats.def * 1.5); } if (ability === 'sandrush' && weather === 'sandstorm') { speedModifiers.push(2); } - if (ability === 'slushrush' && (weather === 'hail' || weather === 'snow')) { + if (ability === 'slushrush' && (weather === 'hail' || weather === 'snowscape')) { speedModifiers.push(2); } if (item !== 'utilityumbrella') { @@ -1275,7 +1275,7 @@ export class BattleTooltips { if (ability === 'misspelled') { stats.spa = Math.floor(stats.spa * 1.5); } - if (ability === 'fortifyingfrost' && weather === 'snow') { + if (ability === 'fortifyingfrost' && weather === 'snowscape') { stats.spa = Math.floor(stats.spa * 1.5); stats.spd = Math.floor(stats.spd * 1.5); } @@ -1295,7 +1295,7 @@ export class BattleTooltips { stats.def *= 2; } if (ability === 'climatechange') { - if (weather === 'snow') { + if (weather === 'snowscape') { stats.def = Math.floor(stats.def * 1.5); stats.spd = Math.floor(stats.spd * 1.5); } @@ -1564,7 +1564,7 @@ export class BattleTooltips { moveType = 'Rock'; break; case 'hail': - case 'snow': + case 'snowscape': moveType = 'Ice'; break; }