restore MP on level up, and some additional MP on cron (based on

stats.int) @wc8
This commit is contained in:
Tyler Renelle
2013-12-21 15:20:02 -07:00
parent 918f994a97
commit b98cfdb066
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -11911,6 +11911,7 @@ var process=require("__browserify_process");(function() {
stats.exp = 0;
}
user.stats.hp = 50;
user.stats.mp = user._statsComputed.maxMP;
}
}
user.stats.exp = stats.exp;
@@ -12065,6 +12066,10 @@ var process=require("__browserify_process");(function() {
stealth: 0,
streaks: false
};
user.stats.mp += Math.ceil(user._statsComputed.int * .15);
if (user.stats.mp > user._statsComputed.maxMP) {
user.stats.mp = user._statsComputed.maxMP;
}
return user;
},
preenUserHistory: function(minHistLen) {
+4
View File
@@ -970,6 +970,7 @@ api.wrap = (user) ->
if user.stats.lvl == 100
stats.exp = 0
user.stats.hp = 50
user.stats.mp = user._statsComputed.maxMP
user.stats.exp = stats.exp
# Set flags when they unlock features
@@ -1081,6 +1082,9 @@ api.wrap = (user) ->
user.markModified? 'history'
user.markModified? 'dailys' # covers dailys.*.history
user.stats.buffs = {str:0,int:0,per:0,con:0,stealth:0,streaks:false}
user.stats.mp += Math.ceil(user._statsComputed.int * .15)
if user.stats.mp > user._statsComputed.maxMP
user.stats.mp = user._statsComputed.maxMP
user
# Registered users with some history