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

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

let battle;

describe(`Judgment`, () => {
	afterEach(() => battle.destroy());

	it(`should adapt its type to a held Plate`, () => {
		battle = common.createBattle([
			[{ species: "Arceus", ability: 'Honey Gather', item: 'spookyplate', moves: ['judgment'] }],
			[{ species: "Spiritomb", ability: 'stancechange', moves: ['calmmind'] }],
		]);
		assert.hurts(battle.p2.active[0], () => battle.makeChoices('move judgment', 'move calmmind'));
	});

	it(`should not adapt its type to a held Z Crystal`, () => {
		battle = common.createBattle([
			[{ species: "Arceus", ability: 'Honey Gather', item: 'ghostiumz', moves: ['judgment'] }],
			[{ species: "Spiritomb", ability: 'stancechange', moves: ['calmmind'] }],
		]);
		battle.makeChoices('move judgment', 'move calmmind');
		assert.fullHP(battle.p2.active[0]);
	});
});