diff --git a/scripts/verify-flow.mjs b/scripts/verify-flow.mjs index 20fcecb..f3d0e53 100644 --- a/scripts/verify-flow.mjs +++ b/scripts/verify-flow.mjs @@ -533,7 +533,7 @@ try { await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'second-battle-yellow-turban-pursuit' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'second-battle-yellow-turban-pursuit' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-second-battle.png', fullPage: true }); @@ -605,7 +605,7 @@ try { await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'third-battle-guangzong-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'third-battle-guangzong-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-third-battle.png', fullPage: true }); @@ -674,7 +674,7 @@ try { await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fourth-battle-guangzong-camp' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fourth-battle-guangzong-camp' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fourth-battle.png', fullPage: true }); @@ -743,7 +743,7 @@ try { await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifth-battle-sishui-vanguard' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifth-battle-sishui-vanguard' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifth-battle.png', fullPage: true }); @@ -822,7 +822,7 @@ try { await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixth-battle-jieqiao-relief' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixth-battle-jieqiao-relief' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixth-battle.png', fullPage: true }); @@ -917,7 +917,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'seventh-battle-xuzhou-rescue' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'seventh-battle-xuzhou-rescue' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-seventh-battle.png', fullPage: true }); @@ -1009,7 +1009,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'eighth-battle-xiaopei-supply-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'eighth-battle-xiaopei-supply-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-eighth-battle.png', fullPage: true }); @@ -1089,7 +1089,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'ninth-battle-xuzhou-gate-night-raid' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'ninth-battle-xuzhou-gate-night-raid' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-ninth-battle.png', fullPage: true }); @@ -1170,7 +1170,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'tenth-battle-xuzhou-breakout' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'tenth-battle-xuzhou-breakout' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-tenth-battle.png', fullPage: true }); @@ -1244,7 +1244,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'eleventh-battle-xudu-refuge-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'eleventh-battle-xudu-refuge-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-eleventh-battle.png', fullPage: true }); @@ -1318,7 +1318,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twelfth-battle-xiapi-outer-siege' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twelfth-battle-xiapi-outer-siege' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twelfth-battle.png', fullPage: true }); @@ -1401,7 +1401,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirteenth-battle-xiapi-final' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirteenth-battle-xiapi-final' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirteenth-battle.png', fullPage: true }); @@ -1489,7 +1489,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fourteenth-battle-cao-break' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fourteenth-battle-cao-break' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fourteenth-battle.png', fullPage: true }); @@ -1564,7 +1564,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifteenth-battle-yuan-refuge-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifteenth-battle-yuan-refuge-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifteenth-battle.png', fullPage: true }); @@ -1666,7 +1666,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'sixteenth-battle-liu-biao-refuge' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'sixteenth-battle-liu-biao-refuge' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixteenth-battle.png', fullPage: true }); @@ -1777,7 +1777,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'seventeenth-battle-wolong-visit-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'seventeenth-battle-wolong-visit-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-seventeenth-battle.png', fullPage: true }); @@ -1900,7 +1900,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'eighteenth-battle-bowang-ambush' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'eighteenth-battle-bowang-ambush' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-eighteenth-battle.png', fullPage: true }); @@ -2058,7 +2058,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'nineteenth-battle-changban-refuge' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'nineteenth-battle-changban-refuge' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-nineteenth-battle.png', fullPage: true }); @@ -2193,7 +2193,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twentieth-battle-jiangdong-envoy' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twentieth-battle-jiangdong-envoy' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twentieth-battle.png', fullPage: true }); @@ -2329,7 +2329,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-first-battle-red-cliffs-vanguard' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-first-battle-red-cliffs-vanguard' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-first-battle.png', fullPage: true }); @@ -2466,7 +2466,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-second-battle-red-cliffs-fire' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-second-battle-red-cliffs-fire' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-second-battle.png', fullPage: true }); @@ -2605,7 +2605,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-third-battle-jingzhou-south-entry' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-third-battle-jingzhou-south-entry' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-third-battle.png', fullPage: true }); @@ -2746,7 +2746,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-fourth-battle-guiyang-persuasion' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-fourth-battle-guiyang-persuasion' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-fourth-battle.png', fullPage: true }); @@ -2886,7 +2886,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-fifth-battle-wuling-mountain-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-fifth-battle-wuling-mountain-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-fifth-battle.png', fullPage: true }); @@ -3028,7 +3028,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-sixth-battle-changsha-veteran' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-sixth-battle-changsha-veteran' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-sixth-battle.png', fullPage: true }); @@ -3179,7 +3179,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-seventh-battle-yizhou-relief-road' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-seventh-battle-yizhou-relief-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-seventh-battle.png', fullPage: true }); @@ -3322,7 +3322,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-eighth-battle-fu-pass-entry' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-eighth-battle-fu-pass-entry' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-eighth-battle.png', fullPage: true }); @@ -3467,7 +3467,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'twenty-ninth-battle-luo-outer-wall' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'twenty-ninth-battle-luo-outer-wall' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-twenty-ninth-battle.png', fullPage: true }); @@ -3616,7 +3616,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirtieth-battle-luofeng-ambush' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirtieth-battle-luofeng-ambush' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirtieth-battle.png', fullPage: true }); @@ -3760,7 +3760,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-first-battle-luo-main-gate' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-first-battle-luo-main-gate' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-first-battle.png', fullPage: true }); @@ -3915,7 +3915,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-second-battle-mianzhu-gate' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-second-battle-mianzhu-gate' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-second-battle.png', fullPage: true }); @@ -4066,7 +4066,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-third-battle-chengdu-surrender' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-third-battle-chengdu-surrender' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-third-battle.png', fullPage: true }); @@ -4218,7 +4218,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-fourth-battle-jiameng-pass' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-fourth-battle-jiameng-pass' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-fourth-battle.png', fullPage: true }); @@ -4375,7 +4375,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-fifth-battle-yangping-scout' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-fifth-battle-yangping-scout' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-fifth-battle.png', fullPage: true }); @@ -4529,7 +4529,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-sixth-battle-dingjun-vanguard' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-sixth-battle.png', fullPage: true }); @@ -4684,7 +4684,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-seventh-battle-hanzhong-decisive' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-seventh-battle-hanzhong-decisive' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-seventh-battle.png', fullPage: true }); @@ -4949,7 +4949,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-eighth-battle-jing-defense' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-eighth-battle-jing-defense' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-eighth-battle.png', fullPage: true }); @@ -5099,7 +5099,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'thirty-ninth-battle-fan-castle-vanguard' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'thirty-ninth-battle-fan-castle-vanguard' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-thirty-ninth-battle.png', fullPage: true }); @@ -5249,7 +5249,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fortieth-battle-han-river-flood' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fortieth-battle-han-river-flood' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fortieth-battle.png', fullPage: true }); @@ -5400,7 +5400,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-first-battle-fan-castle-siege' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-first-battle-fan-castle-siege' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-first-battle.png', fullPage: true }); @@ -5555,7 +5555,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-second-battle-jing-rear-crisis' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-second-battle-jing-rear-crisis' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-second-battle.png', fullPage: true }); @@ -5710,7 +5710,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-third-battle-gongan-collapse' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-third-battle-gongan-collapse' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-third-battle.png', fullPage: true }); @@ -5864,7 +5864,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-fourth-battle-maicheng-isolation' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-fourth-battle-maicheng-isolation' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-fourth-battle.png', fullPage: true }); @@ -6018,7 +6018,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-fifth-battle-yiling-vanguard' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-fifth-battle-yiling-vanguard' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-fifth-battle.png', fullPage: true }); @@ -6172,7 +6172,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-sixth-battle-yiling-fire' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-sixth-battle-yiling-fire' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-sixth-battle.png', fullPage: true }); @@ -6392,7 +6392,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-seventh-battle-nanzhong-stabilization' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-seventh-battle-nanzhong-stabilization' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-seventh-battle.png', fullPage: true }); @@ -6550,7 +6550,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-eighth-battle-meng-huo-main-force' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-eighth-battle-meng-huo-main-force' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-eighth-battle.png', fullPage: true }); @@ -6709,7 +6709,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'forty-ninth-battle-meng-huo-second-capture' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'forty-ninth-battle-meng-huo-second-capture' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-forty-ninth-battle.png', fullPage: true }); @@ -6870,7 +6870,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fiftieth-battle-meng-huo-third-capture' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fiftieth-battle-meng-huo-third-capture' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fiftieth-battle.png', fullPage: true }); @@ -7032,7 +7032,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-first-battle-meng-huo-fourth-capture' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-first-battle-meng-huo-fourth-capture' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-first-battle.png', fullPage: true }); @@ -7195,7 +7195,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-second-battle-meng-huo-fifth-capture' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-second-battle-meng-huo-fifth-capture' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-second-battle.png', fullPage: true }); @@ -7357,7 +7357,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-third-battle-meng-huo-sixth-capture' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-third-battle-meng-huo-sixth-capture' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-third-battle.png', fullPage: true }); @@ -7519,7 +7519,7 @@ try { } await page.waitForFunction(() => { const state = window.__HEROS_DEBUG__?.battle(); - return state?.scene === 'BattleScene' && state?.battleId === 'fifty-fourth-battle-meng-huo-final-capture' && state?.battleOutcome === null && state?.phase === 'idle'; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-fourth-battle-meng-huo-final-capture' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-fourth-battle.png', fullPage: true }); @@ -7737,7 +7737,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-fifth-battle-northern-qishan-road' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-fifth-battle.png', fullPage: true }); @@ -7884,7 +7884,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-sixth-battle-tianshui-advance' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-sixth-battle.png', fullPage: true }); @@ -8033,7 +8033,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-seventh-battle-jieting-crisis' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-seventh-battle.png', fullPage: true }); @@ -8183,7 +8183,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-eighth-battle-qishan-retreat' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-eighth-battle.png', fullPage: true }); @@ -8331,7 +8331,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'fifty-ninth-battle-chencang-siege' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-fifty-ninth-battle.png', fullPage: true }); @@ -8482,7 +8482,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixtieth-battle-wudu-yinping' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixtieth-battle.png', fullPage: true }); @@ -8638,7 +8638,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-first-battle-hanzhong-rain-defense' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixty-first-battle.png', fullPage: true }); @@ -8795,7 +8795,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-second-battle-qishan-renewed-offensive' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixty-second-battle.png', fullPage: true }); @@ -8978,7 +8978,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-third-battle-lucheng-pursuit' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixty-third-battle.png', fullPage: true }); @@ -9163,7 +9163,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-fourth-battle-weishui-camps' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixty-fourth-battle.png', fullPage: true }); @@ -9355,7 +9355,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-fifth-battle-weishui-northbank' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixty-fifth-battle.png', fullPage: true }); @@ -9498,7 +9498,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' && state?.mapBackgroundReady === true; + return state?.scene === 'BattleScene' && state?.battleId === 'sixty-sixth-battle-wuzhang-final' && state?.battleOutcome === null && state?.phase === 'idle' && state?.mapBackgroundReady === true && state?.resultVisible === false; }); await page.screenshot({ path: 'dist/verification-sixty-sixth-battle.png', fullPage: true }); diff --git a/src/game/scenes/BattleScene.ts b/src/game/scenes/BattleScene.ts index 62c58c0..d4e1f24 100644 --- a/src/game/scenes/BattleScene.ts +++ b/src/game/scenes/BattleScene.ts @@ -2862,6 +2862,7 @@ export class BattleScene extends Phaser.Scene { } create() { + this.hideBattleResult(); const campaign = getCampaignState(); this.resetBattleData(campaign); if (campaign.step === 'new' || campaign.step === 'prologue' || campaign.step === 'first-battle') { diff --git a/src/game/scenes/CampScene.ts b/src/game/scenes/CampScene.ts index 7f94291..421ca36 100644 --- a/src/game/scenes/CampScene.ts +++ b/src/game/scenes/CampScene.ts @@ -11286,7 +11286,7 @@ export class CampScene extends Phaser.Scene { this.trackSortie( this.add.text(x + 18, y + 14, `출전 무장 선택 ${selectedCount}/${maxUnits}`, this.textStyle(18, '#f2e3bf', true)) ).setDepth(depth + 1); - this.trackSortie(this.add.text(x + width - 18, y + 17, '클릭해서 분석 및 출전/대기 전환', this.textStyle(12, '#9fb0bf'))).setOrigin(1, 0).setDepth(depth + 1); + this.trackSortie(this.add.text(x + width - 18, y + 17, '클릭: 분석/출전 전환', this.textStyle(11, '#9fb0bf'))).setOrigin(1, 0).setDepth(depth + 1); visibleAllies.forEach((unit, index) => { const rowY = y + listTopOffset + index * rowGap; @@ -11839,14 +11839,20 @@ export class CampScene extends Phaser.Scene { const selectedPreview = selectedUnits.slice(0, 3).map((unit) => unit.name).join(', '); const selectedSummary = selectedUnits.length > 0 ? `${selectedUnits.length}명 (${selectedPreview}${selectedUnits.length > 3 ? ' 외' : ''})` : '없음'; const inventorySummary = - inventoryLabels.length > 0 ? `${inventoryLabels.slice(0, 4).join(', ')}${inventoryLabels.length > 4 ? ' 외' : ''}` : '없음'; + inventoryLabels.length > 0 ? `${inventoryLabels.slice(0, 3).join(', ')}${inventoryLabels.length > 3 ? ' 외' : ''}` : '없음'; const reward = this.currentSortieFlow().rewardHint; - this.trackSortie(this.add.text(x + 16, y + 10, reward, this.textStyle(13, '#f2e3bf', true))).setDepth(depth + 1); + const readyLine = [ + `대화 ${completedDialogues}/${availableDialogues.length}`, + `방문 ${completedVisits}/${availableVisits.length}`, + `출전 ${selectedSummary}`, + `보유 ${inventorySummary}` + ].join(' · '); + this.trackSortie(this.add.text(x + 16, y + 9, this.compactText(reward, 32), this.textStyle(13, '#f2e3bf', true))).setDepth(depth + 1); this.trackSortie( this.add.text( x + 16, y + 30, - `현재 준비: 대화 ${completedDialogues}/${availableDialogues.length} · 방문 ${completedVisits}/${availableVisits.length} · 출전 ${selectedSummary} · 보유 ${inventorySummary}`, + this.compactText(`현재 준비: ${readyLine}`, 48), this.textStyle(12, '#d4dce6') ) ).setDepth(depth + 1);