mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-03 12:07:40 -05:00
25 lines
671 B
JavaScript
25 lines
671 B
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
const common = require('./../../common');
|
|
|
|
let battle;
|
|
|
|
describe('Critical hits', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it(`should not happen on self-hits`, function () {
|
|
battle = common.createBattle({forceRandomChance: true}, [[
|
|
{species: 'Zubat', moves: ['confuseray']},
|
|
], [
|
|
{species: 'Chansey', item: 'luckypunch', ability: 'superluck', moves: ['softboiled']},
|
|
]]);
|
|
|
|
battle.makeChoices('move confuseray', 'move softboiled');
|
|
assert(battle.log.some(line => line.includes('[from] confusion')));
|
|
assert(battle.log.every(line => !line.startsWith('|-crit')));
|
|
});
|
|
});
|