mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-31 19:20:25 +00:00
iterative levelling
This commit is contained in:
parent
8e7c93aa0b
commit
7e402c5688
1 changed files with 3 additions and 6 deletions
|
|
@ -142,14 +142,11 @@ updateStats = (model, newStats, batch) ->
|
|||
silent = false
|
||||
if newStats.exp >= tnl
|
||||
silent = true
|
||||
#user.set('stats.exp', newStats.exp)
|
||||
while newStats.exp >= tnl
|
||||
console.log(newStats.exp + " " + tnl)
|
||||
user.set('stats.exp', newStats.exp)
|
||||
while newStats.exp >= tnl # keep levelling up
|
||||
newStats.exp -= tnl
|
||||
obj.stats.lvl++
|
||||
tnl = obj.stats.lvl * 2
|
||||
#tnl = algos.tnl(obj.stats.lvl)
|
||||
console.log(tnl)
|
||||
tnl = algos.tnl(obj.stats.lvl)
|
||||
obj.stats.hp = 50
|
||||
|
||||
obj.stats.exp = newStats.exp
|
||||
|
|
|
|||
Loading…
Reference in a new issue