diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index ac401e846e..a3fa5bc3fa 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -12041,8 +12041,10 @@ var process=require("__browserify_process");(function() { return m + (i.completed ? 1 : 0); }), 0) / task.checklist.length; } - if (task.type === 'todo') { - nextDelta *= task.checklist.length; + if (task.type === 'todo' && direction === 'up') { + nextDelta *= 1 + _.reduce(task.checklist, (function(m, i) { + return m + (i.completed ? 1 : 0); + }), 0); } } if (task.type !== 'reward') { diff --git a/script/index.coffee b/script/index.coffee index 9e11bd756e..9c38ea15f7 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -755,9 +755,9 @@ api.wrap = (user, main=true) -> # If the Daily, only dock them them a portion based on their checklist completion if direction is 'down' and task.type is 'daily' and options.cron nextDelta *= (1 - _.reduce(task.checklist,((m,i)->m+(if i.completed then 1 else 0)),0) / task.checklist.length) - # If To-Do, point-match the TD per checklist item - if task.type is 'todo' - nextDelta *= task.checklist.length + # If To-Do, point-match the TD per checklist item completed + if task.type is 'todo' and direction is 'up' + nextDelta *= (1 + _.reduce(task.checklist,((m,i)->m+(if i.completed then 1 else 0)),0)) unless task.type is 'reward' if (user.preferences.automaticAllocation is true and user.preferences.allocationMode is 'taskbased') then user.stats.training[task.attribute] += nextDelta