Module:ModifierTables: Difference between revisions

Fix constellation modifier handling
No edit summary
(Fix constellation modifier handling)
Line 50: Line 50:
local consMods = Skills._getConstellationModifiers(cons)
local consMods = Skills._getConstellationModifiers(cons)
for modType, modsForType in pairs(consMods) do
for modType, modsForType in pairs(consMods) do
local mods = Modifiers.getMatchingModifiers(modsForType, modifierNames, skill)
local modData = {}
-- Compile player modifiers
for _, mods in ipairs(modsForType) do
if mods.modifiers ~= nil then
table.insert(modData, mods.modifiers)
end
end
local mods = Modifiers.getMatchingModifiers(modData, modifierNames, skill)
if not Shared.tableIsEmpty(mods.matched) then
if not Shared.tableIsEmpty(mods.matched) then
return true
return true
Line 59: Line 66:
return consList
return consList
end
end


function p.getPillarsWithModifier(modifierNames, skill)
function p.getPillarsWithModifier(modifierNames, skill)
Line 343: Line 351:
for modType, modsForType in pairs(modListByType) do
for modType, modsForType in pairs(modListByType) do
for _, mod in ipairs(modsForType) do
for _, mod in ipairs(modsForType) do
table.insert(modList, mod)
if mod.modifiers ~= nil then
table.insert(modList, mod.modifiers)
end
end
end
end
end