diff --git a/data/mods/gen4/moves.ts b/data/mods/gen4/moves.ts index ddd4fa9c52..916ba1b71c 100644 --- a/data/mods/gen4/moves.ts +++ b/data/mods/gen4/moves.ts @@ -742,7 +742,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { this.add('-activate', source, 'move: Heal Bell'); const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []]; for (const ally of allies) { - if (ally.hasAbility('soundproof')) { + if (ally.hasAbility('soundproof') && !this.suppressingAbility(ally)) { if (ally.isActive) this.add('-immune', ally, '[from] ability: Soundproof'); continue; } diff --git a/data/mods/gen7/moves.ts b/data/mods/gen7/moves.ts index 2ddb18802c..94080ce06c 100644 --- a/data/mods/gen7/moves.ts +++ b/data/mods/gen7/moves.ts @@ -369,7 +369,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { let success = false; const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []]; for (const ally of allies) { - if (ally.hasAbility('soundproof')) { + if (ally.hasAbility('soundproof') && !this.suppressingAbility(ally)) { this.add('-immune', ally, '[from] ability: Soundproof'); continue; } diff --git a/data/moves.ts b/data/moves.ts index 05c508d124..cafda1b61c 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -589,7 +589,7 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = { let success = false; const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []]; for (const ally of allies) { - if (ally !== source) { + if (ally !== source && !this.suppressingAbility(ally)) { if (ally.hasAbility('sapsipper')) { this.add('-immune', ally, '[from] ability: Sap Sipper'); continue; @@ -8547,7 +8547,7 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = { let success = false; const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []]; for (const ally of allies) { - if (ally !== source) { + if (ally !== source && !this.suppressingAbility(ally)) { if (ally.hasAbility('soundproof')) { this.add('-immune', ally, '[from] ability: Soundproof'); continue; diff --git a/test/sim/moves/healbell.js b/test/sim/moves/healbell.js index 272ee73f5a..0814907b4e 100644 --- a/test/sim/moves/healbell.js +++ b/test/sim/moves/healbell.js @@ -25,6 +25,32 @@ describe('Heal Bell', () => { assert.equal(battle.p1.pokemon[1].status, ''); }); + it(`should not heal the major status conditions of a Pokemon with Soundproof`, () => { + battle = common.createBattle({ gameType: 'doubles' }, [[ + { species: 'Kommo-o', ability: 'soundproof', moves: ['sleeptalk'] }, + { species: 'Chansey', moves: ['sleeptalk', 'healbell'] }, + ], [ + { species: 'Nidoking', moves: ['sleeptalk', 'toxic'] }, + { species: 'Wynaut', moves: ['sleeptalk'] }, + ]]); + battle.makeChoices('auto', 'move toxic 1, move sleeptalk'); + battle.makeChoices('move sleeptalk, move healbell', 'auto'); + assert.equal(battle.p1.pokemon[0].status, 'tox'); + }); + + it(`with Mold Breaker should heal the major status conditions of a Pokemon with Soundproof`, () => { + battle = common.createBattle({ gameType: 'doubles' }, [[ + { species: 'Kommo-o', ability: 'soundproof', moves: ['sleeptalk'] }, + { species: 'Excadrill', ability: 'moldbreaker', moves: ['healbell'] }, + ], [ + { species: 'Nidoking', moves: ['sleeptalk', 'toxic'] }, + { species: 'Wynaut', moves: ['sleeptalk'] }, + ]]); + battle.makeChoices('auto', 'move toxic 1, move sleeptalk'); + battle.makeChoices('move sleeptalk, move healbell', 'auto'); + assert.equal(battle.p1.pokemon[0].status, ''); + }); + it(`in a Multi Battle, should heal the major status conditions of the ally's team`, () => { battle = common.createBattle({ gameType: 'multi' }, [[ { species: 'Machamp', ability: 'noguard', moves: ['poisongas'] },