From 7e402c568803fa077c4e2bd028fe7bf0ebdbf7ee Mon Sep 17 00:00:00 2001 From: Philip How Date: Tue, 5 Mar 2013 13:17:46 +0000 Subject: [PATCH] iterative levelling --- src/app/scoring.coffee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/scoring.coffee b/src/app/scoring.coffee index 2ba065944d..a63a31a467 100644 --- a/src/app/scoring.coffee +++ b/src/app/scoring.coffee @@ -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