mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-11 22:46:47 +00:00
fix(?) for issue 2222 - untick removes too little XP,GP
This is a proposed fix for issue 2222 ("unticking a todo with a checklist removes much less XP and GP than it should") BUT I HAVE NOT TESTED THIS (I don't have a local install yet - sorry). Please see my comments at the end of that issue. Note that I don't know why "if direction is 'up'" was originally included - there might have been (and still be) a good reason for it.
This commit is contained in:
parent
2d8dd47414
commit
6c5eae1847
1 changed files with 1 additions and 1 deletions
|
|
@ -743,7 +743,7 @@ api.wrap = (user) ->
|
|||
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 direction is 'up' and task.type is 'todo'
|
||||
if task.type is 'todo'
|
||||
nextDelta *= task.checklist.length
|
||||
|
||||
unless task.type is 'reward'
|
||||
|
|
|
|||
Loading…
Reference in a new issue