mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Fix Tera Stellar not applying <60 bp boost on first use (#11455)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
This commit is contained in:
parent
68c6f9aa35
commit
7eca4741ab
|
|
@ -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)
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -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`);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user