4,951
edits
Falterfire (talk | contribs) (more formatting fixes) |
Falterfire (talk | contribs) (More formatting fixes) |
||
Line 456: | Line 456: | ||
local statValue = p._getItemStat(item, statName, true) | local statValue = p._getItemStat(item, statName, true) | ||
result = result..'\r\n| style ="text-align: right;padding: 0 0.5em 0 0;' | result = result..'\r\n| style ="text-align: right;padding: 0 0.5em 0 0;' | ||
result = result..'"|'..Shared.formatnum(statValue) | result = result..'"|'..Shared.formatnum(statValue) | ||
if statName == 'magicDamageBonus' or statName == 'damageReduction' then result = result..'%' end | if statName == 'magicDamageBonus' or statName == 'damageReduction' then result = result..'%' end | ||
Line 492: | Line 487: | ||
local statValue = p._getItemStat(item, statName, true) | local statValue = p._getItemStat(item, statName, true) | ||
result = result..'\r\n| style ="text-align: right;padding: 0 0.5em 0 0;' | result = result..'\r\n| style ="text-align: right;padding: 0 0.5em 0 0;' | ||
if statValue > 0 then | if j == 1 then | ||
if statValue > 0 then | |||
result = result..'background-color:lightgreen;' | |||
elseif statValue < 0 then | |||
result = result..'background-color:lightpink;' | |||
end | |||
end | end | ||
result = result..'"|'..Shared.formatnum(statValue) | result = result..'"|'..Shared.formatnum(statValue) | ||
Line 507: | Line 504: | ||
end | end | ||
result = result..'|}' | result = result..'\r\n|}' | ||
return result | return result | ||
end | end | ||
return p | return p |