Spaces:
Sleeping
Sleeping
File size: 1,152 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 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Multiscale', () => {
afterEach(() => {
battle.destroy();
});
it(`should halve damage when it is at full health`, () => {
battle = common.createBattle([[
{ species: 'Dragonite', ability: 'multiscale', moves: ['sleeptalk'] },
], [
{ species: 'Wynaut', moves: ['wickedblow'] },
]]);
battle.makeChoices();
const dnite = battle.p1.active[0];
const damage = dnite.maxhp - dnite.hp;
assert.bounded(damage, [15, 18], `Multiscale should reduce damage`);
battle.makeChoices();
assert.bounded(dnite.maxhp - dnite.hp - damage, [30, 36], `Multiscale should not reduce damage, because Dragonite was damaged`);
});
it('should be suppressed by Mold Breaker', () => {
battle = common.createBattle([[
{ species: 'Dragonite', ability: 'multiscale', moves: ['sleeptalk'] },
], [
{ species: 'Wynaut', ability: 'moldbreaker', moves: ['wickedblow'] },
]]);
battle.makeChoices();
const dnite = battle.p1.active[0];
const damage = dnite.maxhp - dnite.hp;
assert.bounded(damage, [30, 36]);
});
});
|