mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Merge 24dc168718 into 6765d8422d
This commit is contained in:
commit
37fd1d2ee7
|
|
@ -528,6 +528,8 @@ export class BattleActions {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (this.battle.faintMessages(false, true)) return true;
|
||||
|
||||
if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce')) && !move.flags['futuremove']) {
|
||||
const originalHp = pokemon.hp;
|
||||
this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move);
|
||||
|
|
|
|||
22
test/sim/items/throatspray.js
Normal file
22
test/sim/items/throatspray.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
const assert = require('./../../assert');
|
||||
const common = require('./../../common');
|
||||
|
||||
let battle;
|
||||
|
||||
describe('Throat Spray', () => {
|
||||
afterEach(() => {
|
||||
battle.destroy();
|
||||
});
|
||||
|
||||
it(`should not activate if the last opponent fainted`, () => {
|
||||
battle = common.createBattle([[
|
||||
{ species: 'kommoo', item: 'throatspray', moves: ['clangingscales'] },
|
||||
], [
|
||||
{ species: 'roggenrola', level: 1, moves: ['sleeptalk'] },
|
||||
]]);
|
||||
battle.makeChoices();
|
||||
assert.false(battle.getDebugLog().includes('-enditem'));
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user