mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Merge branch 'develop' of github.com:lefnire/habitrpg into develop
This commit is contained in:
commit
26a26b5344
1 changed files with 4 additions and 2 deletions
|
|
@ -143,8 +143,10 @@ updateStats = (model, newStats, batch) ->
|
|||
if newStats.exp >= tnl
|
||||
silent = true
|
||||
user.set('stats.exp', newStats.exp)
|
||||
newStats.exp -= tnl
|
||||
obj.stats.lvl++
|
||||
while newStats.exp >= tnl # keep levelling up
|
||||
newStats.exp -= tnl
|
||||
obj.stats.lvl++
|
||||
tnl = algos.tnl(obj.stats.lvl)
|
||||
obj.stats.hp = 50
|
||||
|
||||
obj.stats.exp = newStats.exp
|
||||
|
|
|
|||
Loading…
Reference in a new issue