mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-06 13:47:24 -05:00
Listing the generation number imitates the style used in PS! format names, and is clearer on which generation it is than listing games from that gen (so GSC -> Gen 2, etc)
28 lines
760 B
JavaScript
28 lines
760 B
JavaScript
var assert = require('assert');
|
|
var battle;
|
|
|
|
describe('Leftovers [Gen 2]', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should heal after switch', function () {
|
|
battle = BattleEngine.Battle.construct('battle-leftovers-gsc', 'gen2customgame');
|
|
battle.join('p1', 'Guest 1', 1, [
|
|
{species: 'Blissey', item: 'leftovers', moves: ['healbell']},
|
|
{species: 'Magikarp', level: 1, moves: ['splash']}
|
|
]);
|
|
battle.join('p2', 'Guest 2', 1, [
|
|
{species: "Miltank", moves: ['seismictoss']}
|
|
]);
|
|
battle.commitDecisions();
|
|
assert.strictEqual(battle.p1.active[0].hp, 591);
|
|
|
|
battle.choose('p1', 'switch 2');
|
|
battle.commitDecisions();
|
|
|
|
battle.choose('p1', 'switch 2');
|
|
assert.strictEqual(battle.p1.active[0].hp, 631);
|
|
});
|
|
});
|