From 4a473471259b065e68a21613706c8a20295100ec Mon Sep 17 00:00:00 2001 From: Karthik <32044378+Karthik99999@users.noreply.github.com> Date: Sat, 16 Sep 2023 14:26:54 -0700 Subject: [PATCH] Tooltips: Support Ogerpon mask boost (#2151) --- src/battle-text-parser.ts | 2 +- src/battle-tooltips.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/battle-text-parser.ts b/src/battle-text-parser.ts index 8df97c2ea5..b64e399e04 100644 --- a/src/battle-text-parser.ts +++ b/src/battle-text-parser.ts @@ -966,7 +966,7 @@ class BattleTextParser { return line1 + template.replace('[POKEMON]', this.pokemon(pokemon)).replace('[STAT]', BattleTextParser.stat(stat)).replace('[ITEM]', this.effect(kwArgs.from)); } const template = this.template(templateId, kwArgs.from); - return line1 + template.replace('[POKEMON]', this.pokemon(pokemon)).replace('[STAT]', BattleTextParser.stat(stat)); + return line1 + template.replace(/\[POKEMON\]/g, this.pokemon(pokemon)).replace('[STAT]', BattleTextParser.stat(stat)); } case '-setboost': { diff --git a/src/battle-tooltips.ts b/src/battle-tooltips.ts index 060e38ec35..7fac90c13e 100644 --- a/src/battle-tooltips.ts +++ b/src/battle-tooltips.ts @@ -2100,6 +2100,12 @@ 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; + } // Gems if (BattleTooltips.noGemMoves.includes(moveName)) return value;