From 83ceb772fe47a19e281a61e7c1cb4534fcaf499b Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Tue, 16 Jun 2026 20:37:12 +0200 Subject: [PATCH] Clean up sacrifice candidate reasons --- app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index a443c24..730a3f2 100644 --- a/app.js +++ b/app.js @@ -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 }) => `
  • ${escapeHtml(piece.name || piece.title)} Score ${fmt(score)}. ${reasons.length ? reasons.join("; ") : "Lowest relative contribution among entered pieces."}