Spaces:
Running
Running
File size: 6,365 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 152 153 154 155 156 157 158 159 160 161 162 163 164 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe("Tera Stellar", () => {
afterEach(() => {
battle.destroy();
});
it(`should increase the damage of non-STAB moves by 1.2x on the first use of that move type`, () => {
battle = common.gen(9).createBattle([[
{ species: 'Wynaut', ability: 'noguard', moves: ['surf', 'hydropump', 'extrasensory', 'hyperspacehole'], teraType: 'Stellar' },
], [
{ species: 'Happiny', ability: 'shellarmor', moves: ['softboiled'] },
]]);
const happiny = battle.p2.active[0];
battle.makeChoices('move surf terastallize', 'auto');
let damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [40, 47], `Surf should have ~1.2x damage on its first use`);
battle.makeChoices('move surf', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [33, 39], `Surf should have regular damage on its second use`);
battle.makeChoices('move hydropump', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [39, 47], `Hydro Pump should have regular damage, because Water-type was already used`);
battle.makeChoices('move extrasensory', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [58, 70], `Extrasensory should have 2x damage on its first use`);
battle.makeChoices('move extrasensory', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [43, 52], `Extrasensory should have 1.5x damage on its second use`);
battle.makeChoices('move hyperspacehole', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [43, 52], `Hyperspace Hole should have 1.5x damage on its first use, because Psychic-type was already used`);
});
it(`should not have the once-per-type restriction when used by Terapagos`, () => {
battle = common.gen(9).createBattle([[
{ species: 'Terapagos', ability: 'terashift', moves: ['surf', 'hypervoice'], item: 'laggingtail', teraType: 'Stellar' },
], [
{ species: 'Chansey', ability: 'shellarmor', moves: ['softboiled'] },
]]);
const chansey = battle.p2.active[0];
battle.makeChoices('move surf terastallize', 'auto');
let damage = chansey.maxhp - chansey.hp;
assert.bounded(damage, [94, 110], `Surf should have ~1.2x damage on its first use`);
battle.makeChoices('move surf', 'auto');
damage = chansey.maxhp - chansey.hp;
assert.bounded(damage, [94, 110], `Surf should have ~1.2x damage on its second use`);
battle.makeChoices('move hypervoice', 'auto');
damage = chansey.maxhp - chansey.hp;
assert.bounded(damage, [156, 184], `Hyper Voice should have 2x damage on its first use`);
battle.makeChoices('move hypervoice', 'auto');
damage = chansey.maxhp - chansey.hp;
assert.bounded(damage, [156, 184], `Hyper Voice should have 2x damage on its second use`);
});
it(`should not modify the Pokemon's base type for defensive purposes`, () => {
battle = common.gen(9).createBattle([[
{ species: 'Krookodile', moves: ['sleeptalk'], teraType: 'Stellar' },
], [
{ species: 'Tornadus', ability: 'prankster', moves: ['psychic', 'thunderwave', 'leer'] },
]]);
const krookodile = battle.p1.active[0];
battle.makeChoices('move sleeptalk terastallize', 'move psychic');
assert.fullHP(krookodile);
battle.makeChoices('auto', 'move thunderwave');
assert.equal(krookodile.status, '');
battle.makeChoices('auto', 'move thunderwave');
battle.makeChoices('auto', 'move leer');
assert.statStage(krookodile, 'def', 0);
});
it(`should only be super-effective against opposing Terastallized targets`, () => {
battle = common.gen(9).createBattle([[
{ species: 'Krookodile', moves: ['terablast'], teraType: 'Stellar' },
], [
{ species: 'Steelix', item: 'weaknesspolicy', moves: ['sleeptalk'], teraType: 'Stellar' },
]]);
const steelix = battle.p2.active[0];
battle.makeChoices('move terablast terastallize', 'move sleeptalk terastallize');
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' },
], [
{ species: 'Happiny', ability: 'shellarmor', moves: ['softboiled'] },
]]);
const happiny = battle.p2.active[0];
battle.makeChoices('move hyperspacehole terastallize', 'auto');
let damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [58, 70], `Hyperspace Hole should only have 2x damage on its first use`);
battle.makeChoices('move hyperspacehole', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [43, 52], `Hyperspace Hole should only have 1.5x damage on its second use`);
battle.makeChoices('move terablast', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [43, 52], `Tera Blast should only have ~1.2x damage on its first use`);
battle.makeChoices('move terablast', 'auto');
damage = happiny.maxhp - happiny.hp;
assert.bounded(damage, [24, 29], `Tera Blast should not have any boosted damage on its second use`);
});
it(`should increase the damage of all hits of a multi-hit move`, () => {
battle = common.gen(9).createBattle([[
{ species: 'Wynaut', moves: ['surgingstrikes', 'flipturn'], teraType: 'Stellar' },
], [
{ species: 'Blissey', moves: ['softboiled'] },
]]);
const blissey = battle.p2.active[0];
battle.makeChoices('move surgingstrikes terastallize', 'auto');
let damage = blissey.maxhp - blissey.hp;
assert.bounded(damage, [144, 174], `Surging Strikes should have ~1.2x damage on its first use for all 3 hits`);
battle.makeChoices('move flipturn', 'auto');
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`);
});
});
|