Let escape clear deployment selection

This commit is contained in:
2026-07-05 04:01:05 +09:00
parent 7b3d3abdd6
commit d4da4576b6

View File

@@ -3189,6 +3189,11 @@ export class BattleScene extends Phaser.Scene {
return;
}
if (this.cancelDeploymentSelection()) {
soundDirector.playSelect();
return;
}
if (this.cancelAttackTargeting()) {
return;
}
@@ -5463,6 +5468,23 @@ export class BattleScene extends Phaser.Scene {
: undefined;
}
private cancelDeploymentSelection(forceNotice = false) {
if (this.phase !== 'deployment') {
return false;
}
if (!this.deploymentSelectedUnitId && !forceNotice) {
return false;
}
this.deploymentSelectedUnitId = undefined;
this.deploymentNotice = '선택을 해제했습니다. 배치할 장수를 다시 선택하세요.';
this.renderDeploymentMap();
this.renderDeploymentPanel();
this.clearPointerFeedback();
return true;
}
private handleDeploymentUnitClick(unit: UnitData) {
if (this.phase !== 'deployment') {
return;
@@ -10837,11 +10859,7 @@ export class BattleScene extends Phaser.Scene {
}
if (this.phase === 'deployment') {
this.deploymentSelectedUnitId = undefined;
this.deploymentNotice = '선택을 해제했습니다. 배치할 장수를 다시 선택하세요.';
this.renderDeploymentMap();
this.renderDeploymentPanel();
this.clearPointerFeedback();
this.cancelDeploymentSelection(true);
return;
}