mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-25 15:15:52 +00:00
Merge pull request #100 from HabitRPG/sabe/fix
fix(calculateDelta): don't detrain stats on ripening To-Dos
This commit is contained in:
commit
77b2e5400f
2 changed files with 2 additions and 2 deletions
2
dist/habitrpg-shared.js
vendored
2
dist/habitrpg-shared.js
vendored
|
|
@ -12048,7 +12048,7 @@ var process=require("__browserify_process");(function() {
|
|||
}
|
||||
}
|
||||
if (task.type !== 'reward') {
|
||||
if (user.preferences.automaticAllocation === true && user.preferences.allocationMode === 'taskbased') {
|
||||
if (user.preferences.automaticAllocation === true && user.preferences.allocationMode === 'taskbased' && !(task.type === 'todo' && direction === 'down')) {
|
||||
user.stats.training[task.attribute] += nextDelta;
|
||||
}
|
||||
adjustAmt = nextDelta;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue