diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 5c5079cb7f..eece98fed6 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11203,6 +11203,9 @@ var process=require("__browserify_process");(function() { if (user.stats.points > 0) { user.stats[stat]++; user.stats.points--; + if (stat === 'int') { + user.stats.mp++; + } } return typeof cb === "function" ? cb(null, req) : void 0; }, @@ -11400,7 +11403,7 @@ var process=require("__browserify_process");(function() { return _.reduce(['per', 'con', 'str', 'int'], function(m, stat) { m[stat] = _.reduce('stats stats.buffs items.gear.equipped.weapon items.gear.equipped.armor items.gear.equipped.head items.gear.equipped.shield'.split(' '), function(m2, path) { var val, _ref; - val = user.dotGet(path); + val = user.fns.dotGet(path); return m2 + (~path.indexOf('items.gear') ? (+((_ref = content.gear.flat[val]) != null ? _ref[stat] : void 0) || 0) * (~(val != null ? val.indexOf(user.stats["class"]) : void 0) ? 1.5 : 1) : +val[stat] || 0); }, 0); return m; diff --git a/script/index.coffee b/script/index.coffee index 32e44ab605..0014993d23 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -821,6 +821,7 @@ api.wrap = (user) -> if user.stats.points > 0 user.stats[stat]++ user.stats.points-- + user.stats.mp++ if stat is 'int' #increase their MP along with their max MP cb? null, req @@ -974,13 +975,13 @@ api.wrap = (user) -> get: -> _.reduce(['per','con','str','int'], (m,stat) => m[stat] = _.reduce('stats stats.buffs items.gear.equipped.weapon items.gear.equipped.armor items.gear.equipped.head items.gear.equipped.shield'.split(' '), (m2,path) => - val = user.dotGet(path) + val = user.fns.dotGet(path) m2 + - if ~path.indexOf('items.gear') - # get the gear stat, and multiply it by 1.5 if it's class-gear - (+content.gear.flat[val]?[stat] or 0) * (if ~val?.indexOf(user.stats.class) then 1.5 else 1) - else - +val[stat] or 0 + if ~path.indexOf('items.gear') + # get the gear stat, and multiply it by 1.5 if it's class-gear + (+content.gear.flat[val]?[stat] or 0) * (if ~val?.indexOf(user.stats.class) then 1.5 else 1) + else + +val[stat] or 0 , 0); m , {}) Object.defineProperty user, 'tasks',