mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-14 00:10:31 -05:00
Without the battle engine setting the HP EVs to 84, all HP values for tests that involved set damage/healing were changed.
28 lines
758 B
JavaScript
28 lines
758 B
JavaScript
var assert = require('assert');
|
|
var battle;
|
|
|
|
describe('Leftovers - GSC', 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);
|
|
});
|
|
});
|