This commit is contained in:
André Bastos Dias 2026-06-02 14:06:26 +01:00 committed by GitHub
commit 37fd1d2ee7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View File

@ -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);

View 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'));
});
});