Fix poison to use actual statmap instead of build statmap (#204)

Co-authored-by: hppeng <hppeng>
This commit is contained in:
hppeng-wynn 2022-08-14 19:55:31 -07:00 committed by GitHub
parent 66a8ff2166
commit 874b8b1746
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -717,7 +717,7 @@ class BuildDisplayNode extends ComputeNode {
// TODO: move weapon out?
// displayDefenseStats(document.getElementById("defensive-stats"), stats);
displayPoisonDamage(document.getElementById("build-poison-stats"), build);
displayPoisonDamage(document.getElementById("build-poison-stats"), stats);
displayEquipOrder(document.getElementById("build-order"), build.equip_order);
}
}

View file

@ -997,9 +997,9 @@ function displayFixedID(active, id, value, elemental_format, style) {
}
}
function displayPoisonDamage(overallparent_elem, build) {
function displayPoisonDamage(overallparent_elem, statMap) {
overallparent_elem.textContent = "";
if (build.statMap.get('poison') <= 0) {
if (statMap.get('poison') <= 0) {
overallparent_elem.style = "display: none";
return;
}
@ -1013,7 +1013,7 @@ function displayPoisonDamage(overallparent_elem, build) {
title_elemavg.append(make_elem('span', [], { textContent: "Poison Stats" }));
spell_summary.append(title_elemavg);
let poison_tick = Math.ceil(build.statMap.get("poison") * (1+skillPointsToPercentage(build.total_skillpoints[0])) * (build.statMap.get("poisonPct"))/100 /3);
let poison_tick = Math.ceil(statMap.get("poison") * (1+skillPointsToPercentage(statMap.get('str'))) * (statMap.get("poisonPct"))/100 /3);
let overallpoisonDamage = make_elem("p");
overallpoisonDamage.append(