From 6fe8c24e81d82b6635666177c63c0a33b89fb10b Mon Sep 17 00:00:00 2001 From: frutescens Date: Wed, 9 Oct 2024 23:20:44 -0700 Subject: [PATCH] quick fix to conditional --- src/data/move.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 22f5064f681..139dd959a23 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5143,7 +5143,7 @@ export class AddArenaTagAttr extends MoveEffectAttr { private removeOnOverlap: boolean; public selfSideTarget: boolean; - constructor(tagType: ArenaTagType, turnCount?: integer | null, failOnOverlap: boolean = false, removeOnOverlap: boolean = false, selfSideTarget: boolean = false) { + constructor(tagType: ArenaTagType, turnCount?: integer | null, failOnOverlap: boolean = false, selfSideTarget: boolean = false, removeOnOverlap: boolean = false) { super(true, MoveEffectTrigger.POST_APPLY); this.tagType = tagType; @@ -5160,11 +5160,11 @@ export class AddArenaTagAttr extends MoveEffectAttr { if (this.removeOnOverlap && user.scene.arena.getTag(this.tagType)) { user.scene.arena.removeTag(this.tagType); - } - - if ((move.chance < 0 || move.chance === 100 || user.randSeedInt(100) < move.chance) && user.getLastXMoves(1)[0].result === MoveResult.SUCCESS) { - user.scene.arena.addTag(this.tagType, this.turnCount, move.id, user.id, (this.selfSideTarget ? user : target).isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY); - return true; + } else { + if ((move.chance < 0 || move.chance === 100 || user.randSeedInt(100) < move.chance) && user.getLastXMoves(1)[0].result === MoveResult.SUCCESS) { + user.scene.arena.addTag(this.tagType, this.turnCount, move.id, user.id, (this.selfSideTarget ? user : target).isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY); + return true; + } } return false; @@ -8279,7 +8279,7 @@ export function initMoves() { .attr(RemoveScreensAttr, false) .attr(RemoveArenaTrapAttr, true), new StatusMove(Moves.TRICK_ROOM, Type.PSYCHIC, -1, 5, -1, -7, 4) - .attr(AddArenaTagAttr, ArenaTagType.TRICK_ROOM, 5, false, true) + .attr(AddArenaTagAttr, ArenaTagType.TRICK_ROOM, 5, false, false, true) .ignoresProtect() .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.DRACO_METEOR, Type.DRAGON, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 4)