Spaces:
Running
Running
File size: 786 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 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Leppa Berry', () => {
afterEach(() => {
battle.destroy();
});
it('should restore PP to the first move with any PP missing when eaten forcibly', () => {
battle = common.createBattle([
[{ species: 'Gyarados', ability: 'moxie', item: '', moves: ['sleeptalk', 'splash'] }],
[{ species: 'Geodude', ability: 'sturdy', item: 'leppaberry', moves: ['sleeptalk', 'fling'] }],
]);
const pokemon = battle.p1.active[0];
battle.makeChoices('move sleeptalk', 'move sleeptalk');
battle.makeChoices('move splash', 'move fling');
assert.equal(pokemon.getMoveData('sleeptalk').pp, 16);
assert.false.equal(pokemon.getMoveData('splash').pp, 64);
});
});
|