Add battle-specific sortie recommendations

This commit is contained in:
2026-06-23 02:41:52 +09:00
parent 041f798475
commit 83b2bb6361
3 changed files with 175 additions and 12 deletions

View File

@@ -1278,13 +1278,21 @@ function assertSortieTacticalRoster(state, requiredUnitIds) {
!state.sortiePlan ||
!state.sortiePlan.deploymentLine?.includes('전열') ||
!state.sortiePlan.objectiveLine ||
!state.sortiePlan.recommendationLine?.includes('추천') ||
!Array.isArray(state.sortiePlan.formationSlots) ||
state.sortiePlan.formationSlots.length < 3 ||
typeof state.sortiePlan.activeBondCount !== 'number' ||
typeof state.sortiePlan.terrainScore !== 'number'
typeof state.sortiePlan.terrainScore !== 'number' ||
typeof state.sortiePlan.recommendedSelectedCount !== 'number' ||
typeof state.sortiePlan.recommendedTotal !== 'number'
) {
throw new Error(`Expected sortie preparation to expose deployment plan, bond count, and terrain score: ${JSON.stringify(state.sortiePlan)}`);
}
const recommendedUnits = state.sortieRoster.filter((unit) => unit.recommended);
if (recommendedUnits.length === 0 || recommendedUnits.some((unit) => !unit.recommendationReason)) {
throw new Error(`Expected sortie roster to expose recommended officers with reasons: ${JSON.stringify(state.sortieRoster)}`);
}
}
async function clickSortieRosterUnit(page, unitId) {