Add Yiling fire attack chapter

This commit is contained in:
2026-06-23 19:46:28 +09:00
parent ef20c6460b
commit d88cc65972
11 changed files with 856 additions and 54 deletions

View File

@@ -1739,7 +1739,7 @@ try {
if (
progressTabState?.activeTab !== 'progress' ||
progressTabState.campaignProgress?.completedKnown !== 17 ||
progressTabState.campaignProgress?.totalKnown !== 45 ||
progressTabState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postBowangProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postChangbanProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postJiangdongProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postRedCliffsProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postFireAttackProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postJingzhouProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postGuiyangProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postWulingProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postChangshaProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postYizhouProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postFuPassProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postLuoProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postLuofengProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postLuoMainProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postMianzhuProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postChengduProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postJiamengProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postYangpingProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postDingjunProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postHanzhongProgressState.campaignProgress?.totalKnown !== 46 ||
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 !== 45 ||
postKingCouncilProgressState.campaignProgress?.totalKnown !== 46 ||
postKingCouncilProgressState.campaignProgress?.latestBattleTitle !== '한중 결전' ||
postKingCouncilProgressState.campaignProgress?.nextBattleTitle !== '촉한 건국 선포'
) {
@@ -4812,7 +4812,7 @@ try {
if (
postFoundationProgressState?.activeTab !== 'progress' ||
postFoundationProgressState.campaignProgress?.completedKnown !== 37 ||
postFoundationProgressState.campaignProgress?.totalKnown !== 45 ||
postFoundationProgressState.campaignProgress?.totalKnown !== 46 ||
postFoundationProgressState.campaignProgress?.latestBattleTitle !== '한중 결전' ||
postFoundationProgressState.campaignProgress?.nextBattleTitle !== '형주 방위 전초전'
) {
@@ -4963,7 +4963,7 @@ try {
if (
postJingDefenseProgressState?.activeTab !== 'progress' ||
postJingDefenseProgressState.campaignProgress?.completedKnown !== 38 ||
postJingDefenseProgressState.campaignProgress?.totalKnown !== 45 ||
postJingDefenseProgressState.campaignProgress?.totalKnown !== 46 ||
postJingDefenseProgressState.campaignProgress?.latestBattleTitle !== '형주 방위 전초전' ||
postJingDefenseProgressState.campaignProgress?.nextBattleTitle !== '번성 외곽 압박전'
) {
@@ -5116,7 +5116,7 @@ try {
if (
postFanCastleProgressState?.activeTab !== 'progress' ||
postFanCastleProgressState.campaignProgress?.completedKnown !== 39 ||
postFanCastleProgressState.campaignProgress?.totalKnown !== 45 ||
postFanCastleProgressState.campaignProgress?.totalKnown !== 46 ||
postFanCastleProgressState.campaignProgress?.latestBattleTitle !== '번성 외곽 압박전' ||
postFanCastleProgressState.campaignProgress?.nextBattleTitle !== '한수 수공'
) {
@@ -5270,7 +5270,7 @@ try {
if (
postHanRiverProgressState?.activeTab !== 'progress' ||
postHanRiverProgressState.campaignProgress?.completedKnown !== 40 ||
postHanRiverProgressState.campaignProgress?.totalKnown !== 45 ||
postHanRiverProgressState.campaignProgress?.totalKnown !== 46 ||
postHanRiverProgressState.campaignProgress?.latestBattleTitle !== '한수 수공' ||
postHanRiverProgressState.campaignProgress?.nextBattleTitle !== '번성 공성전'
) {
@@ -5424,7 +5424,7 @@ try {
if (
postFanSiegeProgressState?.activeTab !== 'progress' ||
postFanSiegeProgressState.campaignProgress?.completedKnown !== 41 ||
postFanSiegeProgressState.campaignProgress?.totalKnown !== 45 ||
postFanSiegeProgressState.campaignProgress?.totalKnown !== 46 ||
postFanSiegeProgressState.campaignProgress?.latestBattleTitle !== '번성 공성전' ||
postFanSiegeProgressState.campaignProgress?.nextBattleTitle !== '강릉 나루 경계전'
) {
@@ -5586,7 +5586,7 @@ try {
if (
postJingRearProgressState?.activeTab !== 'progress' ||
postJingRearProgressState.campaignProgress?.completedKnown !== 42 ||
postJingRearProgressState.campaignProgress?.totalKnown !== 45 ||
postJingRearProgressState.campaignProgress?.totalKnown !== 46 ||
postJingRearProgressState.campaignProgress?.latestBattleTitle !== '강릉 나루 경계전' ||
postJingRearProgressState.campaignProgress?.nextBattleTitle !== '공안 성문 변고'
) {
@@ -5741,7 +5741,7 @@ try {
if (
postGonganProgressState?.activeTab !== 'progress' ||
postGonganProgressState.campaignProgress?.completedKnown !== 43 ||
postGonganProgressState.campaignProgress?.totalKnown !== 45 ||
postGonganProgressState.campaignProgress?.totalKnown !== 46 ||
postGonganProgressState.campaignProgress?.latestBattleTitle !== '공안 성문 변고' ||
postGonganProgressState.campaignProgress?.nextBattleTitle !== '맥성 고립전'
) {
@@ -5899,7 +5899,7 @@ try {
if (
postMaichengProgressState?.activeTab !== 'progress' ||
postMaichengProgressState.campaignProgress?.completedKnown !== 44 ||
postMaichengProgressState.campaignProgress?.totalKnown !== 45 ||
postMaichengProgressState.campaignProgress?.totalKnown !== 46 ||
postMaichengProgressState.campaignProgress?.latestBattleTitle !== '맥성 고립전' ||
postMaichengProgressState.campaignProgress?.nextBattleTitle !== '이릉 진격로'
) {
@@ -6056,14 +6056,172 @@ try {
if (
postYilingProgressState?.activeTab !== 'progress' ||
postYilingProgressState.campaignProgress?.completedKnown !== 45 ||
postYilingProgressState.campaignProgress?.totalKnown !== 45 ||
postYilingProgressState.campaignProgress?.totalKnown !== 46 ||
postYilingProgressState.campaignProgress?.latestBattleTitle !== '이릉 진격로' ||
postYilingProgressState.campaignProgress?.nextBattleTitle !== '준비 중'
postYilingProgressState.campaignProgress?.nextBattleTitle !== '이릉 화공전'
) {
throw new Error(`Expected post-Yiling progress tab to complete the forty-fifth battle and pause before the next prepared slice: ${JSON.stringify(postYilingProgressState?.campaignProgress)}`);
throw new Error(`Expected post-Yiling progress tab to complete the forty-fifth battle and point to the Yiling fire attack: ${JSON.stringify(postYilingProgressState?.campaignProgress)}`);
}
await page.screenshot({ path: 'dist/verification-post-yiling-progress.png', fullPage: true });
await page.mouse.click(1120, 38);
await page.waitForTimeout(180);
const yilingFireSortieState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
!yilingFireSortieState?.sortieVisible ||
yilingFireSortieState.campaign?.step !== 'forty-fifth-camp' ||
yilingFireSortieState.sortiePlan?.objectiveLine !== '이릉 화공전 · 오군 화공망 돌파' ||
yilingFireSortieState.sortiePlan?.maxCount !== 7 ||
yilingFireSortieState.sortiePlan?.recommendedTotal !== 7 ||
!yilingFireSortieState.sortieRoster?.some((unit) => unit.id === 'liu-bei' && unit.selected && unit.required) ||
!yilingFireSortieState.sortieRoster?.some((unit) => unit.id === 'huang-quan' && unit.recommended) ||
!yilingFireSortieState.sortieRoster?.some((unit) => unit.id === 'wang-ping' && unit.recommended)
) {
throw new Error(`Expected Yiling fire sortie prep to lock Liu Bei and expose a seven-officer firebreak choice: ${JSON.stringify(yilingFireSortieState)}`);
}
assertSortieTacticalRoster(yilingFireSortieState, [
'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 yilingFirePriorityUnits = ['huang-quan', 'zhuge-liang', 'ma-liang', 'zhao-yun', 'wang-ping', 'ma-chao'];
for (const unitId of yilingFirePriorityUnits) {
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 && !yilingFirePriorityUnits.includes(unit.id)
);
if (removable) {
await clickSortieRosterUnit(page, removable.id);
}
await clickSortieRosterUnit(page, unitId);
}
}
const yilingFireSortieReadyState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
!yilingFirePriorityUnits.every((unitId) =>
yilingFireSortieReadyState.sortieRoster?.some((unit) => unit.id === unitId && unit.selected)
) ||
!yilingFireSortieReadyState.sortieRoster?.some((unit) => unit.id === 'liu-bei' && unit.selected && unit.required) ||
yilingFireSortieReadyState.sortiePlan?.selectedCount !== 7 ||
yilingFireSortieReadyState.sortiePlan?.recommendedSelectedCount < 7
) {
throw new Error(`Expected Yiling fire sortie to deploy Liu Bei, Huang Quan, Zhuge Liang, Ma Liang, Zhao Yun, Wang Ping, and Ma Chao: ${JSON.stringify(yilingFireSortieReadyState)}`);
}
await page.screenshot({ path: 'dist/verification-yiling-fire-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-yiling-fire-story.png', fullPage: true });
for (let i = 0; i < 55; i += 1) {
const enteredFortySixthBattle = await page.evaluate(() => {
const state = window.__HEROS_DEBUG__?.battle();
return state?.scene === 'BattleScene' && state?.battleId === 'forty-sixth-battle-yiling-fire';
});
if (enteredFortySixthBattle) {
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-sixth-battle-yiling-fire' && state?.battleOutcome === null && state?.phase === 'idle';
});
await page.screenshot({ path: 'dist/verification-forty-sixth-battle.png', fullPage: true });
const fortySixthBattleState = await page.evaluate(() => window.__HEROS_DEBUG__?.battle());
const fortySixthEnemies = fortySixthBattleState.units.filter((unit) => unit.faction === 'enemy');
const fortySixthAllies = fortySixthBattleState.units.filter((unit) => unit.faction === 'ally');
const fortySixthEnemyBehaviors = new Set(fortySixthEnemies.map((unit) => unit.ai));
if (
fortySixthBattleState.camera?.mapWidth !== 92 ||
fortySixthBattleState.camera?.mapHeight !== 74 ||
fortySixthBattleState.victoryConditionLabel !== '오군 화공망 돌파' ||
fortySixthEnemies.length < 38 ||
!fortySixthEnemyBehaviors.has('aggressive') ||
!fortySixthEnemyBehaviors.has('guard') ||
!fortySixthEnemyBehaviors.has('hold') ||
!fortySixthEnemies.some((unit) => unit.id === 'yiling-fire-leader-lu-xun') ||
!fortySixthEnemies.some((unit) => unit.id === 'yiling-fire-officer-zhu-ran') ||
!fortySixthEnemies.some((unit) => unit.id === 'yiling-fire-officer-han-dang') ||
!fortySixthEnemies.some((unit) => unit.id === 'yiling-fire-officer-pan-zhang') ||
!fortySixthEnemies.some((unit) => unit.id === 'yiling-fire-officer-ma-zhong') ||
!fortySixthAllies.some((unit) => unit.id === 'huang-quan') ||
!fortySixthAllies.some((unit) => unit.id === 'zhuge-liang') ||
!fortySixthAllies.some((unit) => unit.id === 'ma-liang') ||
!fortySixthAllies.some((unit) => unit.id === 'zhao-yun') ||
!fortySixthAllies.some((unit) => unit.id === 'wang-ping') ||
!fortySixthAllies.some((unit) => unit.id === 'ma-chao')
) {
throw new Error(`Expected forty-sixth battle to use Yiling fire map, Lu Xun firebreak objective, selected retreat-route officers, and mixed Wu AI: ${JSON.stringify(fortySixthBattleState)}`);
}
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 fortySixthCampState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
fortySixthCampState?.campBattleId !== 'forty-sixth-battle-yiling-fire' ||
fortySixthCampState.campTitle !== '이릉 화공전 후 군영' ||
fortySixthCampState.availableDialogueIds?.length !== 3 ||
!fortySixthCampState.availableDialogueIds.every((id) => id.includes('yiling-fire')) ||
fortySixthCampState.availableVisitIds?.length !== 2 ||
!fortySixthCampState.availableVisitIds.every((id) => id.includes('yiling-fire')) ||
fortySixthCampState.rosterCollection?.total < 22
) {
throw new Error(`Expected forty-sixth camp to expose Yiling fire dialogue/visit sets and preserve the full officer roster: ${JSON.stringify(fortySixthCampState)}`);
}
await page.screenshot({ path: 'dist/verification-yiling-fire-camp.png', fullPage: true });
await page.mouse.click(966, 38);
await page.waitForTimeout(180);
const postYilingFireProgressState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
postYilingFireProgressState?.activeTab !== 'progress' ||
postYilingFireProgressState.campaignProgress?.completedKnown !== 46 ||
postYilingFireProgressState.campaignProgress?.totalKnown !== 46 ||
postYilingFireProgressState.campaignProgress?.latestBattleTitle !== '이릉 화공전' ||
postYilingFireProgressState.campaignProgress?.nextBattleTitle !== '준비 중'
) {
throw new Error(`Expected post-Yiling-fire progress tab to complete the forty-sixth battle and pause before Baidi Castle: ${JSON.stringify(postYilingFireProgressState?.campaignProgress)}`);
}
await page.screenshot({ path: 'dist/verification-post-yiling-fire-progress.png', fullPage: true });
await page.evaluate(() => {
const game = window.__HEROS_GAME__;
game?.scene.stop('CampScene');
@@ -6096,10 +6254,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 Yiling vanguard: ${JSON.stringify(titleContinueState)}`);
throw new Error(`Expected title continue to reopen the latest camp after Yiling fire: ${JSON.stringify(titleContinueState)}`);
}
console.log(`Verified title-to-forty-fifth-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, Gongan collapse, Maicheng isolation, and Yiling vanguard state at ${targetUrl}`);
console.log(`Verified title-to-forty-sixth-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, Gongan collapse, Maicheng isolation, Yiling vanguard, and Yiling fire attack state at ${targetUrl}`);
} finally {
await browser?.close();
if (serverProcess && !serverProcess.killed) {