Connect final battle to ending epilogue

This commit is contained in:
2026-07-05 02:02:32 +09:00
parent 06359721fe
commit ae25581566

View File

@@ -1,7 +1,7 @@
import Phaser from 'phaser';
import { soundDirector } from '../audio/SoundDirector';
import { battleMapAssets } from '../data/battleMapAssets';
import { firstBattleVictoryPages, type BattleBond, type UnitData, type UnitStats } from '../data/scenario';
import { endingEpiloguePages, firstBattleVictoryPages, type BattleBond, type UnitData, type UnitStats } from '../data/scenario';
import {
defaultBattleScenario,
getBattleScenario,
@@ -8676,8 +8676,17 @@ export class BattleScene extends Phaser.Scene {
this.resultSettlementText.setDepth(depth + 2);
if (outcome === 'victory') {
this.addResultButton('군영으로', left + panelWidth - 422, top + 612, 132, () => {
const isFinalBattle = battleScenario.id === 'sixty-sixth-battle-wuzhang-final';
this.addResultButton(isFinalBattle ? '에필로그로' : '군영으로', left + panelWidth - 422, top + 612, 132, () => {
soundDirector.playSelect();
if (isFinalBattle) {
markCampaignStep('ending-complete');
void startLazyScene(this, 'StoryScene', {
pages: [...battleScenario.victoryPages, ...endingEpiloguePages],
nextScene: 'EndingScene'
});
return;
}
if (battleScenario.id === 'first-battle-zhuo-commandery') {
void startLazyScene(this, 'StoryScene', {
pages: firstBattleVictoryPages,