Clean up sacrifice candidate reasons
This commit is contained in:
@@ -358,7 +358,6 @@ function scorePiece(piece, profile, totals) {
|
||||
|
||||
for (const effect of piece.effects) {
|
||||
if (!effect.type) {
|
||||
reasons.push("missing effect slot");
|
||||
continue;
|
||||
}
|
||||
const def = effectById(effect.type);
|
||||
@@ -445,7 +444,10 @@ function renderUpgrades(profile, totals, currentDps) {
|
||||
}
|
||||
|
||||
function renderSacrifices(pieceScores) {
|
||||
const weakest = [...pieceScores].sort((a, b) => a.score - b.score).slice(0, state.recommendationCount);
|
||||
const weakest = pieceScores
|
||||
.filter(({ piece }) => !piece.noEffects)
|
||||
.sort((a, b) => a.score - b.score)
|
||||
.slice(0, state.recommendationCount);
|
||||
$("#sacrificeList").innerHTML = weakest.map(({ piece, score, reasons }) => `
|
||||
<li><strong>${escapeHtml(piece.name || piece.title)}</strong>
|
||||
<small>Score ${fmt(score)}. ${reasons.length ? reasons.join("; ") : "Lowest relative contribution among entered pieces."}</small>
|
||||
|
||||
Reference in New Issue
Block a user