File size: 1,176 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
'use strict';

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

let battle;

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

	it('should boost the Defense and Special Defense of all active allies with Plus or Minus', () => {
		battle = common.gen(5).createBattle({ gameType: 'triples' });
		battle.setPlayer('p1', { team: [
			{ species: "Minun", ability: 'minus', moves: ['sleeptalk'] },
			{ species: "Klinklang", ability: 'plus', moves: ['magneticflux'] },
			{ species: "Pyukumuku", ability: 'innardsout', moves: ['sleeptalk'] },
		] });
		battle.setPlayer('p2', { team: [
			{ species: "Plusle", ability: 'plus', moves: ['sleeptalk'] },
			{ species: "Klinklang", ability: 'minus', moves: ['magneticflux'] },
			{ species: "Pyukumuku", ability: 'innardsout', moves: ['sleeptalk'] },
		] });
		battle.makeChoices('move sleeptalk, move magneticflux, move sleeptalk', 'move sleeptalk, move magneticflux, move sleeptalk');
		for (const active of battle.getAllActive()) {
			if (active.name === 'Pyukumuku') continue;
			assert.statStage(active, 'def', 1);
			assert.statStage(active, 'spd', 1);
		}
	});
});