From 7eca4741ab25c90e4a010141ccaccfef30fe6703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bastos=20Dias?= <80102738+andrebastosdias@users.noreply.github.com> Date: Mon, 22 Sep 2025 04:47:21 +0100 Subject: [PATCH] Fix Tera Stellar not applying <60 bp boost on first use (#11455) --- sim/battle-actions.ts | 6 +++--- test/sim/misc/terastellar.js | 40 +++++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/sim/battle-actions.ts b/sim/battle-actions.ts index 6906ddb11d..1771642bbc 100644 --- a/sim/battle-actions.ts +++ b/sim/battle-actions.ts @@ -1655,9 +1655,9 @@ export class BattleActions { } const dexMove = this.dex.moves.get(move.id); - if ( - basePower < 60 && source.getTypes(true).includes(move.type) && source.terastallized && - dexMove.priority <= 0 && !dexMove.multihit && + if (source.terastallized && (source.terastallized === 'Stellar' ? + !source.stellarBoostedTypes.includes(move.type) : source.hasType(move.type)) && + basePower < 60 && dexMove.priority <= 0 && !dexMove.multihit && // Hard move.basePower check for moves like Dragon Energy that have variable BP !((move.basePower === 0 || move.basePower === 150) && move.basePowerCallback) ) { diff --git a/test/sim/misc/terastellar.js b/test/sim/misc/terastellar.js index ee210d6fa9..f0a94d8eb7 100644 --- a/test/sim/misc/terastellar.js +++ b/test/sim/misc/terastellar.js @@ -103,20 +103,6 @@ describe("Tera Stellar", () => { assert.statStage(steelix, 'atk', 2); }); - it(`should increase the user's stats with Tera Blast if the user has Contrary`, () => { - battle = common.gen(9).createBattle([[ - { species: 'inkay', ability: 'contrary', moves: ['terablast'], teraType: 'Stellar' }, - ], [ - { species: 'chansey', moves: ['sleeptalk'] }, - ]]); - - const inkay = battle.p1.active[0]; - - battle.makeChoices('move terablast terastallize', 'move sleeptalk terastallize'); - assert.statStage(inkay, 'atk', 1); - assert.statStage(inkay, 'spa', 1); - }); - it(`should not work with Adapatability`, () => { battle = common.gen(9).createBattle([[ { species: 'Wynaut', ability: 'adaptability', moves: ['hyperspacehole', 'terablast'], teraType: 'Stellar' }, @@ -160,4 +146,30 @@ describe("Tera Stellar", () => { damage = blissey.maxhp - blissey.hp; assert.bounded(damage, [63, 75], `Flip Turn should have regular damage on its first use, because Water-type was already used`); }); + + it(`should boost the base power of weaker moves on the first use of that move type to 60 BP`, () => { + battle = common.gen(9).createBattle([[ + { species: 'Comfey', moves: ['drainingkiss', 'absorb'], teraType: 'Stellar' }, + ], [ + { species: 'Chansey', ability: 'shellarmor', moves: ['sleeptalk'] }, + ]]); + + const chansey = battle.p2.active[0]; + + let hp = chansey.hp; + battle.makeChoices('move drainingkiss terastallize', 'auto'); + assert.bounded(hp - chansey.hp, [70, 84], `Draining Kiss should be a 60 BP with 2x damage on its first use`); + + hp = chansey.hp; + battle.makeChoices('move drainingkiss', 'auto'); + assert.bounded(hp - chansey.hp, [45, 54], `Draining Kiss should be a 50 BP with 1.5x damage on its second use`); + + hp = chansey.hp; + battle.makeChoices('move absorb', 'auto'); + assert.bounded(hp - chansey.hp, [42, 50], `Absorb should be a 60 BP with ~1.2x damage on its first use`); + + hp = chansey.hp; + battle.makeChoices('move absorb', 'auto'); + assert.bounded(hp - chansey.hp, [12, 15], `Absorb should be a 20 BP with regular damage on its second use`); + }); });