pokemon-showdown/test/simulator/items/seeds.js
Guangcong Luo 6611c9c9ed Fix Seed activation on double-Surge
Terrain seeds weren't activating correctly on the first Surge of two
Surge ability activations turn 1. This fixes it by allowing Update to
run on inactive Pokémon, allowing a Pokémon's item to activate onUpdate
before their own ability activation.
2017-02-14 22:14:15 -06:00

25 lines
663 B
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Seeds', function () {
afterEach(function () {
battle.destroy();
});
it('should activate even in a double-switch-in', function () {
battle = common.createBattle();
const p1 = battle.join('p1', 'Guest 1', 1, [
{species: 'tapukoko', ability: 'electricsurge', item: 'grassyseed', moves: ['protect']},
]);
const p2 = battle.join('p2', 'Guest 2', 1, [
{species: 'tapubulu', ability: 'grassysurge', item: 'electricseed', moves: ['protect']},
]);
assert.false(p1.active[0].item);
assert.false(p2.active[0].item);
});
});