mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-18 00:22:32 -05:00
* DLC2 returning Pokemon * Returning legendaries too * Partially add Raging Bolt and Iron Crown (#10) * Add remaining Pre-DLC2 event data * Fix tests * Last event before DLC + split learnset files * Learnsets + secret returning pokemon * Some DLC 2 stuff (#12) * Add New Mons * Add Electro Shot * Give Dipplin Dex Evo * Update data/moves.ts --------- Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> * More tweaks * formats * Revealed moves (#11) * Add Hard Press * Add Psychic Noise * Add Upper Hand * Apply suggestions from code review --------- Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> * more things * Fix typo * a lot of other things * MOVES! kinda * b * fickle beam confirmed chance * Evo Item Undexit + Metal Alloy + Move Fixes (#19) * Update move data * Update Item Data * Apply suggestions from code review --------- Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> * Add message for Fickle Beam BP double (#18) * Add some tests and implement Tera Shell (#15) * add some tests and draft of tera shell * add text * . * add improvements from feedback, change behavior of terashell * use AfterMove instead of AfterMoveSecondary * add confirmation to multi-hit interaction * improve based on feedback and general cleanup * Apply suggestions from code review --------- Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> * Add Tera Shift and Teraform Zero (#16) * Add Tera Shift and Teraform Zero * Add short descriptions * fixes * More move changes * Update unSketchable moves List from Anubis * more move things * oops * Implement new Neutralizing Gas/Paradox ability interaction (#17) * Implement new Neutralizing Gas/Paradox ability interaction * add test * revert in dlc * ok * Update pastgens for Sketch (#20) * Implement Stellar type (#13) * Implement Stellar type * stuff from research * pain * add tests for Dragon Cheer (#22) Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> * Update move flags (#23) * Fix flags for new moves * update old moves * remove sparkling aria changes * update metronome description * update other move descriptions * more formatz stuff * Add Poison Puppeteer (#24) * Add Poison Puppeteer * i'm bad * still bad * Fix build * oops * Update data/moves.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * Update data/moves.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * Update data/items.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * Update data/moves.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * Fix Terapagos dex entries (#25) * Update data/pokedex.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * Update data/pokedex.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * Update data/pokedex.ts Co-authored-by: Marty-D <Marty-D@users.noreply.github.com> * FIX BUILD * Fix Regulation E formats (#26) * Fix Regulation E formats * add move bans * nevermind * Add Regulation F formats (#27) * Fix interaction between Adaptability and Tera Stellar (#28) * reg f bo3 ladder * Update config/formats.ts Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com> --------- Co-authored-by: Smudge <smudgerox@users.noreply.github.com> Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com> Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com> Co-authored-by: tofa <79044321+im-tofa@users.noreply.github.com> Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
100 lines
4.0 KiB
JavaScript
100 lines
4.0 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
const common = require('./../../common');
|
|
|
|
let battle;
|
|
|
|
describe('Protosynthesis', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it(`should boost the user's highest stat except HP while Sunny Day is active`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Scream Tail', ability: 'protosynthesis', moves: ['raindance']},
|
|
], [
|
|
{species: 'Torkoal', ability: 'drought', moves: ['sleeptalk']},
|
|
]]);
|
|
|
|
const tail = battle.p1.active[0];
|
|
assert.equal(tail.volatiles['protosynthesis'].bestStat, 'spd');
|
|
battle.makeChoices();
|
|
assert(!tail.volatiles['protosynthesis'], `Scream Tail's SpD should stop being boosted when Sun ends`);
|
|
});
|
|
|
|
it(`should take stat stages and no other modifiers into account when determining the best stat`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Roaring Moon', ability: 'protosynthesis', evs: {'atk': 252, 'spd': 252}, moves: ['tailwind']},
|
|
], [
|
|
{species: 'Salamence', ability: 'intimidate', moves: ['sunnyday']},
|
|
]]);
|
|
|
|
battle.makeChoices();
|
|
const moon = battle.p1.active[0];
|
|
assert.equal(moon.boosts.atk, -1);
|
|
assert.equal(moon.volatiles['protosynthesis'].bestStat, 'spd');
|
|
});
|
|
|
|
it(`should not activate while Desolate Land is active`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Roaring Moon', ability: 'protosynthesis', moves: ['sleeptalk']},
|
|
], [
|
|
{species: 'Groudon-Primal', ability: 'desolateland', moves: ['sleeptalk']},
|
|
]]);
|
|
|
|
const moon = battle.p1.active[0];
|
|
assert(!moon.volatiles['protosynthesis']);
|
|
});
|
|
|
|
it(`should be activated by Booster Energy when Sunny Day is not active`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Scream Tail', ability: 'protosynthesis', item: 'boosterenergy', moves: ['raindance', 'sunnyday']},
|
|
], [
|
|
{species: 'Torkoal', ability: 'drought', moves: ['sleeptalk']},
|
|
]]);
|
|
|
|
const tail = battle.p1.active[0];
|
|
assert.equal(tail.volatiles['protosynthesis'].bestStat, 'spd', `Scream Tail's SpD should have been boosted by Protosynthesis in Sun`);
|
|
assert.equal(tail.volatiles['protosynthesis'].fromBooster, undefined, `Scream Tail's Protosynthesis should not have been activated by Booster Energy in Sun`);
|
|
// change to rain
|
|
battle.makeChoices();
|
|
assert(tail.volatiles['protosynthesis'].fromBooster, `Scream Tail's Protosynthesis should have been activated by Booster Energy in Rain`);
|
|
// change to sun and back
|
|
battle.makeChoices('move sunnyday', 'auto');
|
|
battle.makeChoices();
|
|
assert(!!tail.volatiles['protosynthesis'], `Scream Tail's Protosynthesis activated by Booster Energy should still be active when Sun ends`);
|
|
});
|
|
|
|
it(`should not be prevented from activating if the user holds Utility Umbrella`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Scream Tail', ability: 'protosynthesis', item: 'utilityumbrella', moves: ['trick']},
|
|
], [
|
|
{species: 'Torkoal', ability: 'drought', moves: ['sleeptalk']},
|
|
]]);
|
|
|
|
const tail = battle.p1.active[0];
|
|
assert.equal(tail.volatiles['protosynthesis'].bestStat, 'spd', `Scream Tail's SpD should have been boosted by Protosynthesis in Sun while holding Utility Umbrella`);
|
|
});
|
|
|
|
it(`should have its boost nullified by Neutralizing Gas`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Scream Tail', ability: 'protosynthesis', item: 'boosterenergy', moves: ['luckychant', 'recover']},
|
|
], [
|
|
{species: 'Weezing', moves: ['venoshock']},
|
|
{species: 'Weezing', ability: 'neutralizinggas', moves: ['venoshock']},
|
|
]]);
|
|
|
|
const tail = battle.p1.active[0];
|
|
battle.makeChoices('move luckychant', 'move venoshock');
|
|
assert.bounded(tail.maxhp - tail.hp, [84, 102]);
|
|
battle.makeChoices('auto', 'switch 2');
|
|
battle.makeChoices('move recover', 'move venoshock');
|
|
assert.bounded(tail.maxhp - tail.hp, [110, 132]);
|
|
// Ensure that the boost wasn't completely removed
|
|
battle.makeChoices('auto', 'switch 2');
|
|
battle.makeChoices('move recover', 'move venoshock');
|
|
assert.bounded(tail.maxhp - tail.hp, [84, 102]);
|
|
});
|
|
});
|