File size: 1,683 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict';

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

let battle;

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

	it(`should multiply the defenses of a Pokemon that can evolve by 1.5`, () => {
		battle = common.createBattle([[
			{ species: 'Omanyte', ability: 'shellarmor', item: 'eviolite', moves: ['rest'] },
		], [
			{ species: 'Cherrim', moves: ['seedbomb', 'megadrain'] },
		]]);
		battle.makeChoices();
		assert.false.fainted(battle.p1.active[0]);
		battle.makeChoices('auto', 'move megadrain');
		assert.false.fainted(battle.p1.active[0]);
	});

	it(`should not multiply the defenses of a Pokemon that cannot evolve by 1.5`, () => {
		battle = common.createBattle([[
			{ species: 'Omastar', ability: 'shellarmor', item: 'eviolite', moves: ['rest'] },
			{ species: 'Omastar', ability: 'shellarmor', item: 'eviolite', moves: ['rest'] },
		], [
			{ species: 'Sceptile', item: 'meadowplate', moves: ['leafblade', 'megadrain'] },
		]]);
		battle.makeChoices();
		assert.fainted(battle.p1.active[0]);
		battle.makeChoices(); // switch in the second Omastar
		battle.makeChoices('auto', 'move megadrain');
		assert.fainted(battle.p1.active[0]);
	});

	it(`should multiply the defenses of a National Dex Pokemon that can evolve by 1.5`, () => {
		battle = common.createBattle([[
			{ species: 'Geodude', ability: 'shellarmor', item: 'eviolite', moves: ['rest'] },
		], [
			{ species: 'Roserade', moves: ['seedbomb', 'absorb'] },
		]]);
		battle.makeChoices();
		assert.false.fainted(battle.p1.active[0]);
		battle.makeChoices('auto', 'move absorb');
		assert.false.fainted(battle.p1.active[0]);
	});
});