Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 79e757d

Browse files
Merge pull request #20 from Paliak/issue-223
Fix re-introduce handling for widowhail unique
2 parents 5cb0039 + 20dbb80 commit 79e757d

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/Modules/CalcSetup.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,15 @@ function calcs.initEnv(build, mode, override, specEnv)
11081108
env.itemModDB:ScaleAddMod(mod, scale)
11091109
end
11101110
end
1111+
elseif item.type == "Quiver" and items["Weapon 1"] and items["Weapon 1"].name:match("Widowhail") then
1112+
local widowHailMod=(1 + (items["Weapon 1"].baseModList:Sum("INC", nil, "EffectOfBonusesFromQuiver") or 100) / 100)
1113+
scale = scale * widowHailMod
1114+
env.modDB:NewMod("WidowHailMultiplier", "BASE", widowHailMod, "Widowhail")
1115+
local combinedList = new("ModList")
1116+
for _, mod in ipairs(srcList) do
1117+
combinedList:MergeMod(mod)
1118+
end
1119+
env.itemModDB:ScaleAddList(combinedList, scale)
11111120
elseif env.modDB.multipliers["CorruptedMagicJewelEffect"] and item.type == "Jewel" and item.rarity == "MAGIC" and item.corrupted and slot.nodeId and item.base.subType ~= "Charm" then
11121121
scale = scale + env.modDB.multipliers["CorruptedMagicJewelEffect"]
11131122
local combinedList = new("ModList")

src/Modules/ModParser.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2839,10 +2839,10 @@ local specialModList = {
28392839
["(%d+)%% of recovery applied instantly"] = function(num) return { mod("FlaskInstantRecovery", "BASE", num) } end,
28402840
["has no attribute requirements"] = { flag("NoAttributeRequirements") },
28412841
-- Skill modifiers
2842-
["([%+%-]%d+)%% to quality of all skills"] = function(num) return { mod("GemProperty", "LIST", { keyword = "grants_active_skill", key = "quality", value = num }) } end,
2842+
["([%+%-]%d+)%% to quality of all skills"] = function(num) return { mod("GemProperty", "LIST", { keyword = "grants_active_skill", key = "quality", value = num, keyOfScaledMod = "value" }) } end,
28432843
["([%+%-]%d+)%%? to (%a+) of all ?([%a%- ]*) skills"] = function(num, _, property, type)
28442844
if type == "" then type = "all" end
2845-
return { mod("GemProperty", "LIST", { keyword = type, key = property, value = num }) }
2845+
return { mod("GemProperty", "LIST", { keyword = type, key = property, value = num, keyOfScaledMod = "value" }) }
28462846
end,
28472847
["grants level (%d+) snipe skill"] = function(num) return {
28482848
mod("ExtraSkill", "LIST", { skillId = "Snipe", level = num }),
@@ -2851,16 +2851,16 @@ local specialModList = {
28512851
-- Global gem modifiers
28522852
["([%+%-]%d+)%%? to (%a+) of all (.+) skills"] = function(num, _, property, skill)
28532853
if gemIdLookup[skill] then
2854-
return { mod("GemProperty", "LIST", {keyword = skill, key = "level", value = num }) }
2854+
return { mod("GemProperty", "LIST", {keyword = skill, key = "level", value = num, keyOfScaledMod = "value" }) }
28552855
end
28562856
local wordList = {}
28572857
for tag in skill:gmatch("%w+") do
28582858
table.insert(wordList, tag)
28592859
end
2860-
return { mod("GemProperty", "LIST", {keywordList = wordList, key = property, value = num }) }
2860+
return { mod("GemProperty", "LIST", {keywordList = wordList, key = property, value = num, keyOfScaledMod = "value" }) }
28612861
end,
2862-
["gems socketed in red sockets have [%+%-](%d+) to level"] = function(num) return { mod("GemProperty", "LIST", { keyword = "all", key = "level", value = num }, { type = "SocketedIn", slotName = "{SlotName}", socketColor = "R" }) } end,
2863-
["gems socketed in green sockets have [%+%-](%d+)%% to quality"] = function(num) return { mod("GemProperty", "LIST", { keyword = "all", key = "quality", value = num }, { type = "SocketedIn", slotName = "{SlotName}", socketColor = "G" }) } end,
2862+
["gems socketed in red sockets have [%+%-](%d+) to level"] = function(num) return { mod("GemProperty", "LIST", { keyword = "all", key = "level", value = num, keyOfScaledMod = "value" }, { type = "SocketedIn", slotName = "{SlotName}", socketColor = "R" }) } end,
2863+
["gems socketed in green sockets have [%+%-](%d+)%% to quality"] = function(num) return { mod("GemProperty", "LIST", { keyword = "all", key = "quality", value = num, keyOfScaledMod = "value" }, { type = "SocketedIn", slotName = "{SlotName}", socketColor = "G" }) } end,
28642864
["%+(%d+)%% to fire resistance when socketed with a red gem"] = function(num) return { mod("SocketProperty", "LIST", { value = mod("FireResist", "BASE", num) }, { type = "SocketedIn", slotName = "{SlotName}", keyword = "strength", sockets = {1} }) } end,
28652865
["%+(%d+)%% to cold resistance when socketed with a green gem"] = function(num) return { mod("SocketProperty", "LIST", { value = mod("ColdResist", "BASE", num) }, { type = "SocketedIn", slotName = "{SlotName}", keyword = "dexterity", sockets = {1} }) } end,
28662866
["%+(%d+)%% to lightning resistance when socketed with a blue gem"] = function(num) return { mod("SocketProperty", "LIST", { value = mod("LightningResist", "BASE", num) }, { type = "SocketedIn", slotName = "{SlotName}", keyword = "intelligence", sockets = {1} }) } end,

0 commit comments

Comments
 (0)