Spaces:
Running
Running
File size: 2,253 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 56 57 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Pledge Moves', () => {
beforeEach(() => {
battle = common.createBattle({ gameType: 'doubles' });
});
afterEach(() => battle.destroy());
it('should not combine if one of the users is forced to use a non-pledge move on its turn', () => {
battle.setPlayer('p1', { team: [
{ species: 'Venusaur', level: 90, moves: ['sludge', 'grasspledge'] },
{ species: 'Charizard', level: 99, moves: ['sleeptalk', 'firepledge'] },
] });
battle.setPlayer('p2', { team: [
{ species: 'Whimsicott', ability: 'prankster', moves: ['encore'] },
{ species: 'Blastoise', moves: ['sleeptalk'] },
] });
battle.makeChoices('move sludge 2, move sleeptalk', 'move encore 1, move sleeptalk');
battle.makeChoices('move grasspledge 2, move firepledge 2', 'move encore 1, move sleeptalk');
assert(!battle.p2.active[0].side.sideConditions['firepledge'], "Fire Pledge should not be active on the opponent's side of the field.");
assert(!battle.p1.active[1].moveThisTurn, "Charizard should not have moved this turn.");
});
it("should not start a Pledge combo for Z-moves", () => {
battle = common.gen(7).createBattle({ gameType: 'doubles' }, [[
{ species: 'Weedle', ability: 'sapsipper', moves: ['sleeptalk'] },
{ species: 'Wynaut', moves: ['sleeptalk'] },
], [
{ species: 'Venusaur', moves: ['grasspledge'] },
{ species: 'Charizard', level: 1, item: 'firiumz', moves: ['firepledge'] },
]]);
battle.makeChoices('auto', 'move grasspledge +1, move firepledge +1 zmove');
const weedle = battle.p1.active[0];
assert.statStage(weedle, 'atk', +1);
});
it("should not start a Pledge combo for Max Moves", () => {
battle = common.gen(8).createBattle({ gameType: 'doubles' }, [[
{ species: 'Weedle', ability: 'sapsipper', moves: ['sleeptalk'] },
{ species: 'Wynaut', moves: ['sleeptalk'] },
], [
{ species: 'Venusaur', moves: ['grasspledge'] },
{ species: 'Charizard', level: 1, moves: ['firepledge'], gigantamax: true },
]]);
battle.makeChoices('auto', 'move grasspledge +1, move firepledge +1 dynamax');
const weedle = battle.p1.active[0];
assert.statStage(weedle, 'atk', +1);
});
});
|