diff --git a/scripts/verify-flow.mjs b/scripts/verify-flow.mjs index 24c8b19..c9eb547 100644 --- a/scripts/verify-flow.mjs +++ b/scripts/verify-flow.mjs @@ -4504,7 +4504,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-sixth-battle-dingjun-vanguard' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-sixth-battle-dingjun-vanguard' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-thirty-sixth-battle.png', fullPage: true }); @@ -7712,7 +7712,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-fifth-battle-northern-qishan-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-fifth-battle-northern-qishan-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-fifty-fifth-battle.png', fullPage: true }); @@ -7859,7 +7859,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-sixth-battle-tianshui-advance' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-sixth-battle-tianshui-advance' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-fifty-sixth-battle.png', fullPage: true }); @@ -8008,7 +8008,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-seventh-battle-jieting-crisis' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-seventh-battle-jieting-crisis' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-fifty-seventh-battle.png', fullPage: true }); @@ -8158,7 +8158,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-eighth-battle-qishan-retreat' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-eighth-battle-qishan-retreat' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-fifty-eighth-battle.png', fullPage: true }); @@ -8306,7 +8306,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-ninth-battle-chencang-siege' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-ninth-battle-chencang-siege' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-fifty-ninth-battle.png', fullPage: true }); @@ -8457,7 +8457,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixtieth-battle-wudu-yinping' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixtieth-battle-wudu-yinping' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixtieth-battle.png', fullPage: true }); @@ -8613,7 +8613,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixty-first-battle-hanzhong-rain-defense' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-first-battle-hanzhong-rain-defense' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixty-first-battle.png', fullPage: true }); @@ -8770,7 +8770,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixty-second-battle-qishan-renewed-offensive' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-second-battle-qishan-renewed-offensive' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixty-second-battle.png', fullPage: true }); @@ -8953,7 +8953,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixty-third-battle-lucheng-pursuit' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-third-battle-lucheng-pursuit' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixty-third-battle.png', fullPage: true }); @@ -9138,7 +9138,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixty-fourth-battle-weishui-camps' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-fourth-battle-weishui-camps' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixty-fourth-battle.png', fullPage: true }); @@ -9330,7 +9330,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixty-fifth-battle-weishui-northbank' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-fifth-battle-weishui-northbank' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixty-fifth-battle.png', fullPage: true }); @@ -9473,7 +9473,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixty-sixth-battle-wuzhang-final' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-sixth-battle-wuzhang-final' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true; }); await page.screenshot({ path: 'dist/verification-sixty-sixth-battle.png', fullPage: true }); @@ -9556,7 +9556,12 @@ try { }); await page.waitForFunction(() => { const story = window.__HEROS_DEBUG__?.scene('StoryScene')?.getDebugState?.(); - return story?.currentPageId === 'sixty-sixth-victory-wuzhang-held' && story?.backgroundReady === true; + return ( + story?.currentPageId === 'sixty-sixth-victory-wuzhang-held' && + story?.ready === true && + story?.backgroundReady === true && + story?.activeTexture === story?.background + ); }); await page.screenshot({ path: 'dist/verification-ending-epilogue-story.png', fullPage: true }); await page.evaluate(async () => { @@ -9575,8 +9580,10 @@ try { return ( story?.currentPageId === 'ending-wuzhang-council' && story?.requestedBackground === 'story-wuzhang-jiangwei-inheritance' && + story?.ready === true && story?.backgroundReady === true && - story?.background?.startsWith('story-wuzhang-jiangwei-inheritance') + story?.background?.startsWith('story-wuzhang-jiangwei-inheritance') && + story?.activeTexture === story?.background ); }); await page.screenshot({ path: 'dist/verification-wuzhang-inheritance-story.png', fullPage: true }); diff --git a/src/game/data/battles.ts b/src/game/data/battles.ts index dabcb5b..f5bb87f 100644 --- a/src/game/data/battles.ts +++ b/src/game/data/battles.ts @@ -3896,7 +3896,7 @@ export const fiftyEighthBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 98', '상처약 82', '군주 40', '기산 퇴각 지도 1', '강유 첫 출전 기록 1'], + itemRewards: ['콩 98', '상처약 82', '탁주 40', '기산 퇴각 지도 1', '강유 첫 출전 기록 1'], victoryPages: fiftyEighthBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -3977,7 +3977,7 @@ export const fiftyNinthBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 104', '상처약 86', '군주 42', '진창 공성 장부 1', '왕쌍 추격 기록 1'], + itemRewards: ['콩 104', '상처약 86', '탁주 42', '진창 공성 장부 1', '왕쌍 추격 기록 1'], victoryPages: fiftyNinthBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4058,7 +4058,7 @@ export const sixtiethBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 110', '상처약 90', '군주 44', '무도·음평 장부 1', '곽회 구원로 기록 1'], + itemRewards: ['콩 110', '상처약 90', '탁주 44', '무도·음평 장부 1', '곽회 구원로 기록 1'], victoryPages: sixtiethBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4139,7 +4139,7 @@ export const sixtyFirstBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 118', '상처약 94', '군주 46', '한중 우로 장부 1', '조진 역공 기록 1'], + itemRewards: ['콩 118', '상처약 94', '탁주 46', '한중 우로 장부 1', '조진 역공 기록 1'], victoryPages: sixtyFirstBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4206,7 +4206,7 @@ export const sixtySecondBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 126', '상처약 98', '군주 48', '기산 재출정 장부 1', '노성 지연선 기록 1'], + itemRewards: ['콩 126', '상처약 98', '탁주 48', '기산 재출정 장부 1', '노성 지연선 기록 1'], victoryPages: sixtySecondBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4273,7 +4273,7 @@ export const sixtyThirdBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 132', '상처약 102', '군주 50', '노성 추격 장부 1', '회수 표식 기록 1'], + itemRewards: ['콩 132', '상처약 102', '탁주 50', '노성 추격 장부 1', '회수 표식 기록 1'], victoryPages: sixtyThirdBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4340,7 +4340,7 @@ export const sixtyFourthBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 138', '상처약 106', '군주 52', '위수 진영 장부 1', '강안 봉화 기록 1'], + itemRewards: ['콩 138', '상처약 106', '탁주 52', '위수 진영 장부 1', '강안 봉화 기록 1'], victoryPages: sixtyFourthBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4407,7 +4407,7 @@ export const sixtyFifthBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 144', '상처약 110', '군주 54', '북안 전진 장부 1', '위수 재추격 기록 1'], + itemRewards: ['콩 144', '상처약 110', '탁주 54', '북안 전진 장부 1', '위수 재추격 기록 1'], victoryPages: sixtyFifthBattleVictoryPages, nextCampScene: 'CampScene' }; @@ -4474,7 +4474,7 @@ export const sixtySixthBattleScenario: BattleScenarioDefinition = { } ], defeatConditions: [{ kind: 'unit-defeated', unitId: 'zhuge-liang' }], - itemRewards: ['금 150', '상처약 114', '군주 56', '오장원 귀환 장부 1', '강유 계승 지도 1'], + itemRewards: ['콩 150', '상처약 114', '탁주 56', '오장원 귀환 장부 1', '강유 계승 지도 1'], victoryPages: sixtySixthBattleVictoryPages, nextCampScene: 'CampScene' };