Expose reserve bond drill assignment count
This commit is contained in:
@@ -9625,7 +9625,8 @@ function assertSortieTacticalRoster(state, requiredUnitIds) {
|
||||
typeof state.sortiePlan.recommendedTotal !== 'number' ||
|
||||
typeof state.sortiePlan.reserveTrainingExpPreview !== 'number' ||
|
||||
typeof state.sortiePlan.reserveTrainingEquipmentPreview !== 'number' ||
|
||||
typeof state.sortiePlan.reserveTrainingBondPreview !== 'number'
|
||||
typeof state.sortiePlan.reserveTrainingBondPreview !== 'number' ||
|
||||
typeof state.sortiePlan.reserveTrainingBondAssignmentCount !== 'number'
|
||||
) {
|
||||
throw new Error(`Expected sortie preparation to expose deployment plan, reserve training, bond count, and terrain score: ${JSON.stringify(state.sortiePlan)}`);
|
||||
}
|
||||
|
||||
@@ -285,6 +285,7 @@ type SortiePlanSummary = {
|
||||
reserveTrainingExpPreview: number;
|
||||
reserveTrainingEquipmentPreview: number;
|
||||
reserveTrainingBondPreview: number;
|
||||
reserveTrainingBondAssignmentCount: number;
|
||||
objectiveLine: string;
|
||||
formationSlots: SortieFormationSlot[];
|
||||
warningLine: string;
|
||||
@@ -13336,6 +13337,9 @@ export class CampScene extends Phaser.Scene {
|
||||
const reserveUnits = allAllies.filter((unit) => !selectedIds.has(unit.id));
|
||||
const reserveNames = reserveUnits.map((unit) => unit.name).join(', ');
|
||||
const individualReserveTrainingCount = reserveUnits.filter((unit) => this.campaign?.reserveTrainingAssignments[unit.id]).length;
|
||||
const reserveTrainingBondAssignmentCount = reserveUnits.filter(
|
||||
(unit) => this.campaign?.reserveTrainingAssignments[unit.id] && this.reserveTrainingFocusDefinitionForUnit(unit.id).bondExpGained > 0
|
||||
).length;
|
||||
const terrainScores = selectedUnits.map((unit) => this.sortieTerrainScore(unit, scenario));
|
||||
const terrainScore = terrainScores.length
|
||||
? Math.round(terrainScores.reduce((sum, score) => sum + score, 0) / terrainScores.length)
|
||||
@@ -13430,6 +13434,7 @@ export class CampScene extends Phaser.Scene {
|
||||
reserveTrainingExpPreview: reserveFocus.expGained,
|
||||
reserveTrainingEquipmentPreview: reserveFocus.equipmentExpGained,
|
||||
reserveTrainingBondPreview: reserveFocus.bondExpGained,
|
||||
reserveTrainingBondAssignmentCount,
|
||||
objectiveLine: scenario ? `${scenario.title} · ${scenario.victoryConditionLabel}` : `${flow.title} · 군영 의정`,
|
||||
formationSlots,
|
||||
warningLine: warnings[0] ?? (hasBattle ? '배치 균형 양호' : '동행 균형 양호'),
|
||||
|
||||
Reference in New Issue
Block a user