feat: make camp preparation affect first battle

This commit is contained in:
2026-07-27 04:19:40 +09:00
parent a726ba129f
commit 4d3f8b6a28
7 changed files with 608 additions and 50 deletions

View File

@@ -168,6 +168,11 @@ async function verifyRuntimeIntentState(browserInstance, targetUrl, scenario, op
{ timeout: 30000 }
);
}
await page.waitForFunction(
() => window.__HEROS_DEBUG__?.battle()?.triggeredBattleEvents?.includes('opening') === true,
undefined,
{ timeout: 15000 }
);
const live = await page.evaluate(() => window.__HEROS_DEBUG__?.battle());
const aliveEnemyCount = live?.units?.filter((unit) => unit.faction === 'enemy' && unit.hp > 0).length ?? 0;