File size: 1,499 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
52
53
54
55
'use strict';

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

let battle;

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

	it('should double in power with each successful hit', () => {
		battle = common.createBattle([[
			{ species: 'kangaskhan', moves: ['luckychant'] },
		], [
			{ species: 'wynaut', ability: "compoundeyes", moves: ['furycutter'] },
		]]);

		battle.makeChoices();
		const kang = battle.p1.active[0];
		let damage = kang.maxhp - kang.hp;
		assert.bounded(damage, [13, 16]); // 40 BP
		let hpBeforeHit = kang.hp;
		battle.makeChoices();
		damage = hpBeforeHit - kang.hp;
		assert.bounded(damage, [25, 30]); // 80 BP
		hpBeforeHit = kang.hp;
		battle.makeChoices();
		damage = hpBeforeHit - kang.hp;
		assert.bounded(damage, [49, 58]); // 160 BP
	});

	it('should double in power with each successful hit (Gen 3)', () => {
		battle = common.gen(3).createBattle([[
			{ species: 'kangaskhan', moves: ['luckychant'] },
		], [
			{ species: 'wynaut', ability: "compoundeyes", moves: ['furycutter'] },
		]]);

		battle.makeChoices();
		const kang = battle.p1.active[0];
		let damage = kang.maxhp - kang.hp;
		assert.bounded(damage, [4, 5]); // 10 BP
		let hpBeforeHit = kang.hp;
		battle.makeChoices();
		damage = hpBeforeHit - kang.hp;
		assert.bounded(damage, [7, 9]); // 20 BP
		hpBeforeHit = kang.hp;
		battle.makeChoices();
		damage = hpBeforeHit - kang.hp;
		assert.bounded(damage, [13, 16]); // 40 BP
	});
});