pokemon-showdown/test/sim/abilities/sheerforce.js
2026-06-02 21:52:50 -05:00

92 lines
3.4 KiB
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Sheer Force', () => {
afterEach(() => {
battle.destroy();
});
it('should not eliminate Life Orb recoil in a move with no secondary effects', () => {
battle = common.createBattle([[
{ species: 'Tauros', ability: 'sheerforce', item: 'lifeorb', moves: ['earthquake'] },
], [
{ species: 'Lapras', ability: 'shellarmor', item: 'laggingtail', moves: ['rest'] },
]]);
battle.makeChoices('move earthquake', 'move rest');
assert.equal(battle.p1.active[0].hp, 262);
});
it('should eliminate secondary effects from moves', () => {
battle = common.createBattle([[
{ species: 'Tauros', ability: 'sheerforce', moves: ['zapcannon'] },
], [
{ species: 'Machamp', ability: 'noguard', moves: ['bulkup'] },
]]);
battle.makeChoices('move zapcannon', 'move bulkup');
assert.equal(battle.p2.active[0].status, '');
});
it('should not eliminate Life Orb recoil if the ability is disabled/removed mid-attack', () => {
battle = common.createBattle([[
{ species: 'Tauros', ability: 'sheerforce', item: 'lifeorb', moves: ['lockon', 'dynamicpunch'] },
], [
{ species: 'Scyther', ability: 'mummy', moves: ['irondefense'] },
]]);
battle.makeChoices('move lockon', 'move irondefense');
battle.makeChoices('move dynamicpunch', 'move irondefense');
assert.false(battle.p2.active[0].volatiles['confusion']);
assert.equal(battle.p1.active[0].hp, 262);
});
it('should eliminate Life Orb recoil in a move with secondary effects', () => {
battle = common.createBattle([[
{ species: 'Tauros', ability: 'sheerforce', item: 'lifeorb', moves: ['bodyslam'] },
], [
{ species: 'Lapras', ability: 'shellarmor', item: 'laggingtail', moves: ['rest'] },
]]);
battle.makeChoices('move bodyslam', 'move rest');
assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
it(`should not be possible to thaw a frozen target with a Sheer Force-boosted thawsTarget move`, () => {
battle = common.createBattle([[
{ species: 'wynaut', ability: 'sheerforce', moves: ['sleeptalk', 'scald'] },
], [
{ species: 'shuckle', moves: ['meteorassault'] },
]]);
battle.makeChoices(); // Use Meteor Assault to force recharge next turn and skip potential thaw
const frozenMon = battle.p2.active[0];
frozenMon.setStatus('frz');
battle.makeChoices('move scald', 'auto');
assert.equal(frozenMon.status, 'frz');
});
it(`should be possible to thaw a frozen target with a Sheer Force-boosted Fire-type move`, () => {
battle = common.createBattle([[
{ species: 'wynaut', ability: 'sheerforce', moves: ['sleeptalk', 'flamethrower'] },
], [
{ species: 'shuckle', moves: ['meteorassault'] },
]]);
battle.makeChoices(); // Use Meteor Assault to force recharge next turn and skip potential thaw
const frozenMon = battle.p2.active[0];
frozenMon.setStatus('frz');
battle.makeChoices('move flamethrower', 'auto');
assert.equal(frozenMon.status, '');
});
it('should suppress Life Orb recoil after knocking out a Neutralizing Gas user', () => {
battle = common.createBattle([[
{ species: 'landorus', ability: 'sheerforce', item: 'lifeorb', moves: ['earthpower'] },
], [
{ species: 'weezing', ability: 'neutralizinggas', moves: ['sleeptalk'] },
{ species: 'wynaut', ability: 'neutralizinggas', moves: ['sleeptalk'] },
]]);
battle.makeChoices();
assert.fullHP(battle.p1.active[0]);
});
});