feat(crits): Make crit hits boost MP

Another nudge to make STR more attractive: critical hit on a To-Do multiplies MP gain.
This commit is contained in:
Sabe Jones 2014-06-22 14:44:39 -05:00
parent d72ca6f650
commit eb07a9c77a

View file

@ -893,6 +893,7 @@ api.wrap = (user, main=true) ->
# MP++ per checklist item in ToDo, bonus per CLI
multiplier = _.max([(_.reduce(task.checklist,((m,i)->m+(if i.completed then 1 else 0)),1)),1])
mpDelta = _.max([(multiplier), (.01 * user._statsComputed.maxMP * multiplier)])
mpDelta *= user._tmp.crit or 1
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