Add Gongan collapse chapter

This commit is contained in:
2026-06-23 18:01:03 +09:00
parent 8591fd7fa3
commit dd6d85ffe9
11 changed files with 908 additions and 50 deletions

View File

@@ -1739,7 +1739,7 @@ try {
if (
progressTabState?.activeTab !== 'progress' ||
progressTabState.campaignProgress?.completedKnown !== 17 ||
progressTabState.campaignProgress?.totalKnown !== 42 ||
progressTabState.campaignProgress?.totalKnown !== 43 ||
progressTabState.campaignProgress?.activeChapter?.title !== '적벽대전' ||
progressTabState.campaignProgress?.latestBattleTitle !== '융중 방문로' ||
progressTabState.campaignProgress?.nextBattleTitle !== '박망파 매복전'
@@ -1891,7 +1891,7 @@ try {
if (
postBowangProgressState?.activeTab !== 'progress' ||
postBowangProgressState.campaignProgress?.completedKnown !== 18 ||
postBowangProgressState.campaignProgress?.totalKnown !== 42 ||
postBowangProgressState.campaignProgress?.totalKnown !== 43 ||
postBowangProgressState.campaignProgress?.activeChapter?.title !== '적벽대전' ||
postBowangProgressState.campaignProgress?.latestBattleTitle !== '박망파 매복전' ||
postBowangProgressState.campaignProgress?.nextBattleTitle !== '장판파 피난로'
@@ -2029,7 +2029,7 @@ try {
if (
postChangbanProgressState?.activeTab !== 'progress' ||
postChangbanProgressState.campaignProgress?.completedKnown !== 19 ||
postChangbanProgressState.campaignProgress?.totalKnown !== 42 ||
postChangbanProgressState.campaignProgress?.totalKnown !== 43 ||
postChangbanProgressState.campaignProgress?.activeChapter?.title !== '적벽대전' ||
postChangbanProgressState.campaignProgress?.latestBattleTitle !== '장판파 피난로' ||
postChangbanProgressState.campaignProgress?.nextBattleTitle !== '강동 사절로'
@@ -2167,7 +2167,7 @@ try {
if (
postJiangdongProgressState?.activeTab !== 'progress' ||
postJiangdongProgressState.campaignProgress?.completedKnown !== 20 ||
postJiangdongProgressState.campaignProgress?.totalKnown !== 42 ||
postJiangdongProgressState.campaignProgress?.totalKnown !== 43 ||
postJiangdongProgressState.campaignProgress?.activeChapter?.title !== '적벽대전' ||
postJiangdongProgressState.campaignProgress?.latestBattleTitle !== '강동 사절로' ||
postJiangdongProgressState.campaignProgress?.nextBattleTitle !== '적벽 전초전'
@@ -2307,7 +2307,7 @@ try {
if (
postRedCliffsProgressState?.activeTab !== 'progress' ||
postRedCliffsProgressState.campaignProgress?.completedKnown !== 21 ||
postRedCliffsProgressState.campaignProgress?.totalKnown !== 42 ||
postRedCliffsProgressState.campaignProgress?.totalKnown !== 43 ||
postRedCliffsProgressState.campaignProgress?.activeChapter?.title !== '적벽대전' ||
postRedCliffsProgressState.campaignProgress?.latestBattleTitle !== '적벽 전초전' ||
postRedCliffsProgressState.campaignProgress?.nextBattleTitle !== '적벽 화공전'
@@ -2447,7 +2447,7 @@ try {
if (
postFireAttackProgressState?.activeTab !== 'progress' ||
postFireAttackProgressState.campaignProgress?.completedKnown !== 22 ||
postFireAttackProgressState.campaignProgress?.totalKnown !== 42 ||
postFireAttackProgressState.campaignProgress?.totalKnown !== 43 ||
postFireAttackProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postFireAttackProgressState.campaignProgress?.latestBattleTitle !== '적벽 화공전' ||
postFireAttackProgressState.campaignProgress?.nextBattleTitle !== '형주 남부 진입전'
@@ -2590,7 +2590,7 @@ try {
if (
postJingzhouProgressState?.activeTab !== 'progress' ||
postJingzhouProgressState.campaignProgress?.completedKnown !== 23 ||
postJingzhouProgressState.campaignProgress?.totalKnown !== 42 ||
postJingzhouProgressState.campaignProgress?.totalKnown !== 43 ||
postJingzhouProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postJingzhouProgressState.campaignProgress?.latestBattleTitle !== '형주 남부 진입전' ||
postJingzhouProgressState.campaignProgress?.nextBattleTitle !== '계양 설득전'
@@ -2732,7 +2732,7 @@ try {
if (
postGuiyangProgressState?.activeTab !== 'progress' ||
postGuiyangProgressState.campaignProgress?.completedKnown !== 24 ||
postGuiyangProgressState.campaignProgress?.totalKnown !== 42 ||
postGuiyangProgressState.campaignProgress?.totalKnown !== 43 ||
postGuiyangProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postGuiyangProgressState.campaignProgress?.latestBattleTitle !== '계양 설득전' ||
postGuiyangProgressState.campaignProgress?.nextBattleTitle !== '무릉 산길 확보전'
@@ -2875,7 +2875,7 @@ try {
if (
postWulingProgressState?.activeTab !== 'progress' ||
postWulingProgressState.campaignProgress?.completedKnown !== 25 ||
postWulingProgressState.campaignProgress?.totalKnown !== 42 ||
postWulingProgressState.campaignProgress?.totalKnown !== 43 ||
postWulingProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postWulingProgressState.campaignProgress?.latestBattleTitle !== '무릉 산길 확보전' ||
postWulingProgressState.campaignProgress?.nextBattleTitle !== '장사 노장 대면전'
@@ -3024,7 +3024,7 @@ try {
if (
postChangshaProgressState?.activeTab !== 'progress' ||
postChangshaProgressState.campaignProgress?.completedKnown !== 26 ||
postChangshaProgressState.campaignProgress?.totalKnown !== 42 ||
postChangshaProgressState.campaignProgress?.totalKnown !== 43 ||
postChangshaProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postChangshaProgressState.campaignProgress?.latestBattleTitle !== '장사 노장 대면전' ||
postChangshaProgressState.campaignProgress?.nextBattleTitle !== '익주 원군로'
@@ -3169,7 +3169,7 @@ try {
if (
postYizhouProgressState?.activeTab !== 'progress' ||
postYizhouProgressState.campaignProgress?.completedKnown !== 27 ||
postYizhouProgressState.campaignProgress?.totalKnown !== 42 ||
postYizhouProgressState.campaignProgress?.totalKnown !== 43 ||
postYizhouProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postYizhouProgressState.campaignProgress?.latestBattleTitle !== '익주 원군로' ||
postYizhouProgressState.campaignProgress?.nextBattleTitle !== '부수관 진입전'
@@ -3316,7 +3316,7 @@ try {
if (
postFuPassProgressState?.activeTab !== 'progress' ||
postFuPassProgressState.campaignProgress?.completedKnown !== 28 ||
postFuPassProgressState.campaignProgress?.totalKnown !== 42 ||
postFuPassProgressState.campaignProgress?.totalKnown !== 43 ||
postFuPassProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postFuPassProgressState.campaignProgress?.latestBattleTitle !== '부수관 진입전' ||
postFuPassProgressState.campaignProgress?.nextBattleTitle !== '낙성 외곽전'
@@ -3465,7 +3465,7 @@ try {
if (
postLuoProgressState?.activeTab !== 'progress' ||
postLuoProgressState.campaignProgress?.completedKnown !== 29 ||
postLuoProgressState.campaignProgress?.totalKnown !== 42 ||
postLuoProgressState.campaignProgress?.totalKnown !== 43 ||
postLuoProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postLuoProgressState.campaignProgress?.latestBattleTitle !== '낙성 외곽전' ||
postLuoProgressState.campaignProgress?.nextBattleTitle !== '낙봉파 매복전'
@@ -3611,7 +3611,7 @@ try {
if (
postLuofengProgressState?.activeTab !== 'progress' ||
postLuofengProgressState.campaignProgress?.completedKnown !== 30 ||
postLuofengProgressState.campaignProgress?.totalKnown !== 42 ||
postLuofengProgressState.campaignProgress?.totalKnown !== 43 ||
postLuofengProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postLuofengProgressState.campaignProgress?.latestBattleTitle !== '낙봉파 매복전' ||
postLuofengProgressState.campaignProgress?.nextBattleTitle !== '낙성 본성 공략'
@@ -3763,7 +3763,7 @@ try {
if (
postLuoMainProgressState?.activeTab !== 'progress' ||
postLuoMainProgressState.campaignProgress?.completedKnown !== 31 ||
postLuoMainProgressState.campaignProgress?.totalKnown !== 42 ||
postLuoMainProgressState.campaignProgress?.totalKnown !== 43 ||
postLuoMainProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postLuoMainProgressState.campaignProgress?.latestBattleTitle !== '낙성 본성 공략' ||
postLuoMainProgressState.campaignProgress?.nextBattleTitle !== '면죽관 압박전'
@@ -3916,7 +3916,7 @@ try {
if (
postMianzhuProgressState?.activeTab !== 'progress' ||
postMianzhuProgressState.campaignProgress?.completedKnown !== 32 ||
postMianzhuProgressState.campaignProgress?.totalKnown !== 42 ||
postMianzhuProgressState.campaignProgress?.totalKnown !== 43 ||
postMianzhuProgressState.campaignProgress?.activeChapter?.title !== '형주·익주 확보' ||
postMianzhuProgressState.campaignProgress?.latestBattleTitle !== '면죽관 압박전' ||
postMianzhuProgressState.campaignProgress?.nextBattleTitle !== '성도 항복 권고전'
@@ -4070,7 +4070,7 @@ try {
if (
postChengduProgressState?.activeTab !== 'progress' ||
postChengduProgressState.campaignProgress?.completedKnown !== 33 ||
postChengduProgressState.campaignProgress?.totalKnown !== 42 ||
postChengduProgressState.campaignProgress?.totalKnown !== 43 ||
postChengduProgressState.campaignProgress?.activeChapter?.title !== '촉한 건국' ||
postChengduProgressState.campaignProgress?.latestBattleTitle !== '성도 항복 권고전' ||
postChengduProgressState.campaignProgress?.nextBattleTitle !== '가맹관 마초 대면전'
@@ -4225,7 +4225,7 @@ try {
if (
postJiamengProgressState?.activeTab !== 'progress' ||
postJiamengProgressState.campaignProgress?.completedKnown !== 34 ||
postJiamengProgressState.campaignProgress?.totalKnown !== 42 ||
postJiamengProgressState.campaignProgress?.totalKnown !== 43 ||
postJiamengProgressState.campaignProgress?.activeChapter?.title !== '촉한 건국' ||
postJiamengProgressState.campaignProgress?.latestBattleTitle !== '가맹관 마초 대면전' ||
postJiamengProgressState.campaignProgress?.nextBattleTitle !== '양평관 정찰전'
@@ -4381,7 +4381,7 @@ try {
if (
postYangpingProgressState?.activeTab !== 'progress' ||
postYangpingProgressState.campaignProgress?.completedKnown !== 35 ||
postYangpingProgressState.campaignProgress?.totalKnown !== 42 ||
postYangpingProgressState.campaignProgress?.totalKnown !== 43 ||
postYangpingProgressState.campaignProgress?.activeChapter?.title !== '촉한 건국' ||
postYangpingProgressState.campaignProgress?.latestBattleTitle !== '양평관 정찰전' ||
postYangpingProgressState.campaignProgress?.nextBattleTitle !== '정군산 전초전'
@@ -4538,7 +4538,7 @@ try {
if (
postDingjunProgressState?.activeTab !== 'progress' ||
postDingjunProgressState.campaignProgress?.completedKnown !== 36 ||
postDingjunProgressState.campaignProgress?.totalKnown !== 42 ||
postDingjunProgressState.campaignProgress?.totalKnown !== 43 ||
postDingjunProgressState.campaignProgress?.activeChapter?.title !== '촉한 건국' ||
postDingjunProgressState.campaignProgress?.latestBattleTitle !== '정군산 전초전' ||
postDingjunProgressState.campaignProgress?.nextBattleTitle !== '한중 결전'
@@ -4691,7 +4691,7 @@ try {
if (
postHanzhongProgressState?.activeTab !== 'progress' ||
postHanzhongProgressState.campaignProgress?.completedKnown !== 37 ||
postHanzhongProgressState.campaignProgress?.totalKnown !== 42 ||
postHanzhongProgressState.campaignProgress?.totalKnown !== 43 ||
postHanzhongProgressState.campaignProgress?.activeChapter?.title !== '촉한 건국' ||
postHanzhongProgressState.campaignProgress?.latestBattleTitle !== '한중 결전' ||
postHanzhongProgressState.campaignProgress?.nextBattleTitle !== '한중왕 즉위 준비'
@@ -4752,7 +4752,7 @@ try {
if (
postKingCouncilProgressState?.activeTab !== 'progress' ||
postKingCouncilProgressState.campaignProgress?.completedKnown !== 37 ||
postKingCouncilProgressState.campaignProgress?.totalKnown !== 42 ||
postKingCouncilProgressState.campaignProgress?.totalKnown !== 43 ||
postKingCouncilProgressState.campaignProgress?.latestBattleTitle !== '한중 결전' ||
postKingCouncilProgressState.campaignProgress?.nextBattleTitle !== '촉한 건국 선포'
) {
@@ -4812,7 +4812,7 @@ try {
if (
postFoundationProgressState?.activeTab !== 'progress' ||
postFoundationProgressState.campaignProgress?.completedKnown !== 37 ||
postFoundationProgressState.campaignProgress?.totalKnown !== 42 ||
postFoundationProgressState.campaignProgress?.totalKnown !== 43 ||
postFoundationProgressState.campaignProgress?.latestBattleTitle !== '한중 결전' ||
postFoundationProgressState.campaignProgress?.nextBattleTitle !== '형주 방위 전초전'
) {
@@ -4963,7 +4963,7 @@ try {
if (
postJingDefenseProgressState?.activeTab !== 'progress' ||
postJingDefenseProgressState.campaignProgress?.completedKnown !== 38 ||
postJingDefenseProgressState.campaignProgress?.totalKnown !== 42 ||
postJingDefenseProgressState.campaignProgress?.totalKnown !== 43 ||
postJingDefenseProgressState.campaignProgress?.latestBattleTitle !== '형주 방위 전초전' ||
postJingDefenseProgressState.campaignProgress?.nextBattleTitle !== '번성 외곽 압박전'
) {
@@ -5116,7 +5116,7 @@ try {
if (
postFanCastleProgressState?.activeTab !== 'progress' ||
postFanCastleProgressState.campaignProgress?.completedKnown !== 39 ||
postFanCastleProgressState.campaignProgress?.totalKnown !== 42 ||
postFanCastleProgressState.campaignProgress?.totalKnown !== 43 ||
postFanCastleProgressState.campaignProgress?.latestBattleTitle !== '번성 외곽 압박전' ||
postFanCastleProgressState.campaignProgress?.nextBattleTitle !== '한수 수공'
) {
@@ -5270,7 +5270,7 @@ try {
if (
postHanRiverProgressState?.activeTab !== 'progress' ||
postHanRiverProgressState.campaignProgress?.completedKnown !== 40 ||
postHanRiverProgressState.campaignProgress?.totalKnown !== 42 ||
postHanRiverProgressState.campaignProgress?.totalKnown !== 43 ||
postHanRiverProgressState.campaignProgress?.latestBattleTitle !== '한수 수공' ||
postHanRiverProgressState.campaignProgress?.nextBattleTitle !== '번성 공성전'
) {
@@ -5424,7 +5424,7 @@ try {
if (
postFanSiegeProgressState?.activeTab !== 'progress' ||
postFanSiegeProgressState.campaignProgress?.completedKnown !== 41 ||
postFanSiegeProgressState.campaignProgress?.totalKnown !== 42 ||
postFanSiegeProgressState.campaignProgress?.totalKnown !== 43 ||
postFanSiegeProgressState.campaignProgress?.latestBattleTitle !== '번성 공성전' ||
postFanSiegeProgressState.campaignProgress?.nextBattleTitle !== '강릉 나루 경계전'
) {
@@ -5586,14 +5586,169 @@ try {
if (
postJingRearProgressState?.activeTab !== 'progress' ||
postJingRearProgressState.campaignProgress?.completedKnown !== 42 ||
postJingRearProgressState.campaignProgress?.totalKnown !== 42 ||
postJingRearProgressState.campaignProgress?.totalKnown !== 43 ||
postJingRearProgressState.campaignProgress?.latestBattleTitle !== '강릉 나루 경계전' ||
postJingRearProgressState.campaignProgress?.nextBattleTitle !== '준비 중'
postJingRearProgressState.campaignProgress?.nextBattleTitle !== '공안 성문 변고'
) {
throw new Error(`Expected post-Jing rear progress tab to complete the forty-second battle and leave rear collapse as the next prepared slice: ${JSON.stringify(postJingRearProgressState?.campaignProgress)}`);
throw new Error(`Expected post-Jing rear progress tab to complete the forty-second battle and point to Gongan collapse: ${JSON.stringify(postJingRearProgressState?.campaignProgress)}`);
}
await page.screenshot({ path: 'dist/verification-post-jing-rear-progress.png', fullPage: true });
await page.mouse.click(1120, 38);
await page.waitForTimeout(180);
const gonganSortieState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
!gonganSortieState?.sortieVisible ||
gonganSortieState.campaign?.step !== 'forty-second-camp' ||
gonganSortieState.sortiePlan?.objectiveLine !== '공안 성문 변고 · 여몽 본대 저지' ||
gonganSortieState.sortiePlan?.maxCount !== 7 ||
gonganSortieState.sortiePlan?.recommendedTotal !== 7 ||
!gonganSortieState.sortieRoster?.some((unit) => unit.id === 'guan-yu' && unit.selected && unit.required)
) {
throw new Error(`Expected Gongan collapse sortie prep to lock Guan Yu and expose a seven-officer rear-collapse choice: ${JSON.stringify(gonganSortieState)}`);
}
assertSortieTacticalRoster(gonganSortieState, [
'liu-bei',
'guan-yu',
'zhang-fei',
'jian-yong',
'mi-zhu',
'sun-qian',
'zhao-yun',
'zhuge-liang',
'ma-liang',
'yi-ji',
'gong-zhi',
'huang-zhong',
'wei-yan',
'pang-tong',
'fa-zheng',
'wu-yi',
'yan-yan',
'li-yan',
'huang-quan',
'ma-chao',
'ma-dai',
'wang-ping'
]);
const gonganPriorityUnits = ['ma-liang', 'mi-zhu', 'huang-quan', 'wang-ping', 'zhao-yun'];
for (const unitId of gonganPriorityUnits) {
const currentSortieState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (!currentSortieState.sortieRoster?.some((unit) => unit.id === unitId && unit.selected)) {
const removable = currentSortieState.sortieRoster?.find(
(unit) => unit.selected && !unit.required && !gonganPriorityUnits.includes(unit.id)
);
if (removable) {
await clickSortieRosterUnit(page, removable.id);
}
await clickSortieRosterUnit(page, unitId);
}
}
const gonganSortieReadyState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
!gonganPriorityUnits.every((unitId) =>
gonganSortieReadyState.sortieRoster?.some((unit) => unit.id === unitId && unit.selected)
) ||
!gonganSortieReadyState.sortieRoster?.some((unit) => unit.id === 'liu-bei' && unit.selected && unit.required) ||
!gonganSortieReadyState.sortieRoster?.some((unit) => unit.id === 'guan-yu' && unit.selected && unit.required) ||
gonganSortieReadyState.sortiePlan?.selectedCount !== 7 ||
gonganSortieReadyState.sortiePlan?.recommendedSelectedCount < 7
) {
throw new Error(`Expected Gongan collapse sortie to deploy Liu Bei, Guan Yu, Ma Liang, Mi Zhu, Huang Quan, Wang Ping, and Zhao Yun: ${JSON.stringify(gonganSortieReadyState)}`);
}
await page.screenshot({ path: 'dist/verification-gongan-collapse-sortie.png', fullPage: true });
await page.mouse.click(1068, 646);
await page.waitForFunction(() => {
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
return activeScenes.includes('StoryScene');
});
await page.screenshot({ path: 'dist/verification-gongan-collapse-story.png', fullPage: true });
for (let i = 0; i < 45; i += 1) {
const enteredFortyThirdBattle = await page.evaluate(() => {
const state = window.__HEROS_DEBUG__?.battle();
return state?.scene === 'BattleScene' && state?.battleId === 'forty-third-battle-gongan-collapse';
});
if (enteredFortyThirdBattle) {
break;
}
await page.keyboard.press('Space');
await page.waitForTimeout(320);
}
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';
});
await page.screenshot({ path: 'dist/verification-forty-third-battle.png', fullPage: true });
const fortyThirdBattleState = await page.evaluate(() => window.__HEROS_DEBUG__?.battle());
const fortyThirdEnemies = fortyThirdBattleState.units.filter((unit) => unit.faction === 'enemy');
const fortyThirdAllies = fortyThirdBattleState.units.filter((unit) => unit.faction === 'ally');
const fortyThirdEnemyBehaviors = new Set(fortyThirdEnemies.map((unit) => unit.ai));
if (
fortyThirdBattleState.camera?.mapWidth !== 86 ||
fortyThirdBattleState.camera?.mapHeight !== 68 ||
fortyThirdBattleState.victoryConditionLabel !== '여몽 본대 저지' ||
fortyThirdEnemies.length < 37 ||
!fortyThirdEnemyBehaviors.has('aggressive') ||
!fortyThirdEnemyBehaviors.has('guard') ||
!fortyThirdEnemyBehaviors.has('hold') ||
!fortyThirdEnemies.some((unit) => unit.id === 'jing-collapse-leader-lu-meng') ||
!fortyThirdEnemies.some((unit) => unit.id === 'jing-collapse-officer-lu-xun') ||
!fortyThirdEnemies.some((unit) => unit.id === 'jing-collapse-officer-fu-shiren') ||
!fortyThirdEnemies.some((unit) => unit.id === 'jing-collapse-officer-mi-fang') ||
!fortyThirdAllies.some((unit) => unit.id === 'guan-yu') ||
!fortyThirdAllies.some((unit) => unit.id === 'ma-liang') ||
!fortyThirdAllies.some((unit) => unit.id === 'mi-zhu') ||
!fortyThirdAllies.some((unit) => unit.id === 'huang-quan') ||
!fortyThirdAllies.some((unit) => unit.id === 'wang-ping')
) {
throw new Error(`Expected forty-third battle to use Gongan collapse map, Lu Meng objective, selected rear-collapse officers, and mixed Wu AI: ${JSON.stringify(fortyThirdBattleState)}`);
}
await page.evaluate(() => window.__HEROS_DEBUG__?.forceBattleOutcome('victory'));
await page.waitForFunction(() => {
const state = window.__HEROS_DEBUG__?.battle();
return state?.battleOutcome === 'victory' && state?.phase === 'resolved' && state?.resultVisible === true;
});
await page.mouse.click(738, 642);
await page.waitForFunction(() => {
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
return activeScenes.includes('CampScene');
});
const fortyThirdCampState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
fortyThirdCampState?.campBattleId !== 'forty-third-battle-gongan-collapse' ||
fortyThirdCampState.campTitle !== '공안 성문 변고 후 군영' ||
fortyThirdCampState.availableDialogueIds?.length !== 3 ||
!fortyThirdCampState.availableDialogueIds.every((id) => id.includes('gongan-collapse')) ||
fortyThirdCampState.availableVisitIds?.length !== 2 ||
!fortyThirdCampState.availableVisitIds.every((id) => id.includes('gongan-collapse')) ||
fortyThirdCampState.rosterCollection?.total < 22
) {
throw new Error(`Expected forty-third camp to expose Gongan collapse dialogue/visit sets and preserve the full officer roster: ${JSON.stringify(fortyThirdCampState)}`);
}
await page.screenshot({ path: 'dist/verification-gongan-collapse-camp.png', fullPage: true });
await page.mouse.click(966, 38);
await page.waitForTimeout(180);
const postGonganProgressState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
postGonganProgressState?.activeTab !== 'progress' ||
postGonganProgressState.campaignProgress?.completedKnown !== 43 ||
postGonganProgressState.campaignProgress?.totalKnown !== 43 ||
postGonganProgressState.campaignProgress?.latestBattleTitle !== '공안 성문 변고' ||
postGonganProgressState.campaignProgress?.nextBattleTitle !== '준비 중'
) {
throw new Error(`Expected post-Gongan progress tab to complete the forty-third battle and leave Maicheng isolation as the next prepared slice: ${JSON.stringify(postGonganProgressState?.campaignProgress)}`);
}
await page.screenshot({ path: 'dist/verification-post-gongan-progress.png', fullPage: true });
await page.evaluate(() => {
const game = window.__HEROS_GAME__;
game?.scene.stop('CampScene');
@@ -5626,10 +5781,10 @@ try {
camp: window.__HEROS_DEBUG__?.camp?.() ?? null
}));
if (!titleContinueState.activeScenes.includes('CampScene')) {
throw new Error(`Expected title continue to reopen the latest camp after Jing rear crisis: ${JSON.stringify(titleContinueState)}`);
throw new Error(`Expected title continue to reopen the latest camp after Gongan collapse: ${JSON.stringify(titleContinueState)}`);
}
console.log(`Verified title-to-forty-second-battle flow, recruited officer sortie selection, Ma Liang, Yi Ji, Gong Zhi, Huang Zhong, Wei Yan, Pang Tong, Fa Zheng, Wu Yi, Yan Yan, Li Yan, Huang Quan, Ma Chao, Ma Dai, Wang Ping joins, Luofeng, Luo main gate, Mianzhu, Chengdu surrender, Jiameng, Yangping, Dingjun, Hanzhong decisive battle, King of Hanzhong council, Shu-Han foundation state, Jing Province defense vanguard, Fan Castle vanguard, Han River flood, Fan Castle siege, and Jing rear crisis state at ${targetUrl}`);
console.log(`Verified title-to-forty-third-battle flow, recruited officer sortie selection, Ma Liang, Yi Ji, Gong Zhi, Huang Zhong, Wei Yan, Pang Tong, Fa Zheng, Wu Yi, Yan Yan, Li Yan, Huang Quan, Ma Chao, Ma Dai, Wang Ping joins, Luofeng, Luo main gate, Mianzhu, Chengdu surrender, Jiameng, Yangping, Dingjun, Hanzhong decisive battle, King of Hanzhong council, Shu-Han foundation state, Jing Province defense vanguard, Fan Castle vanguard, Han River flood, Fan Castle siege, Jing rear crisis, and Gongan collapse state at ${targetUrl}`);
} finally {
await browser?.close();
if (serverProcess && !serverProcess.killed) {