Fix returns

This commit is contained in:
andrebastosdias 2026-03-18 23:25:23 +00:00
parent 7e3c046868
commit 53ab07d2fc
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
/**

View File

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