Merge remote-tracking branch 'colegleason/checklist-mp' into develop

Conflicts:
	dist/habitrpg-shared.js
This commit is contained in:
Tyler Renelle
2014-01-15 16:52:13 -07:00
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -845,7 +845,9 @@ api.wrap = (user, main=true) ->
else
calculateDelta()
addPoints() # obviously for delta>0, but also a trick to undo accidental checkboxes
mpDelta = _.max([(1 + (task.checklist?.length or 0)), (.01 * user._statsComputed.maxMP * (1 + (task.checklist?.length or 0)))]) # MP++ per ToDo, bonus per CLI
# MP++ per checklist item in ToDo, bonus per CLI
multiplier = task.checklist?.length || 1
mpDelta = _.max([(multiplier), (.01 * user._statsComputed.maxMP * multiplier)])
mpDelta *= -1 if direction is 'down' # unticking a todo
user.stats.mp += mpDelta
user.stats.mp = user._statsComputed.maxMP if user.stats.mp >= user._statsComputed.maxMP