mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
iterative levelling
This commit is contained in:
parent
d616579e4e
commit
8e7c93aa0b
1 changed files with 8 additions and 3 deletions
|
|
@ -142,9 +142,14 @@ updateStats = (model, newStats, batch) ->
|
|||
silent = false
|
||||
if newStats.exp >= tnl
|
||||
silent = true
|
||||
user.set('stats.exp', newStats.exp)
|
||||
newStats.exp -= tnl
|
||||
obj.stats.lvl++
|
||||
#user.set('stats.exp', newStats.exp)
|
||||
while newStats.exp >= tnl
|
||||
console.log(newStats.exp + " " + tnl)
|
||||
newStats.exp -= tnl
|
||||
obj.stats.lvl++
|
||||
tnl = obj.stats.lvl * 2
|
||||
#tnl = algos.tnl(obj.stats.lvl)
|
||||
console.log(tnl)
|
||||
obj.stats.hp = 50
|
||||
|
||||
obj.stats.exp = newStats.exp
|
||||
|
|
|
|||
Loading…
Reference in a new issue