Merge pull request #591 from MrConcept/notifications

Iterative Levelling
This commit is contained in:
Tyler Renelle 2013-03-05 05:23:45 -08:00
commit db71cca404

View file

@ -143,8 +143,10 @@ updateStats = (model, newStats, batch) ->
if newStats.exp >= tnl if newStats.exp >= tnl
silent = true silent = true
user.set('stats.exp', newStats.exp) user.set('stats.exp', newStats.exp)
newStats.exp -= tnl while newStats.exp >= tnl # keep levelling up
obj.stats.lvl++ newStats.exp -= tnl
obj.stats.lvl++
tnl = algos.tnl(obj.stats.lvl)
obj.stats.hp = 50 obj.stats.hp = 50
obj.stats.exp = newStats.exp obj.stats.exp = newStats.exp