Module:Sandbox/Constants: Difference between revisions

Fixed missing -, cleaned up a bit more
(Removed original functions)
(Fixed missing -, cleaned up a bit more)
Line 914: Line 914:
local valueUnsigned = false
local valueUnsigned = false
local modifier = GameData.rawData.modifierData[modifierName]
local modifier = GameData.rawData.modifierData[modifierName]
if modifier == nil then
return nil
end


if Shared.startsWith(modifierName, "increased") or Shared.startsWith(modifierName, "decreased") then
if Shared.startsWith(modifierName, "increased") or Shared.startsWith(modifierName, "decreased") then
Line 925: Line 921:
--TODO: Is this necessary anymore? This could theoretically match 'increasedRolledReflectDamage' ('+0-${value} Reflect Damage') incorrectly but this isn't used
--TODO: Is this necessary anymore? This could theoretically match 'increasedRolledReflectDamage' ('+0-${value} Reflect Damage') incorrectly but this isn't used
local sign = "+"
local sign = "+"
if string.match(modifier.description, '${value}') then
if string.match(modifier.description, '-${value}') then
sign = "-"
sign = "-"
end
end
464

edits