From b573076789653f56a17f8a2c79579dc846de2a6e Mon Sep 17 00:00:00 2001 From: Steven Chan <29343843+chansyu@users.noreply.github.com> Date: Mon, 29 Jul 2024 23:11:14 +0000 Subject: [PATCH] [Bug] disallow ghost-type curse to bypass crafty shield (#3228) Co-authored-by: Steven Chan --- src/field/pokemon.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f151aef2751..6e00fa05ac9 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1855,6 +1855,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.scene.arena.applyTagsForSide(ArenaTagType.CRAFTY_SHIELD, defendingSide, cancelled, this, move.category, move.moveTarget); } + // Apply exceptional condition of Crafty Shield if the move used is Curse + if (move.id === Moves.CURSE) { + const defendingSide = this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY; + this.scene.arena.applyTagsForSide(ArenaTagType.CRAFTY_SHIELD, defendingSide, cancelled, this, move.category, move.moveTarget); + } + switch (moveCategory) { case MoveCategory.PHYSICAL: case MoveCategory.SPECIAL: