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

Stats can only be reduced to their minimum

git-svn-id: http://svn.net-core.org/repos/t-engine4@6159 51575b47-30f0-44d4-a5cc-537603b46e54
parent f57efea0
No related branches found
No related tags found
No related merge requests found
......@@ -126,9 +126,9 @@ function _M:getStat(stat, scale, raw, no_inc)
inc = self.inc_stats[stat]
end
if _M.stats_def[stat].no_max then
val = math.max(val, _M.stats_def[stat].min) + ((not no_inc) and inc or 0)
val = math.max(val + ((not no_inc) and inc or 0), _M.stats_def[stat].min)
else
val = util.bound(val, _M.stats_def[stat].min, _M.stats_def[stat].max) + ((not no_inc) and inc or 0)
val = math.max(util.bound(val, _M.stats_def[stat].min, _M.stats_def[stat].max) + ((not no_inc) and inc or 0), _M.stats_def[stat].min)
end
if scale then
if not raw then
......
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