mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
reset hp on level up (thought i did already..)
This commit is contained in:
parent
881019f4e9
commit
ac2fc49e12
2 changed files with 2 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue