Skip to content

Commit

Permalink
fix suffixes, making them not be needed to export
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle committed Aug 20, 2024
1 parent 231a1a2 commit 89ed929
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 67 deletions.
4 changes: 3 additions & 1 deletion src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1195,13 +1195,15 @@ function ItemClass:Craft()
if mod then
for _, line in ipairs(mod) do
if line:find("effect") then
line = itemLib.applyRange(line, affix.range or 0.5, nil)
modLineMultipliers["localEffect"] = (modLineMultipliers["localEffect"] or 0) + (line:match("^(%d+)%% increased effect") or 0) - (line:match("^(%d+)%% reduced effect") or 0)
end
end
end
end
end
end
ConPrintTable(modLineMultipliers)
for _, list in ipairs({self.prefixes,self.suffixes}) do
for i = 1, self.affixLimit / 2 do
local affix = list[i]
Expand All @@ -1216,7 +1218,7 @@ function ItemClass:Craft()
self.nameSuffix = " " .. mod.affix
end
self.requirements.level = m_max(self.requirements.level or 0, m_floor(mod.level * 0.8))
local rangeScalar = getRangeScalarFromTag(self.base.tincture and "tincture" or self.catalyst, mod.modTags, self.quality or self.catalystQuality, modLineMultipliers)
local rangeScalar = getRangeScalarFromTag(self.base.tincture and "tincture" or self.catalyst, self.base.tincture and mod.type == "Suffix" and { "tincture" } or mod.modTags, self.quality or self.catalystQuality, modLineMultipliers)
for i, line in ipairs(mod) do
line = itemLib.applyRange(line, affix.range or 0.5, rangeScalar)
local order = mod.statOrder[i]
Expand Down
Loading

0 comments on commit 89ed929

Please sign in to comment.