Skip to content

Commit

Permalink
adds parsing for local elemental inc damage
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle committed Aug 20, 2024
1 parent 31d6bc5 commit f389ab8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) },
Expand Down

0 comments on commit f389ab8

Please sign in to comment.