From 2c843656269fc26f3de7de8bee01f0007675e5e1 Mon Sep 17 00:00:00 2001 From: earljoves Date: Sun, 7 Jul 2024 23:30:15 -0500 Subject: [PATCH 1/2] Fix issue where 1.2x damage calculation is not showing properly --- play.pokemonshowdown.com/src/battle-tooltips.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/play.pokemonshowdown.com/src/battle-tooltips.ts b/play.pokemonshowdown.com/src/battle-tooltips.ts index 792ca2ee05..3ce45be65d 100644 --- a/play.pokemonshowdown.com/src/battle-tooltips.ts +++ b/play.pokemonshowdown.com/src/battle-tooltips.ts @@ -2379,11 +2379,14 @@ class BattleTooltips { value.itemModify(1.2); return value; } - if ((speciesName.startsWith('Ogerpon-Wellspring') && itemName === 'Wellspring Mask') || - (speciesName.startsWith('Ogerpon-Hearthflame') && itemName === 'Hearthflame Mask') || - (speciesName.startsWith('Ogerpon-Cornerstone') && itemName === 'Cornerstone Mask')) { - value.itemModify(1.2); - return value; + if (speciesName === 'Ogerpon') { + const speciesForme = value.pokemon.getSpeciesForme(); + if ((speciesForme === 'Ogerpon-Wellspring' && value.itemName === 'Wellspring Mask') || + (speciesForme === 'Ogerpon-Hearthflame' && value.itemName === 'Hearthflame Mask') || + (speciesForme === 'Ogerpon-Cornerstone' && value.itemName === 'Cornerstone Mask')) { + value.itemModify(1.2); + return value; + } } // Gems From c29d24671020b29a4d628031f4351118d4731926 Mon Sep 17 00:00:00 2001 From: earljoves Date: Mon, 8 Jul 2024 00:18:54 -0500 Subject: [PATCH 2/2] Fix issue where the tooltip does not show 1.2x damage calculation correctly for Terastallized Ogerpon forms. Use itemName instead of value.itemName. --- play.pokemonshowdown.com/src/battle-tooltips.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/play.pokemonshowdown.com/src/battle-tooltips.ts b/play.pokemonshowdown.com/src/battle-tooltips.ts index 3ce45be65d..ffcc498b98 100644 --- a/play.pokemonshowdown.com/src/battle-tooltips.ts +++ b/play.pokemonshowdown.com/src/battle-tooltips.ts @@ -2381,9 +2381,9 @@ class BattleTooltips { } if (speciesName === 'Ogerpon') { const speciesForme = value.pokemon.getSpeciesForme(); - if ((speciesForme === 'Ogerpon-Wellspring' && value.itemName === 'Wellspring Mask') || - (speciesForme === 'Ogerpon-Hearthflame' && value.itemName === 'Hearthflame Mask') || - (speciesForme === 'Ogerpon-Cornerstone' && value.itemName === 'Cornerstone Mask')) { + if ((speciesForme.startsWith('Ogerpon-Wellspring') && itemName === 'Wellspring Mask') || + (speciesForme.startsWith('Ogerpon-Hearthflame') && itemName === 'Hearthflame Mask') || + (speciesForme.startsWith('Ogerpon-Cornerstone') && itemName === 'Cornerstone Mask')) { value.itemModify(1.2); return value; }