pokemon-showdown/test/simulator/moves/judgment.js
2016-11-18 15:14:27 -05:00

28 lines
873 B
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe(`Judgment`, function () {
afterEach(() => battle.destroy());
it(`should adapt its type to a held Plate`, function () {
battle = common.createBattle([
[{species: "Arceus", ability: 'Honey Gather', item: 'spookyplate', moves: ['judgment']}],
[{species: "Spiritomb", ability: 'stancechange', moves: ['calmmind']}],
]);
assert.hurts(battle.p2.active[0], () => battle.commitDecisions());
});
it(`should not adapt its type to a held Z Crystal`, function () {
battle = common.createBattle([
[{species: "Arceus", ability: 'Honey Gather', item: 'ghostiumz', moves: ['judgment']}],
[{species: "Spiritomb", ability: 'stancechange', moves: ['calmmind']}],
]);
battle.commitDecisions();
assert.fullHP(battle.p2.active[0]);
});
});