mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Merge pull request #591 from MrConcept/notifications
Iterative Levelling
This commit is contained in:
commit
db71cca404
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue