From 71bf6ffde98059d9a2e41eb19a7bf81db79fa485 Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sun, 5 Jul 2026 03:25:40 +0900 Subject: [PATCH] Let escape cancel battle command flow --- src/game/scenes/BattleScene.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/game/scenes/BattleScene.ts b/src/game/scenes/BattleScene.ts index ca18f88..c782cd1 100644 --- a/src/game/scenes/BattleScene.ts +++ b/src/game/scenes/BattleScene.ts @@ -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) {