Skip to content
Merged
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
34 changes: 20 additions & 14 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7019,29 +7019,35 @@ local jewelOtherFuncs = {
["^(%w+) Passive Skills in Radius also grant (.*)$"] = function(passiveType, mod)
return function(node, out, data)
if node and (node.type == firstToUpper(passiveType) or (node.type == "Normal" and not node.isAttribute and firstToUpper(passiveType) == "Small")) then
local modList, line = parseMod(mod)
if not line and modList[1] then -- something failed to parse, do not add to list
modList[1].parsedLine = capitalizeWordsInString(mod)
modList[1].source = data.modSource
if type(modList[1].value) == "table" and modList[1].value.mod then
modList[1].value.mod.source = data.modSource
local modList, extra = parseMod(mod)
-- avoid adding mods if mod line wasn't parsed correctly
if not extra and modList[1] then
for _, modListMod in ipairs(modList) do
modListMod.parsedLine = capitalizeWordsInString(mod)
modListMod.source = data.modSource
if type(modListMod.value) == "table" and modListMod.value.mod then
modListMod.value.mod.source = data.modSource
end
out:AddMod(modListMod)
end
out:AddMod(modList[1])
end
end
end
end,
["conquered (%w+) Passive Skills also grant (.*)$"] = function(passiveType, mod)
return function(node, out, data)
if node and (node.type == firstToUpper(passiveType) or (node.type == "Normal" and not node.isAttribute and firstToUpper(passiveType) == "Small") or (node.type == "Normal" and node.isAttribute and firstToUpper(passiveType) == "Attribute")) then
local modList, line = parseMod(mod)
if not line and modList[1] then -- something failed to parse, do not add to list
modList[1].parsedLine = capitalizeWordsInString(mod)
modList[1].source = data.modSource
if type(modList[1].value) == "table" and modList[1].value.mod then
modList[1].value.mod.source = data.modSource
local modList, extra = parseMod(mod)
-- avoid adding mods if mod line wasn't parsed correctly
if not extra and modList[1] then
for _, modListMod in ipairs(modList) do
modListMod.parsedLine = capitalizeWordsInString(mod)
modListMod.source = data.modSource
if type(modListMod.value) == "table" and modListMod.value.mod then
modListMod.value.mod.source = data.modSource
end
out:AddMod(modListMod)
end
out:AddMod(modList[1])
end
end
end
Expand Down
Loading