Skip to content
Snippets Groups Projects
Commit 49fa4a5a authored by dg's avatar dg
Browse files

Levelup screen shows both base & current stats

git-svn-id: http://svn.net-core.org/repos/t-engine4@5374 51575b47-30f0-44d4-a5cc-537603b46e54
parent 3b360a22
No related branches found
No related tags found
No related merge requests found
......@@ -533,9 +533,9 @@ function _M:generateList()
if self.actor:getStat(sid, nil, nil, true) >= self.actor.level * 1.4 + 20 or
self.actor:isStatMax(sid) or
self.actor:getStat(sid, nil, nil, true) >= 60 + math.max(0, (self.actor.level - 50)) then
return tstring{{"color", 175, 175, 175}, tostring(self.actor:getStat(sid))}
return tstring{{"color", 175, 175, 175}, ("%d/%d"):format(self.actor:getStat(sid), self.actor:getStat(sid, nil, nil, true))}
else
return tstring{{"color", 0x00, 0xFF, 0x00}, tostring(self.actor:getStat(sid))}
return tstring{{"color", 0x00, 0xFF, 0x00}, ("%d/%d"):format(self.actor:getStat(sid), self.actor:getStat(sid, nil, nil, true))}
end
end,
}}}
......@@ -667,6 +667,9 @@ function _M:getStatDesc(item)
local color = diff >= 0 and {"color", "LIGHT_GREEN"} or {"color", "RED"}
local dc = {"color", "LAST"}
text:add("Current value: ", {"color", "LIGHT_GREEN"}, ("%d"):format(self.actor:getStat(stat_id)), dc, true)
text:add("Base value: ", {"color", "LIGHT_GREEN"}, ("%d"):format(self.actor:getStat(stat_id, nil, nil, true)), dc, true, true)
text:add({"color", "LIGHT_BLUE"}, "Stat gives:", dc, true)
if stat_id == self.actor.STAT_CON then
text:add("Max life: ", color, ("%0.2f"):format(diff * 4), dc, true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment