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

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

let battle;

describe('Z-Moves', () => {
	afterEach(() => {
		battle.destroy();
	});

	it(`should deal reduced damage to only protected targets`, () => {
		battle = common.createBattle({ gameType: 'doubles' });
		battle.setPlayer('p1', { team: [
			{ species: 'Kommo-o', ability: 'overcoat', item: 'kommoniumz', moves: ['clangingscales'] },
			{ species: 'Pachirisu', ability: 'voltabsorb', moves: ['protect'] },
		] });
		battle.setPlayer('p2', { team: [
			{ species: 'Turtonator', ability: 'shellarmor', moves: ['protect'] },
			{ species: 'Turtonator', ability: 'shellarmor', moves: ['sleeptalk'] },
		] });
		battle.makeChoices("move clangingscales zmove, move protect", "move protect, move sleeptalk");
		assert.false.fullHP(battle.p2.active[0]);
		assert.false.fainted(battle.p2.active[0]);
		assert.fainted(battle.p2.active[1]);
	});
});