mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-06 13:47:24 -05:00
25 lines
1007 B
JavaScript
25 lines
1007 B
JavaScript
var assert = require('assert');
|
|
var battle;
|
|
|
|
describe('Shell Armor', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should prevent moves from dealing critical hits', function () {
|
|
battle = BattleEngine.Battle.construct();
|
|
battle.join('p1', 'Guest 1', 1, [{species: 'Slowbro', ability: 'shellarmor', moves: ['quickattack']}]);
|
|
battle.join('p2', 'Guest 2', 1, [{species: 'Cyrogonal', ability: 'noguard', moves: ['frostbreath']}]);
|
|
battle.commitDecisions();
|
|
assert.ok(!battle.log[battle.lastMoveLine + 1].startsWith('|-crit'));
|
|
});
|
|
|
|
it('should be suppressed by Mold Breaker', function () {
|
|
battle = BattleEngine.Battle.construct();
|
|
battle.join('p1', 'Guest 1', 1, [{species: 'Slowbro', ability: 'shellarmor', moves: ['quickattack']}]);
|
|
battle.join('p2', 'Guest 2', 1, [{species: 'Cyrogonal', ability: 'moldbreaker', item: 'zoomlens', moves: ['frostbreath']}]);
|
|
battle.commitDecisions();
|
|
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-crit'));
|
|
});
|
|
});
|