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

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

let battle;

describe('Overflow Stat Mod', () => {
	afterEach(() => {
		battle.destroy();
	});

	it('should cap stats at 654 after a positive nature', () => {
		battle = common.createBattle({ overflowStatMod: true });
		battle.setPlayer('p1', { team: [
			{ species: 'Eternatus-Eternamax', ability: 'Neutralizing Gas', moves: ['tackle'], nature: 'bold', evs: { def: 252 } },
		] });
		battle.setPlayer('p2', { team: [
			{ species: 'Magikarp', ability: 'Damp', moves: ['tackle'], nature: 'bold', evs: { def: 1 } },
		] });
		const eternamax = battle.p1.active[0];
		const def = eternamax.getStat('def');

		assert.equal(def, 654);
	});
});