Spaces:
Running
Running
File size: 801 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 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Leftovers [Gen 2]', () => {
afterEach(() => {
battle.destroy();
});
it('should heal after switch', () => {
battle = common.gen(2).createBattle();
battle.setPlayer('p1', { team: [
{ species: 'Blissey', item: 'leftovers', moves: ['healbell'] },
{ species: 'Magikarp', level: 1, moves: ['splash'] },
] });
battle.setPlayer('p2', { team: [
{ species: "Miltank", moves: ['seismictoss'] },
] });
const holder = battle.p1.active[0];
battle.makeChoices('move healbell', 'move seismictoss');
assert.equal(holder.hp, 590);
battle.makeChoices('switch 2', 'move seismictoss');
battle.makeChoices('switch 2', '');
assert.equal(holder.hp, 630);
});
});
|