feat: add playable first-battle militia camp
This commit is contained in:
@@ -332,7 +332,8 @@ async function advanceStoryUntilBattle(page, battleId) {
|
||||
storyLastPage: story?.isLastPage === true,
|
||||
storyTargetsBattle: story?.nextScene === 'BattleScene',
|
||||
currentPageReady: story?.assetStreaming?.currentPageReady === true,
|
||||
villageReady: window.__HEROS_DEBUG__?.village?.()?.ready === true
|
||||
villageReady: window.__HEROS_DEBUG__?.village?.()?.ready === true,
|
||||
militiaCampReady: window.__HEROS_DEBUG__?.militiaCamp?.()?.ready === true
|
||||
};
|
||||
} catch {
|
||||
return {};
|
||||
@@ -355,7 +356,19 @@ async function advanceStoryUntilBattle(page, battleId) {
|
||||
return scene?.debugCompleteVillage?.() ?? false;
|
||||
});
|
||||
if (!advanced) {
|
||||
throw new Error('Playable prologue village was ready but could not advance to the departure story.');
|
||||
throw new Error('Playable prologue village was ready but could not advance to the brotherhood story.');
|
||||
}
|
||||
await page.waitForTimeout(400);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state.militiaCampReady) {
|
||||
const advanced = await page.evaluate(() => {
|
||||
const scene = window.__HEROS_GAME__?.scene.getScene('PrologueMilitiaCampScene');
|
||||
return scene?.debugCompleteCamp?.() ?? false;
|
||||
});
|
||||
if (!advanced) {
|
||||
throw new Error('Playable prologue militia camp was ready but could not advance to the departure story.');
|
||||
}
|
||||
await page.waitForTimeout(400);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user