Let escape cancel battle command flow

This commit is contained in:
2026-07-05 03:25:40 +09:00
parent a4bb358c2f
commit 71bf6ffde9

View File

@@ -3182,7 +3182,21 @@ export class BattleScene extends Phaser.Scene {
return;
}
this.cancelAttackTargeting();
if (this.cancelAttackTargeting()) {
return;
}
if (this.cancelPendingMove()) {
return;
}
if (this.commandMenuObjects.length > 0) {
soundDirector.playSelect();
this.hideCommandMenu();
this.phase = 'idle';
this.selectedUnit = undefined;
this.refreshUnitLegibilityStyles();
}
});
this.input.keyboard?.on('keydown-SPACE', (event: KeyboardEvent) => {
if (this.activeFaction !== 'enemy' || this.fastForwardHeld) {