* Changes wordig for one vs two hand items (#120)

* [PoE2] - Rune type mod showing as "filters.tag_rune" instead of "RUNE" #108

* [PoE2] Missing Total / Elemental DPS on weapon #109

* [PoE2] no option to change from divine currency to exalt in price check #119

* Adds + to all ele res

* version bump

* also version bump
This commit is contained in:
Kvan7
2024-12-19 15:44:09 -06:00
committed by GitHub
parent 06be6dc2e0
commit c25192e6fe
19 changed files with 158 additions and 8340 deletions

View File

@@ -635,6 +635,60 @@ function parseWeapon(section: string[], item: ParsedItem) {
isParsed = "SECTION_PARSED";
continue;
}
if (line.startsWith(_$.FIRE_DAMAGE)) {
const fireDamage = line
.slice(_$.FIRE_DAMAGE.length)
.split(", ")
.map((element) =>
getRollOrMinmaxAvg(
element.split("-").map((str) => parseInt(str, 10)),
),
)
.reduce((sum, x) => sum + x, 0);
if (item.weaponELEMENTAL) {
item.weaponELEMENTAL = fireDamage + item.weaponELEMENTAL;
} else {
item.weaponELEMENTAL = fireDamage;
}
isParsed = "SECTION_PARSED";
continue;
}
if (line.startsWith(_$.COLD_DAMAGE)) {
const coldDamage = line
.slice(_$.COLD_DAMAGE.length)
.split(", ")
.map((element) =>
getRollOrMinmaxAvg(
element.split("-").map((str) => parseInt(str, 10)),
),
)
.reduce((sum, x) => sum + x, 0);
if (item.weaponELEMENTAL) {
item.weaponELEMENTAL = coldDamage + item.weaponELEMENTAL;
} else {
item.weaponELEMENTAL = coldDamage;
}
isParsed = "SECTION_PARSED";
continue;
}
if (line.startsWith(_$.LIGHTNING_DAMAGE)) {
const lightningDamage = line
.slice(_$.LIGHTNING_DAMAGE.length)
.split(", ")
.map((element) =>
getRollOrMinmaxAvg(
element.split("-").map((str) => parseInt(str, 10)),
),
)
.reduce((sum, x) => sum + x, 0);
if (item.weaponELEMENTAL) {
item.weaponELEMENTAL = lightningDamage + item.weaponELEMENTAL;
} else {
item.weaponELEMENTAL = lightningDamage;
}
isParsed = "SECTION_PARSED";
continue;
}
}
if (isParsed === "SECTION_PARSED") {