mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-20 22:18:18 -05:00
39 lines
1.5 KiB
JavaScript
39 lines
1.5 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
const common = require('./../../common');
|
|
|
|
let battle;
|
|
|
|
describe('Damp', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should prevent self-destruction moves from activating', function () {
|
|
battle = common.createBattle();
|
|
const p1 = battle.join('p1', 'Guest 1', 1, [{species: 'Politoed', ability: 'damp', moves: ['calmmind']}]);
|
|
const p2 = battle.join('p2', 'Guest 2', 1, [{species: 'Electrode', ability: 'static', moves: ['explosion']}]);
|
|
battle.makeChoices('move calmmind', 'move explosion');
|
|
assert.fullHP(p1.active[0]);
|
|
assert.fullHP(p2.active[0]);
|
|
});
|
|
|
|
it('should prevent Aftermath from activating', function () {
|
|
battle = common.createBattle();
|
|
const p1 = battle.join('p1', 'Guest 1', 1, [{species: 'Poliwrath', ability: 'damp', moves: ['closecombat']}]);
|
|
const p2 = battle.join('p2', 'Guest 2', 1, [{species: 'Aron', ability: 'aftermath', moves: ['leer']}]);
|
|
battle.makeChoices('move closecombat', 'move leer');
|
|
assert.fullHP(p1.active[0]);
|
|
assert.fainted(p2.active[0]);
|
|
});
|
|
|
|
it('should be suppressed by Mold Breaker', function () {
|
|
battle = common.createBattle();
|
|
const p1 = battle.join('p1', 'Guest 1', 1, [{species: 'Politoed', ability: 'damp', moves: ['calmmind']}]);
|
|
const p2 = battle.join('p2', 'Guest 2', 1, [{species: 'Electrode', ability: 'moldbreaker', moves: ['explosion']}]);
|
|
assert.hurts(p1.active[0], () => battle.makeChoices('move calmmind', 'move explosion'));
|
|
assert.fainted(p2.active[0]);
|
|
});
|
|
});
|