[Bug] disallow ghost-type curse to bypass crafty shield (#3228)

Co-authored-by: Steven Chan <online@stevenchan.me>
This commit is contained in:
Steven Chan 2024-07-29 23:11:14 +00:00 committed by GitHub
parent 22cfa48103
commit b573076789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -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: