Summarize individualized reserve drill count

This commit is contained in:
2026-07-09 13:50:08 +09:00
parent 67eb5d01a2
commit 3775f83f44
2 changed files with 4 additions and 1 deletions

View File

@@ -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)

View File

@@ -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)
};