feat: release version 1.0.9
This commit is contained in:
1 parent
2998278353
commit
89169c5c0d
15 files changed
+421
-67
No files matched your search
@@ -243,12 +243,16 @@ export function optimizeExactOrderAndCooldowns(
|
||||
for (const reductions of reductionAssignments) {
|
||||
const score = scoreAssignment(order, reductions, profiles, base, options.directSongScoreBonusPercent ?? 0);
|
||||
const reductionTotal = Object.values(reductions).reduce<number>((sum, value) => sum + value, 0);
|
||||
const isHigherMaximum = score.theoreticalMaxScore > bestTheoreticalMaxScore;
|
||||
const isHigherExpectedTie = score.theoreticalMaxScore === bestTheoreticalMaxScore &&
|
||||
score.expectedScore > bestExpectedScore;
|
||||
const expectedFirst = options.objective === 'expected';
|
||||
const isBetterPrimary = expectedFirst
|
||||
? score.expectedScore > bestExpectedScore
|
||||
: score.theoreticalMaxScore > bestTheoreticalMaxScore;
|
||||
const isBetterSecondary = expectedFirst
|
||||
? score.expectedScore === bestExpectedScore && score.theoreticalMaxScore > bestTheoreticalMaxScore
|
||||
: score.theoreticalMaxScore === bestTheoreticalMaxScore && score.expectedScore > bestExpectedScore;
|
||||
const isCheaperTie = score.theoreticalMaxScore === bestTheoreticalMaxScore &&
|
||||
score.expectedScore === bestExpectedScore && reductionTotal < bestReductionTotal;
|
||||
if (isHigherMaximum || isHigherExpectedTie || isCheaperTie) {
|
||||
if (isBetterPrimary || isBetterSecondary || isCheaperTie) {
|
||||
bestTheoreticalMaxScore = score.theoreticalMaxScore;
|
||||
bestExpectedScore = score.expectedScore;
|
||||
bestOrder = order;
|
||||
|
||||
Reference in new issue
Block a user