Add campaign ending epilogue

This commit is contained in:
2026-06-25 03:47:41 +09:00
parent e97ec0ada2
commit cb40be9940
8 changed files with 298 additions and 25 deletions

View File

@@ -10954,6 +10954,11 @@ export class CampScene extends Phaser.Scene {
});
this.addCommandButton('다음 이야기', 1160, 38, 142, () => {
soundDirector.playSelect();
const flow = this.currentSortieFlow();
if (this.isFinalEpilogueFlow(flow)) {
this.startVictoryStory();
return;
}
this.showSortiePrep();
});
}
@@ -11795,7 +11800,7 @@ export class CampScene extends Phaser.Scene {
private startVictoryStory() {
const flow = this.currentSortieFlow();
if (!this.ensureSortieSelectionSaved()) {
if (!this.isFinalEpilogueFlow(flow) && !this.ensureSortieSelectionSaved()) {
const availableIds = new Set(this.sortieAllies().map((unit) => unit.id));
const requiredNames = [...this.requiredSortieUnitIdsFor()]
.filter((unitId) => availableIds.has(unitId))
@@ -11819,7 +11824,7 @@ export class CampScene extends Phaser.Scene {
this.campaign = getCampaignState();
this.scene.start('StoryScene', {
pages: flow.pages,
nextScene: 'CampScene'
nextScene: flow.campaignStep === 'ending-complete' ? 'EndingScene' : 'CampScene'
});
return;
}
@@ -11850,6 +11855,10 @@ export class CampScene extends Phaser.Scene {
});
}
private isFinalEpilogueFlow(flow = this.currentSortieFlow()) {
return flow.campaignStep === 'ending-complete' && !flow.nextBattleId;
}
private hideSortiePrep() {
this.sortieObjects.forEach((object) => object.destroy());
this.sortieObjects = [];