Fix tomes (for real...)

This commit is contained in:
hppeng 2022-06-26 04:12:04 -07:00
parent aa9041bd01
commit 762120d189
2 changed files with 3 additions and 10 deletions

View file

@ -168,7 +168,6 @@ class Build{
//Create a map of this build's stats //Create a map of this build's stats
let statMap = new Map(); let statMap = new Map();
statMap.set("damageMultiplier", 1);
statMap.set("defMultiplier", 1); statMap.set("defMultiplier", 1);
for (const staticID of staticIDs) { for (const staticID of staticIDs) {
@ -191,23 +190,17 @@ class Build{
console.log(item_stats); console.log(item_stats);
for (const staticID of staticIDs) { for (const staticID of staticIDs) {
if (item_stats.get(staticID)) { if (item_stats.get(staticID)) {
if (staticID == "damMobs") {
statMap.set('damageMultiplier', statMap.get('damageMultiplier') * item_stats.get(staticID));
}
else if (staticID === "defMobs") {
statMap.set('defMultiplier', statMap.get('defMultiplier') * item_stats.get(staticID));
}
else {
statMap.set(staticID, statMap.get(staticID) + item_stats.get(staticID)); statMap.set(staticID, statMap.get(staticID) + item_stats.get(staticID));
} }
} }
}
if (item_stats.get("majorIds")) { if (item_stats.get("majorIds")) {
for (const major_id of item_stats.get("majorIds")) { for (const major_id of item_stats.get("majorIds")) {
major_ids.add(major_id); major_ids.add(major_id);
} }
} }
} }
statMap.set('damageMultiplier', 1 + (statMap.get('damMobs') / 100));
statMap.set('defMultiplier', 1 - (statMap.get('defMobs') / 100));
statMap.set("activeMajorIDs", major_ids); statMap.set("activeMajorIDs", major_ids);
for (const [setName, count] of this.activeSetCounts) { for (const [setName, count] of this.activeSetCounts) {
const bonus = sets.get(setName).bonuses[count-1]; const bonus = sets.get(setName).bonuses[count-1];

View file

@ -524,7 +524,7 @@ function getDefenseStats(stats) {
defenseStats.push(totalHp); defenseStats.push(totalHp);
//EHP //EHP
let ehp = [totalHp, totalHp]; let ehp = [totalHp, totalHp];
let defMult = (2 - stats.get("classDef")) * (2 - stats.get("defMultiplier")); let defMult = (2 - stats.get("classDef")) * stats.get("defMultiplier");
ehp[0] /= (1-def_pct)*(1-agi_pct)*defMult; ehp[0] /= (1-def_pct)*(1-agi_pct)*defMult;
ehp[1] /= (1-def_pct)*defMult; ehp[1] /= (1-def_pct)*defMult;
defenseStats.push(ehp); defenseStats.push(ehp);