Revert "quick fix to conditional"

This reverts commit 6fe8c24e81.
This commit is contained in:
frutescens 2024-10-10 19:14:55 -07:00
parent f2485492af
commit 05ff80461a

View File

@ -5152,7 +5152,7 @@ export class AddArenaTagAttr extends MoveEffectAttr {
private removeOnOverlap: boolean; private removeOnOverlap: boolean;
public selfSideTarget: boolean; public selfSideTarget: boolean;
constructor(tagType: ArenaTagType, turnCount?: integer | null, failOnOverlap: boolean = false, selfSideTarget: boolean = false, removeOnOverlap: boolean = false) { constructor(tagType: ArenaTagType, turnCount?: integer | null, failOnOverlap: boolean = false, removeOnOverlap: boolean = false, selfSideTarget: boolean = false) {
super(true, MoveEffectTrigger.POST_APPLY); super(true, MoveEffectTrigger.POST_APPLY);
this.tagType = tagType; this.tagType = tagType;
@ -5169,11 +5169,11 @@ export class AddArenaTagAttr extends MoveEffectAttr {
if (this.removeOnOverlap && user.scene.arena.getTag(this.tagType)) { if (this.removeOnOverlap && user.scene.arena.getTag(this.tagType)) {
user.scene.arena.removeTag(this.tagType); user.scene.arena.removeTag(this.tagType);
} 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); if ((move.chance < 0 || move.chance === 100 || user.randSeedInt(100) < move.chance) && user.getLastXMoves(1)[0].result === MoveResult.SUCCESS) {
return true; 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; return false;
@ -8288,7 +8288,7 @@ export function initMoves() {
.attr(RemoveScreensAttr, false) .attr(RemoveScreensAttr, false)
.attr(RemoveArenaTrapAttr, true), .attr(RemoveArenaTrapAttr, true),
new StatusMove(Moves.TRICK_ROOM, Type.PSYCHIC, -1, 5, -1, -7, 4) new StatusMove(Moves.TRICK_ROOM, Type.PSYCHIC, -1, 5, -1, -7, 4)
.attr(AddArenaTagAttr, ArenaTagType.TRICK_ROOM, 5, false, false, true) .attr(AddArenaTagAttr, ArenaTagType.TRICK_ROOM, 5, false, true)
.ignoresProtect() .ignoresProtect()
.target(MoveTarget.BOTH_SIDES), .target(MoveTarget.BOTH_SIDES),
new AttackMove(Moves.DRACO_METEOR, Type.DRAGON, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 4) new AttackMove(Moves.DRACO_METEOR, Type.DRAGON, MoveCategory.SPECIAL, 130, 90, 5, -1, 0, 4)