Module:Abilities: Difference between revisions

No edit summary
No edit summary
Line 156: Line 156:
if element == nil then return "" end
if element == nil then return "" end
end
end
end
if element == nil then
return "" -- The property doesn't exist in this specific upgrade, which is a valid case. Return empty.
end
-- If the property is a table (like a Damage object), return its Value field
if type(element) == "table" then
    return element.Value or ""
end
end