Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Classes/ModList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function ModListClass:ReplaceModInternal(mod)
return false
end

function ModListClass:MergeMod(mod)
function ModListClass:MergeMod(mod, skipNonAdditive)
if mod.type == "BASE" or mod.type == "INC" or mod.type == "MORE" then
for i = 1, #self do
if modLib.compareModParams(self[i], mod) then
Expand All @@ -55,7 +55,9 @@ function ModListClass:MergeMod(mod)
end
end
end
self:AddMod(mod)
if not skipNonAdditive then
self:AddMod(mod)
end
end

function ModListClass:AddList(modList)
Expand Down
1 change: 0 additions & 1 deletion src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function ModStoreClass:ScaleAddMod(mod, scale)
if scale == 1 or unscalable then
self:AddMod(mod)
else
scale = m_max(scale, 0)
local scaledMod = copyTable(mod)
local subMod = scaledMod
if type(scaledMod.value) == "table" then
Expand Down
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,7 @@ c["50% reduced Reload Speed"]={{[1]={flags=1,keywordFlags=0,name="ReloadSpeed",t
c["50% reduced Shock duration on you"]={{[1]={flags=0,keywordFlags=0,name="SelfShockDuration",type="INC",value=-50}},nil}
c["50% reduced Slowing Potency of Debuffs on You"]={{}," Slowing Potency of Debuffs on You "}
c["50% reduced Slowing Potency of Debuffs on You 20 to 30 Physical Thorns damage"]={{[1]={flags=0,keywordFlags=0,name="ThornsDamage",type="INC",value=-50}}," Slowing Potency of Debuffs on You 20 to 30 Physical "}
c["50% reduced bonuses gained from Equipped Focus"]={{}," bonuses gained "}
c["50% reduced bonuses gained from Equipped Focus"]={{[1]={flags=0,keywordFlags=0,name="EffectOfBonusesFromFocus",type="INC",value=-50}},nil}
c["50% reduced effect of Shock on you"]={{[1]={flags=0,keywordFlags=0,name="SelfShockEffect",type="INC",value=-50}},nil}
c["50% reduced effect of Withered on you"]={{[1]={flags=0,keywordFlags=0,name="WitherEffectOnSelf",type="INC",value=-50}},nil}
c["500% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="Armour",type="INC",value=500}},nil}
Expand Down
12 changes: 12 additions & 0 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,18 @@ function calcs.initEnv(build, mode, override, specEnv)
env.itemModDB:ScaleAddMod(mod, scale)
end
end
elseif item.type == "Focus" and calcLib.mod(nodesModsList, nil, "EffectOfBonusesFromFocus") ~=1 then
scale = calcLib.mod(nodesModsList, nil, "EffectOfBonusesFromFocus") - 1
local combinedList = new("ModList")
for _, mod in ipairs(srcList) do
combinedList:MergeMod(mod)
end
local scaledList = new("ModList")
scaledList:ScaleAddList(combinedList, scale)
for _, mod in ipairs(scaledList) do
combinedList:MergeMod(mod, true)
end
env.itemModDB:AddList(combinedList)
elseif item.name:match("Kalandra's Touch") then
-- Reset mult counters since they don't work for kalandra
if item["corrupted"] then
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4698,6 +4698,7 @@ local specialModList = {
["projectiles deal (%d+)%% increased damage with hits and ailments for each time they have chained"] = function(num) return { mod("Damage", "INC", num, nil, 0, bor(KeywordFlag.Hit, KeywordFlag.Ailment), { type = "PerStat", stat = "Chain" }, { type = "SkillType", skillType = SkillType.Projectile }) } end,
["projectiles deal (%d+)%% increased damage with hits and ailments for each enemy pierced"] = function(num) return { mod("Damage", "INC", num, nil, 0, bor(KeywordFlag.Hit, KeywordFlag.Ailment), { type = "PerStat", stat = "PiercedCount" }, { type = "SkillType", skillType = SkillType.Projectile }) } end,
["(%d+)%% increased bonuses gained from equipped quiver"] = function(num) return {mod("EffectOfBonusesFromQuiver", "INC", num)} end,
["(%d+)%% reduced bonuses gained from equipped focus"] = function(num) return {mod("EffectOfBonusesFromFocus", "INC", -num)} end,
["(%d+)%% increased bonuses gained from equipped rings"] = function(num) return {
mod("EffectOfBonusesFromRing 1", "INC", num),
mod("EffectOfBonusesFromRing 2", "INC", num),
Expand Down
Loading