Add campaign ending epilogue
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user