From 289969790a21031fc03a5873b073d8c99934f256 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 28 Mar 2024 09:21:39 -0400 Subject: [PATCH] Perish Song doesn't work on bosses --- src/data/battler-tags.ts | 4 ++++ src/data/move.ts | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 362f31357..71b891ed5 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -669,6 +669,10 @@ export class PerishSongTag extends BattlerTag { super(BattlerTagType.PERISH_SONG, BattlerTagLapseType.TURN_END, turnCount, Moves.PERISH_SONG); } + canAdd(pokemon: Pokemon): boolean { + return !pokemon.isBossImmune(); + } + lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { const ret = super.lapse(pokemon, lapseType); diff --git a/src/data/move.ts b/src/data/move.ts index 78f85c25e..35dd31675 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1826,10 +1826,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr { return false; const chance = this.getTagChance(user, target, move); - if (chance < 0 || chance === 100 || user.randSeedInt(100) < chance) { - (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedInt(this.turnCountMax - this.turnCountMin, this.turnCountMin), move.id, user.id); - return true; - } + if (chance < 0 || chance === 100 || user.randSeedInt(100) < chance) + return (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedInt(this.turnCountMax - this.turnCountMin, this.turnCountMin), move.id, user.id); return false; }