From 53ab07d2fc52d1d89d32a5844ff1eb334a91d973 Mon Sep 17 00:00:00 2001 From: andrebastosdias Date: Wed, 18 Mar 2026 23:25:23 +0000 Subject: [PATCH] Fix returns --- sim/battle.ts | 5 +++-- sim/side.ts | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sim/battle.ts b/sim/battle.ts index 154f3a80e5..b12528966f 100644 --- a/sim/battle.ts +++ b/sim/battle.ts @@ -3038,12 +3038,11 @@ export class Battle { } if (side.choice.cantUndo) { - side.emitChoiceError( + return side.emitChoiceError( this.supportCancel ? `Can't undo: A trapping/disabling effect would cause undo to leak information` : `Can't undo: This battle doesn't support undoing choices` ); - return; } let updated = false; @@ -3060,6 +3059,8 @@ export class Battle { side.clearChoice(); if (updated) side.emitRequest(side.activeRequest!, true); + + return true; } /** diff --git a/sim/side.ts b/sim/side.ts index 8393bbc725..621316b181 100644 --- a/sim/side.ts +++ b/sim/side.ts @@ -1079,12 +1079,11 @@ export class Side { } if (this.choice.cantUndo) { - this.emitChoiceError( + return this.emitChoiceError( this.battle.supportCancel ? `Can't undo: A trapping/disabling effect would cause undo to leak information` : `Can't undo: This battle doesn't support undoing choices` ); - return; } this.clearChoice();