Spaces:
Running
Running
File size: 2,827 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 |
'use strict';
const assert = require('../../assert');
const common = require('../../common');
let battle;
describe('Punching Glove', () => {
afterEach(() => {
battle.destroy();
});
it(`should prevent item effects triggered by contact from acting`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'punchingglove', moves: ['bulletpunch'] },
], [
{ species: 'miltank', item: 'rockyhelmet', moves: ['sleeptalk'] },
]]);
battle.makeChoices();
assert.fullHP(battle.p1.active[0], `Attacker should not be hurt`);
});
it(`should not prevent item effects triggered by contact from acting if using non-punching contact move`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'punchingglove', moves: ['tackle'] },
], [
{ species: 'miltank', item: 'rockyhelmet', moves: ['sleeptalk'] },
]]);
battle.makeChoices();
assert.false.fullHP(battle.p1.active[0], `Attacker should be hurt`);
});
it(`should not activate on the opponent's moves`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'punchingglove', moves: ['sleeptalk'] },
], [
{ species: 'happiny', moves: ['lunge'] },
]]);
battle.makeChoices();
assert.statStage(battle.p1.active[0], 'atk', -1, `Attack should be lowered`);
});
// https://www.smogon.com/forums/threads/scarlet-violet-battle-mechanics-research.3709545/post-9406865
it(`should stop Pickpocket`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'punchingglove', moves: ['bulletpunch'] },
], [
{ species: 'weavile', ability: 'pickpocket', moves: ['sleeptalk'] },
]]);
battle.makeChoices();
assert.equal(battle.p1.active[0].item, 'punchingglove', `Attacker should not lose their item`);
assert.false.holdsItem(battle.p2.active[0], `Target should not steal Punching Glove`);
});
// https://www.smogon.com/forums/threads/scarlet-violet-battle-mechanics-research.3709545/post-9406865
it(`should block against Protecting effects with a contact side effect`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'punchingglove', moves: ['sleeptalk', 'bulletpunch'] },
], [
{ species: 'aggron', moves: ['sleeptalk', 'banefulbunker', 'obstruct', 'spikyshield'] },
]]);
battle.makeChoices('move bulletpunch', 'move banefulbunker');
battle.makeChoices();
battle.makeChoices('move bulletpunch', 'move obstruct');
battle.makeChoices();
battle.makeChoices('move bulletpunch', 'move spikyshield');
battle.makeChoices();
const wynaut = battle.p1.active[0];
assert.equal(wynaut.status, '', `Wynaut should not have been poisoned by Baneful Bunker`);
assert.statStage(wynaut, 'def', 0, `Wynaut's Defense should not have been lowered by Obstruct`);
assert.fullHP(wynaut, `Wynaut should not have lost HP from Spiky Shield`);
});
});
|