feat: make camp preparation affect first battle
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user