From f389ab8483583e6b539c822e15c41ea84c9a0952 Mon Sep 17 00:00:00 2001 From: Regisle Date: Tue, 20 Aug 2024 18:49:26 +0930 Subject: [PATCH] adds parsing for local elemental inc damage --- src/Classes/Item.lua | 4 ++++ src/Modules/ModParser.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Classes/Item.lua b/src/Classes/Item.lua index 7897b9cca0..f3c6969041 100644 --- a/src/Classes/Item.lua +++ b/src/Classes/Item.lua @@ -1342,6 +1342,10 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum) end min = round(min * (1 + physInc / 100) * (1 + qualityScalar / 100)) max = round(max * (1 + physInc / 100) * (1 + qualityScalar / 100)) + elseif dmgType ~= "Physical" and dmgType ~= "Chaos" then + local localInc = calcLocal(modList, "Local"..dmgType.."Damage", "INC", 0) + calcLocal(modList, "LocalElementalDamage", "INC", 0) + min = round(min * (1 + localInc / 100)) + max = round(max * (1 + localInc / 100)) end if min > 0 and max > 0 then weaponData[dmgType.."Min"] = min diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 96e0f84a3a..e1780e4d7d 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2725,6 +2725,7 @@ local specialModList = { ["has (%d+) sockets?"] = function(num) return { mod("SocketCount", "BASE", num) } end, ["has (%d+) abyssal sockets?"] = function(num) return { mod("AbyssalSocketCount", "BASE", num) } end, ["no physical damage"] = { mod("WeaponData", "LIST", { key = "PhysicalMin" }), mod("WeaponData", "LIST", { key = "PhysicalMax" }), mod("WeaponData", "LIST", { key = "PhysicalDPS" }) }, + ["has (%d+)%% increased elemental damage"] = function(num) return { mod("LocalElementalDamage", "INC", num) } end, ["all attacks with this weapon are critical strikes"] = { mod("WeaponData", "LIST", { key = "CritChance", value = 100 }) }, ["this weapon's critical strike chance is (%d+)%%"] = function(num) return { mod("WeaponData", "LIST", { key = "CritChance", value = num }) } end, ["counts as dual wielding"] = { mod("WeaponData", "LIST", { key = "countsAsDualWielding", value = true }) },