Spaces:
Running
Running
File size: 5,341 Bytes
5c2ed06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe(`Fainted forme regression`, () => {
afterEach(() => {
battle.destroy();
});
it('[Hackmons] should be able to revert between different mega evolutions', () => {
battle = common.createBattle([[
{ species: 'charizardmegay', ability: 'drought', item: 'charizarditex', moves: ['memento'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move memento mega', 'auto');
assert.species(pokemon, 'Charizard-Mega-Y');
assert.hasAbility(pokemon, 'Drought');
});
it(`should revert Mega Evolutions`, () => {
battle = common.createBattle([[
{ species: 'alakazam', ability: 'synchronize', item: 'alakazite', moves: ['memento'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move memento mega', 'auto');
assert.species(pokemon, 'Alakazam');
assert.hasAbility(pokemon, 'Synchronize');
});
it(`should revert Rayquaza-Mega`, () => {
battle = common.gen(7).createBattle([[
{ species: 'rayquaza', ability: 'airlock', moves: ['memento', 'dragonascent'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move memento mega', 'auto');
assert.species(pokemon, 'Rayquaza');
assert.hasAbility(pokemon, 'Air Lock');
});
it(`should revert Primal forms`, () => {
battle = common.createBattle([[
{ species: 'kyogre', ability: 'drizzle', moves: ['memento'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices();
assert.species(pokemon, 'Kyogre');
assert.hasAbility(pokemon, 'Drizzle');
});
it(`shouldn't revert Arceus-forms to base Arceus`, () => {
battle = common.createBattle([[
{ species: 'arceusfire', ability: 'multitype', item: 'flameplate', moves: ['memento'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices();
assert.species(pokemon, 'Arceus-Fire');
assert.hasAbility(pokemon, 'Multitype');
});
it("should revert Terastallized Morpeko-Hangry to base Morpeko", () => {
battle = common.gen(9).createBattle([[
{ species: 'Morpeko', ability: 'hungerswitch', moves: ['memento', 'sleeptalk'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move sleeptalk', 'auto');
assert.species(pokemon, 'Morpeko-Hangry');
battle.makeChoices('move memento terastallize', 'auto');
assert.species(pokemon, 'Morpeko');
assert.hasAbility(pokemon, 'Hunger Switch');
});
it(`shouldn't revert Palafin-Hero to base Palafin`, () => {
battle = common.createBattle([[
{ species: 'palafin', ability: 'zerotohero', moves: ['memento'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('switch 2', 'auto');
battle.makeChoices('switch 2', 'auto');
assert.species(pokemon, 'Palafin-Hero');
battle.makeChoices('move memento', 'auto');
assert.species(pokemon, 'Palafin-Hero');
assert.hasAbility(pokemon, 'Zero to Hero');
});
it(`should revert Ogerpon-Tera to base Ogerpon`, () => {
battle = common.gen(9).createBattle([[
{
species: 'ogerponwellspring', ability: 'waterabsorb', item: 'wellspring mask',
moves: ['memento'], teraType: 'Water',
},
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move memento terastallize', 'auto');
assert.species(pokemon, 'Ogerpon-Wellspring');
assert.hasAbility(pokemon, 'Water Absorb');
});
it(`shouldn't revert Terapagos-Terastal to base Terapagos`, () => {
battle = common.createBattle([[
{ species: 'terapagos', ability: 'terashift', moves: ['memento'] },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices();
assert.species(pokemon, 'Terapagos-Terastal');
assert.hasAbility(pokemon, 'Tera Shell');
});
it(`should revert Terapagos-Stellar to base Terapagos`, () => {
battle = common.gen(9).createBattle([[
{ species: 'terapagos', ability: 'terashift', moves: ['memento'], teraType: 'Stellar' },
{ species: 'darkrai', moves: ['darkpulse'] },
], [
{ species: 'mareep', ability: 'static', moves: ['sleeptalk'] },
]]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move memento terastallize', 'auto');
assert.species(pokemon, 'Terapagos');
assert.hasAbility(pokemon, 'Tera Shift');
});
});
|