Spaces:
Running
Running
File size: 698 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 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Life Orb', () => {
afterEach(() => {
battle.destroy();
});
it('should hurt the user by 1/10 of their max HP after a successful attack', () => {
battle = common.createBattle();
battle.setPlayer('p1', { team: [
{ species: 'Scizor', ability: 'technician', item: 'lifeorb', moves: ['uturn'] },
] });
battle.setPlayer('p2', { team: [
{ species: 'Primarina', ability: 'torrent', moves: ['sleeptalk'] },
] });
assert.hurtsBy(battle.p1.active[0], Math.floor(battle.p1.active[0].maxhp / 10), () => battle.makeChoices('move uturn', 'move sleeptalk'));
});
});
|