mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-07-29 14:47:59 -05:00
29 lines
729 B
JavaScript
29 lines
729 B
JavaScript
'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([[
|
|
{ species: 'Blissey', item: 'leftovers', moves: ['healbell'] },
|
|
{ species: 'Magikarp', level: 1, moves: ['splash'] },
|
|
], [
|
|
{ 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);
|
|
});
|
|
});
|