Merge pull request #100 from HabitRPG/sabe/fix
fix(calculateDelta): don't detrain stats on ripening To-Dos
This commit is contained in:
+1
-1
@@ -760,7 +760,7 @@ api.wrap = (user, main=true) ->
|
||||
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
|
||||
if (user.preferences.automaticAllocation is true and user.preferences.allocationMode is 'taskbased' and !(task.type is 'todo' and direction is 'down')) then user.stats.training[task.attribute] += nextDelta
|
||||
adjustAmt = nextDelta
|
||||
# ===== STRENGTH =====
|
||||
# (Only for up-scoring, ignore up-onlies and rewards)
|
||||
|
||||
Reference in New Issue
Block a user