reset hp on level up (thought i did already..)

This commit is contained in:
Tyler Renelle
2012-09-02 16:36:07 -04:00
parent 881019f4e9
commit ac2fc49e12
2 changed files with 2 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ updateStats = function(user, stats) {
if (stats.exp >= tnl) {
stats.exp -= tnl;
user.set('stats.lvl', user.get('stats.lvl') + 1);
user.set('stats.hp', 50);
statsNotification('<i class="icon-chevron-up"></i> Level Up!', 'info');
}
if (!user.get('items.itemsEnabled') && stats.exp >= 15) {

View File

@@ -41,6 +41,7 @@ updateStats = (user, stats) ->
if stats.exp >= tnl
stats.exp -= tnl
user.set 'stats.lvl', user.get('stats.lvl') + 1
user.set 'stats.hp', 50
statsNotification('<i class="icon-chevron-up"></i> Level Up!', 'info')
if !user.get('items.itemsEnabled') and stats.exp >=15
user.set 'items.itemsEnabled', true