Add battle-specific camp conversations
This commit is contained in:
@@ -272,6 +272,13 @@ try {
|
||||
if (!campState || campState.scene !== 'CampScene' || campState.report?.rewardGold <= 0) {
|
||||
throw new Error(`Expected CampScene report after victory: ${JSON.stringify(campState)}`);
|
||||
}
|
||||
if (
|
||||
campState.campBattleId !== 'first-battle-zhuo-commandery' ||
|
||||
campState.availableDialogueIds?.length !== 3 ||
|
||||
!campState.availableDialogueIds.every((id) => id.endsWith('first-battle'))
|
||||
) {
|
||||
throw new Error(`Expected first camp to expose first-battle dialogue set: ${JSON.stringify(campState)}`);
|
||||
}
|
||||
|
||||
await page.evaluate(() => {
|
||||
const campScene = window.__HEROS_GAME__?.scene.getScene('CampScene');
|
||||
@@ -320,7 +327,7 @@ try {
|
||||
await page.waitForTimeout(260);
|
||||
|
||||
const campStateAfterDialogue = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (!campStateAfterDialogue.report?.completedCampDialogues?.length) {
|
||||
if (!campStateAfterDialogue.report?.completedCampDialogues?.length || campStateAfterDialogue.completedAvailableDialogues?.length !== 1) {
|
||||
throw new Error(`Expected camp dialogue to award bond exp: ${JSON.stringify(campStateAfterDialogue)}`);
|
||||
}
|
||||
|
||||
@@ -646,6 +653,16 @@ try {
|
||||
throw new Error(`Expected campaign save to persist fifth battle victory: ${JSON.stringify(campaignSaveAfterFifthBattle)}`);
|
||||
}
|
||||
|
||||
const fifthCampState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (
|
||||
fifthCampState?.campBattleId !== 'fifth-battle-sishui-vanguard' ||
|
||||
fifthCampState.campTitle !== '공손찬 진영 군영' ||
|
||||
fifthCampState.availableDialogueIds?.length !== 3 ||
|
||||
!fifthCampState.availableDialogueIds.every((id) => id.endsWith('sishui'))
|
||||
) {
|
||||
throw new Error(`Expected fifth camp to expose Gongsun Zan/Sishui dialogue set: ${JSON.stringify(fifthCampState)}`);
|
||||
}
|
||||
|
||||
await page.evaluate(() => window.__HEROS_GAME__?.scene.start('TitleScene'));
|
||||
await page.waitForFunction(() => {
|
||||
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
|
||||
|
||||
Reference in New Issue
Block a user