File size: 662 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
'use strict';

const assert = require('./../../assert');
const common = require('./../../common');

let battle;

describe('Confusion', () => {
	afterEach(() => {
		battle.destroy();
	});

	it(`should not be affected by modifiers like Huge Power or Life Orb`, () => {
		battle = common.createBattle({ forceRandomChance: true }, [[
			{ species: 'Deoxys-Attack', ability: 'hugepower', item: 'lifeorb', moves: ['sleeptalk'] },
		], [
			{ species: 'Sableye', ability: 'prankster', moves: ['confuseray'] },
		]]);
		battle.makeChoices();
		const deoxys = battle.p1.active[0];
		const damage = deoxys.maxhp - deoxys.hp;
		assert.bounded(damage, [150, 177]);
	});
});