Add battle-specific sortie recommendations
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user