mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 04:23:45 -05:00
* Standardize Photon Geyser tests * Add Gulp Missile tests * Add Berserk Dragon Darts test * Add Ring Target tests * Add and improve Metronome tests * Add Sparkling Aria tests * Add additional Fling tests * Standardize Mummy tests * Add Rollout submove targeting test * Improve Flower Veil tests * Add Acupressure tests * Improve Sky Drop tests * Add Future Sight tests * Improve Wandering Spirit tests * Improve Rapid Spin tests * Add Rocky Helmet victory test * Improve Focus Punch tests * Add a skipped Stomping Tantrum test
53 lines
1.7 KiB
JavaScript
53 lines
1.7 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
const common = require('./../../common');
|
|
|
|
let battle;
|
|
|
|
describe('Berserk', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it(`should activate prior to healing from Sitrus Berry`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'drampa', item: 'sitrusberry', ability: 'berserk', evs: {hp: 4}, moves: ['sleeptalk']},
|
|
], [
|
|
{species: 'wynaut', ability: 'compoundeyes', moves: ['superfang']},
|
|
]]);
|
|
|
|
battle.makeChoices();
|
|
const drampa = battle.p1.active[0];
|
|
assert.statStage(drampa, 'spa', 1);
|
|
assert.equal(drampa.hp, Math.floor(drampa.maxhp / 2) + Math.floor(drampa.maxhp / 4));
|
|
});
|
|
|
|
it(`should not activate prior to healing from Sitrus Berry after a multi-hit move`, function () {
|
|
battle = common.createBattle([[
|
|
{species: 'drampa', item: 'sitrusberry', ability: 'berserk', evs: {hp: 4}, moves: ['sleeptalk']},
|
|
], [
|
|
{species: 'wynaut', ability: 'parentalbond', moves: ['seismictoss']},
|
|
]]);
|
|
|
|
battle.makeChoices();
|
|
const drampa = battle.p1.active[0];
|
|
assert.statStage(drampa, 'spa', 0);
|
|
assert.equal(drampa.hp, drampa.maxhp - 200 + Math.floor(drampa.maxhp / 4));
|
|
});
|
|
|
|
it.skip(`should not activate below 50% HP if it was damaged by Dragon Darts`, function () {
|
|
battle = common.createBattle({gameType: 'doubles'}, [[
|
|
{species: 'drampa', ability: 'berserk', evs: {hp: 4}, moves: ['sleeptalk']},
|
|
{species: 'togedemaru', ability: 'compoundeyes', moves: ['superfang']},
|
|
], [
|
|
{species: 'wynaut', moves: ['dragondarts']},
|
|
{species: 'shuckle', moves: ['sleeptalk']},
|
|
]]);
|
|
|
|
battle.makeChoices('move sleeptalk, move superfang -1', 'auto');
|
|
const drampa = battle.p1.active[0];
|
|
assert.statStage(drampa, 'spa', 1);
|
|
});
|
|
});
|