Polish early campaign flow

This commit is contained in:
2026-07-04 02:56:52 +09:00
parent 29021bc18d
commit d95954519a
3 changed files with 121 additions and 13 deletions

View File

@@ -12208,7 +12208,7 @@ export class CampScene extends Phaser.Scene {
scenario.units,
this.selectedSortieUnitIds,
this.sortieFormationAssignments,
(unit) => this.defaultSortieFormationRole(unit),
(unit) => this.sortieRecommendation(unit.id, scenario)?.role ?? this.defaultSortieFormationRole(unit),
this.nextSortieRule(scenario).deploymentSlots
);
}
@@ -12326,8 +12326,8 @@ export class CampScene extends Phaser.Scene {
};
}
private sortieFormationRole(unit: UnitData): SortieFormationRole {
return this.sortieFormationAssignments[unit.id] ?? this.defaultSortieFormationRole(unit);
private sortieFormationRole(unit: UnitData, scenario = this.nextSortieScenario()): SortieFormationRole {
return this.sortieFormationAssignments[unit.id] ?? this.sortieRecommendation(unit.id, scenario)?.role ?? this.defaultSortieFormationRole(unit);
}
private defaultSortieFormationRole(unit: UnitData): SortieFormationRole {
@@ -12559,6 +12559,14 @@ export class CampScene extends Phaser.Scene {
const selected = this.selectedSortieUnits();
const recommendedClassLine = this.sortieRecommendedClassLine();
const recommendedClassComplete = this.coversRecommendedClasses(selected);
const roleCounts = selected.reduce(
(counts, unit) => {
counts[this.sortieFormationRole(unit)] += 1;
return counts;
},
{ front: 0, flank: 0, support: 0, reserve: 0 } as Record<SortieFormationRole, number>
);
const rolesReady = selected.length <= 1 || (roleCounts.front > 0 && roleCounts.flank > 0 && roleCounts.support > 0);
return [
{
label: requiredLabel,
@@ -12580,6 +12588,11 @@ export class CampScene extends Phaser.Scene {
complete: recommendedClassComplete,
detail: recommendedClassLine
},
{
label: '전열 역할',
complete: rolesReady,
detail: `전열 ${roleCounts.front} · 돌파 ${roleCounts.flank} · 후원 ${roleCounts.support}`
},
{
label: '전투 보급',
complete: assignedSupplyCount > 0 || supplyCount > 0,