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();