Fill open sortie slots with recommendations
This commit is contained in:
@@ -15138,13 +15138,13 @@ export class CampScene extends Phaser.Scene {
|
||||
}
|
||||
});
|
||||
|
||||
if (useDefaultSelection) {
|
||||
const addDefaultCandidate = (unitId: string) => {
|
||||
if (allyIds.has(unitId)) {
|
||||
candidateSet.add(unitId);
|
||||
}
|
||||
};
|
||||
if (useDefaultSelection || candidateSet.size < maxUnits) {
|
||||
const rule = this.nextSortieRule();
|
||||
const addDefaultCandidate = (unitId: string) => {
|
||||
if (allyIds.has(unitId)) {
|
||||
candidateSet.add(unitId);
|
||||
}
|
||||
};
|
||||
rule.recommended.forEach((entry) => addDefaultCandidate(entry.unitId));
|
||||
(rule.recommendedClasses ?? []).forEach((entry) => {
|
||||
allies.filter((unit) => entry.classKeys.includes(unit.classKey)).forEach((unit) => addDefaultCandidate(unit.id));
|
||||
|
||||
Reference in New Issue
Block a user