pokemon-showdown/test/sim/moves/instruct.js
André Bastos Dias 7d92a7e14e
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
Normalize test code formatting (#12029)
2026-05-11 21:13:30 -05:00

32 lines
868 B
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe(`Instruct`, () => {
afterEach(() => battle.destroy());
it(`should make the target reuse its last move`, () => {
battle = common.createBattle([[
{ species: "Cramorant", moves: ['stockpile'] },
], [
{ species: "Oranguru", moves: ['instruct'] },
]]);
battle.makeChoices();
assert.equal(battle.p1.active[0].boosts.def, 2);
});
it(`should not trigger AfterMove effects of the instructed move for the Instruct user`, () => {
battle = common.createBattle([[
{ species: "Swalot", moves: ['stockpile', 'spitup'] },
], [
{ species: "Duskull", moves: ['stockpile', 'instruct'] },
]]);
battle.makeChoices();
battle.makeChoices('move spitup', 'move instruct');
assert.equal(battle.p2.active[0].boosts.def, 1);
});
});