File size: 1,832 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(`King's Shield`, () => {
	afterEach(() => battle.destroy());

	it(`should lower the Atk of a contactor by 2 in Gen 7`, () => {
		battle = common.gen(7).createBattle([
			[{ species: "Gallade", ability: 'justified', moves: ['zenheadbutt'] }],
			[{ species: "Aegislash", ability: 'stancechange', moves: ['kingsshield'] }],
		]);
		battle.makeChoices('move zenheadbutt', 'move kingsshield');
		assert.statStage(battle.p1.active[0], 'atk', -2);
	});

	it(`should lower the Atk of a contactor by 1 in Gen 8`, () => {
		battle = common.createBattle([
			[{ species: "Gallade", ability: 'justified', moves: ['zenheadbutt'] }],
			[{ species: "Aegislash", ability: 'stancechange', moves: ['kingsshield'] }],
		]);
		battle.makeChoices('move zenheadbutt', 'move kingsshield');
		assert.statStage(battle.p1.active[0], 'atk', -1);
	});

	it(`should lower the Atk of a contact-move attacker in 2 levels even if immune`, () => {
		battle = common.createBattle([
			[{ species: "Gallade", ability: 'justified', moves: ['drainpunch'] }],
			[{ species: "Aegislash", ability: 'stancechange', moves: ['kingsshield'] }],
		]);
		battle.makeChoices('move drainpunch', 'move kingsshield');
		assert.statStage(battle.p1.active[0], 'atk', -1);
	});
});

describe(`King's Shield [Gen 6]`, () => {
	afterEach(() => battle.destroy());

	it(`should not lower the Atk of a contact-move attacker if immune`, () => {
		battle = common.gen(6).createBattle([
			[{ species: "Gallade", ability: 'justified', moves: ['drainpunch'] }],
			[{ species: "Aegislash", ability: 'stancechange', moves: ['kingsshield'] }],
		]);
		battle.makeChoices('move drainpunch', 'move kingsshield');
		assert.statStage(battle.p1.active[0], 'atk', 0);
	});
});