Summarize individualized reserve drill count
This commit is contained in:
@@ -9652,6 +9652,7 @@ function assertSortieTacticalRoster(state, requiredUnitIds) {
|
||||
if (
|
||||
!state.reserveTrainingFocus ||
|
||||
typeof state.reserveTrainingAssignments !== 'object' ||
|
||||
typeof state.rosterCollection?.reserveTrainingAssignmentCount !== 'number' ||
|
||||
!Array.isArray(state.reserveTrainingFocusOptions) ||
|
||||
state.reserveTrainingFocusOptions.length !== 3 ||
|
||||
!state.reserveTrainingFocusOptions.some((focus) => focus.id === 'bond-practice' && focus.bondExpGained > 0)
|
||||
|
||||
@@ -14337,15 +14337,17 @@ export class CampScene extends Phaser.Scene {
|
||||
const selectedIds = new Set(this.selectedSortieUnitIds);
|
||||
const selectedCount = allies.filter((unit) => selectedIds.has(unit.id)).length;
|
||||
const recruitedCount = allies.filter((unit) => !foundingSortieUnitIds.has(unit.id)).length;
|
||||
const reserveUnits = allies.filter((unit) => !selectedIds.has(unit.id));
|
||||
const reserveTrainingAwards = this.latestReserveTrainingAwards();
|
||||
const averageLevel = allies.length > 0 ? Math.round(allies.reduce((sum, unit) => sum + unit.level, 0) / allies.length) : 0;
|
||||
return {
|
||||
total: allies.length,
|
||||
selectedCount,
|
||||
reserveCount: Math.max(0, allies.length - selectedCount),
|
||||
reserveCount: reserveUnits.length,
|
||||
recruitedCount,
|
||||
averageLevel,
|
||||
reserveTrainingFocus: this.reserveTrainingFocusDefinition(),
|
||||
reserveTrainingAssignmentCount: reserveUnits.filter((unit) => this.campaign?.reserveTrainingAssignments[unit.id]).length,
|
||||
reserveTrainingCount: reserveTrainingAwards.length,
|
||||
reserveTrainingExp: reserveTrainingAwards.reduce((sum, entry) => sum + entry.expGained, 0)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user