Remove direct upgrade recommendations
This commit is contained in:
@@ -236,7 +236,6 @@ function updateAnalysis() {
|
||||
updateEffectImpactHints(totals, dps);
|
||||
|
||||
renderEffectTotals(totals, dps, survivability);
|
||||
renderUpgrades(profile, totals, dps);
|
||||
renderSacrifices(pieceScores);
|
||||
saveDraft();
|
||||
}
|
||||
@@ -263,7 +262,7 @@ function calculateDamageDetails(totals, combatStyle = "melee") {
|
||||
const globalDamage = 1 + effects.damage / 100;
|
||||
const styleDamage = 1 + getStyleDamageBonus(effects, combatStyle) / 100;
|
||||
const singleHit = baseDamage * globalDamage * styleDamage;
|
||||
const attackSpeed = 1 + effects.attackSpeed / 100;
|
||||
const attacksPerSecond = (1 + effects.attackSpeed / 100) / 2;
|
||||
const doubleHit = 1 + effects.doubleChance / 100;
|
||||
const critChance = effects.critChance / 100;
|
||||
const critDamage = effects.critDamage / 100;
|
||||
@@ -273,7 +272,7 @@ function calculateDamageDetails(totals, combatStyle = "melee") {
|
||||
return {
|
||||
singleHit,
|
||||
critHit,
|
||||
dps: singleHit * attackSpeed * doubleHit * crit * cooldown,
|
||||
dps: singleHit * attacksPerSecond * doubleHit * crit * cooldown,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -404,45 +403,11 @@ function updateEffectImpactHints(totals, currentDps) {
|
||||
const current = clampEffectValue(effect.type, Number(effect.value));
|
||||
const withoutThis = calculateDps(cloneTotalsWithEffectDelta(totals, effect.type, -current), state.combatStyle);
|
||||
const currentGain = percentChange(withoutThis, currentDps);
|
||||
const remaining = Math.max(0, def.cap - current);
|
||||
const plusOne = Math.min(1, remaining);
|
||||
const plusOneGain = plusOne > 0
|
||||
? percentChange(currentDps, calculateDps(cloneTotalsWithEffectDelta(totals, effect.type, plusOne), state.combatStyle))
|
||||
: 0;
|
||||
hint.textContent = `Cap: ${def.cap}%. Actual now: ${fmt(currentGain)}% DPS. Next +${fmt(plusOne)}%: ${fmt(plusOneGain)}% DPS.`;
|
||||
hint.textContent = `Actual: ${fmt(currentGain)}% DPS`;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderUpgrades(profile, totals, currentDps) {
|
||||
const upgrades = [];
|
||||
for (const piece of state.pieces) {
|
||||
for (const effect of piece.effects) {
|
||||
if (!effect.type) continue;
|
||||
const def = effectById(effect.type);
|
||||
const current = clampEffectValue(effect.type, Number(effect.value));
|
||||
const remaining = def.cap - current;
|
||||
if (remaining <= 0) continue;
|
||||
const plusOne = Math.min(1, remaining);
|
||||
const onePointDps = calculateDps(cloneTotalsWithEffectDelta(totals, effect.type, plusOne), state.combatStyle);
|
||||
const capDps = calculateDps(cloneTotalsWithEffectDelta(totals, effect.type, remaining), state.combatStyle);
|
||||
const onePointGain = percentChange(currentDps, onePointDps);
|
||||
const capGain = percentChange(currentDps, capDps);
|
||||
const fallback = profile.weights[effect.type] * 0.001;
|
||||
const efficiency = capGain || onePointGain || fallback;
|
||||
upgrades.push({ piece, def, current, remaining, efficiency, onePointGain, capGain });
|
||||
}
|
||||
}
|
||||
|
||||
upgrades.sort((a, b) => b.efficiency - a.efficiency);
|
||||
const count = state.recommendationCount;
|
||||
$("#upgradeList").innerHTML = upgrades.slice(0, count).map((item) => `
|
||||
<li><strong>${item.def.label}</strong> on ${escapeHtml(item.piece.name || item.piece.title)}
|
||||
<small>${fmt(item.current)}% now, ${fmt(item.remaining)}% room to cap. Next +1% gives ${fmt(item.onePointGain)}% DPS; to cap gives ${fmt(item.capGain)}% DPS.</small>
|
||||
</li>
|
||||
`).join("") || "<li>No upgradeable effects entered yet.</li>";
|
||||
}
|
||||
|
||||
function renderSacrifices(pieceScores) {
|
||||
const weakest = pieceScores
|
||||
.filter(({ piece }) => !piece.noEffects)
|
||||
|
||||
Reference in New Issue
Block a user