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

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

let battle;

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

	it('should be able to copy called moves', () => {
		battle = common.createBattle([[
			{ species: 'riolu', ability: 'steadfast', moves: ['copycat'] },
		], [
			{ species: 'luxray', moves: ['eerieimpulse', 'roar'] },
		]]);

		battle.makeChoices();
		battle.makeChoices('auto', 'move roar');
		assert.statStage(battle.p2.active[0], 'spa', -4);
	});

	it('[Gen 4] should not be able to copy called moves', () => {
		battle = common.gen(4).createBattle([[
			{ species: 'bonsly', ability: 'sturdy', moves: ['copycat'] },
		], [
			{ species: 'ampharos', ability: 'static', moves: ['growl', 'counter'] },
		]]);
		battle.makeChoices();
		battle.makeChoices('auto', 'move counter');
		assert.statStage(battle.p2.active[0], 'atk', -1);
	});
});