From d525e2275f969b23ef43919f789a4216f0589591 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Sat, 1 Feb 2025 14:39:16 +0100 Subject: [PATCH] Changed ability behavior to pass tests --- src/data/ability.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index f27179cbf8d..95bb6b8d54e 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1003,8 +1003,12 @@ export class PostDefendPerishSongAbAttr extends PostDefendAbAttr { override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): boolean { if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !move.hitsSubstitute(attacker, pokemon)) { - if (pokemon.getTag(BattlerTagType.PERISH_SONG) || attacker.getTag(BattlerTagType.PERISH_SONG)) { + if (attacker.getTag(BattlerTagType.PERISH_SONG)) { return false; + } else if (pokemon.getTag(BattlerTagType.PERISH_SONG)) { + if (!simulated) { + attacker.addTag(BattlerTagType.PERISH_SONG, this.turns); + } } else { if (!simulated) { attacker.addTag(BattlerTagType.PERISH_SONG, this.turns);