Spaces:
Running
Running
File size: 3,606 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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Brick Break', () => {
afterEach(() => {
battle.destroy();
});
it('should break Reflect', () => {
battle = common.createBattle([[
{ species: "mew", moves: ['brickbreak', 'splash'] },
], [
{ species: "ninjask", moves: ['reflect', 'splash'] },
]]);
battle.makeChoices('move splash', 'move reflect');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak', 'move splash');
assert.false(battle.p2.sideConditions['reflect']);
});
it('should not break Reflect when used against a Ghost-type', () => {
battle = common.createBattle([[
{ species: "mew", moves: ['brickbreak', 'splash'] },
], [
{ species: "gengar", moves: ['reflect', 'splash'] },
]]);
battle.makeChoices('move splash', 'move reflect');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak', 'move splash');
assert(battle.p2.sideConditions['reflect']);
});
it.skip('should break Reflect when used against a Ghost-type in Gen 4 or earlier', () => {
battle = common.gen(4).createBattle([[
{ species: "mew", moves: ['brickbreak', 'splash'] },
], [
{ species: "gengar", moves: ['reflect', 'splash'] },
]]);
battle.makeChoices('move splash', 'move reflect');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak', 'move splash');
assert.false(battle.p2.sideConditions['reflect']);
});
it('should break Reflect against a Ghost type whose type immunity is being ignored', () => {
battle = common.createBattle([[
{ species: "mew", moves: ['brickbreak', 'splash'] },
], [
{ species: "gengar", item: "ringtarget", moves: ['reflect', 'splash'] },
]]);
battle.makeChoices('move splash', 'move reflect');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak', 'move splash');
assert.false(battle.p2.sideConditions['reflect']);
});
it('should break Reflect against a Ghost type whose type immunity is being ignored', () => {
battle = common.createBattle([[
{ species: "mew", ability: "scrappy", moves: ['brickbreak', 'splash'] },
], [
{ species: "gengar", moves: ['reflect', 'splash'] },
]]);
battle.makeChoices('move splash', 'move reflect');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak', 'move splash');
assert.false(battle.p2.sideConditions['reflect']);
});
it('should break Reflect against a Ghost type if it has been electrified', () => {
battle = common.createBattle([[
{ species: "mew", moves: ['brickbreak', 'splash'] },
], [
{ species: "gengar", moves: ['reflect', 'electrify'] },
]]);
battle.makeChoices('move splash', 'move reflect');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak', 'move electrify');
assert.false(battle.p2.sideConditions['reflect']);
});
it(`should break the foe's Reflect when used against an ally in Gen 3`, () => {
battle = common.gen(3).createBattle({ gameType: 'doubles' }, [[
{ species: "mew", moves: ['brickbreak', 'splash'] },
{ species: "mew", moves: ['splash'] },
], [
{ species: "gengar", moves: ['reflect', 'splash'] },
{ species: "gengar", moves: ['splash'] },
]]);
battle.makeChoices('move splash, move splash', 'move reflect, move splash');
assert(battle.p2.sideConditions['reflect']);
battle.makeChoices('move brickbreak -2, move splash', 'move splash, move splash');
assert.false(battle.p2.sideConditions['reflect']);
});
});
|