Apply treasure equipment battle effects
This commit is contained in:
@@ -1814,6 +1814,9 @@ try {
|
||||
const eighteenthEnemies = eighteenthBattleState.units.filter((unit) => unit.faction === 'enemy');
|
||||
const eighteenthAllies = eighteenthBattleState.units.filter((unit) => unit.faction === 'ally');
|
||||
const eighteenthEnemyBehaviors = new Set(eighteenthEnemies.map((unit) => unit.ai));
|
||||
const treasureLabels = new Set(
|
||||
eighteenthBattleState.treasureEffectPreviews?.flatMap((preview) => preview.equipmentEffectLabels ?? []) ?? []
|
||||
);
|
||||
if (
|
||||
eighteenthBattleState.camera?.mapWidth !== 36 ||
|
||||
eighteenthBattleState.camera?.mapHeight !== 26 ||
|
||||
@@ -1823,9 +1826,13 @@ try {
|
||||
!eighteenthEnemyBehaviors.has('guard') ||
|
||||
!eighteenthEnemyBehaviors.has('hold') ||
|
||||
!eighteenthEnemies.some((unit) => unit.id === 'bowang-leader-xiahou-dun') ||
|
||||
!eighteenthAllies.some((unit) => unit.id === 'zhuge-liang')
|
||||
!eighteenthAllies.some((unit) => unit.id === 'zhuge-liang') ||
|
||||
!treasureLabels.has('자웅일대검 공명') ||
|
||||
(!treasureLabels.has('청룡언월도 무력 우위') && !treasureLabels.has('청룡언월도 대도')) ||
|
||||
!treasureLabels.has('장팔사모 치명') ||
|
||||
!treasureLabels.has('백우선 책략')
|
||||
) {
|
||||
throw new Error(`Expected eighteenth battle to use Bowang map, Xiahou Dun objective, mixed AI, and deployed Zhuge Liang: ${JSON.stringify(eighteenthBattleState)}`);
|
||||
throw new Error(`Expected eighteenth battle to use Bowang map, Xiahou Dun objective, mixed AI, deployed Zhuge Liang, and treasure equipment effects: ${JSON.stringify(eighteenthBattleState)}`);
|
||||
}
|
||||
|
||||
await page.evaluate(() => window.__HEROS_DEBUG__?.forceBattleOutcome('victory'));
|
||||
|
||||
Reference in New Issue
Block a user