mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
committed by
Blade Barringer
parent
bccdf4e989
commit
b54441a637
@@ -150,14 +150,17 @@ function _changeTaskValue (user, task, direction, times, cron) {
|
||||
|
||||
if (direction === 'up') { // Make progress on quest based on STR
|
||||
user.party.quest.progress.up = user.party.quest.progress.up || 0;
|
||||
let prevProgress = user.party.quest.progress.up;
|
||||
|
||||
if (task.type === 'todo' || task.type === 'daily') {
|
||||
user.party.quest.progress.up += nextDelta * (1 + user._statsComputed.str / 200);
|
||||
} else if (task.type === 'habit') {
|
||||
user.party.quest.progress.up += nextDelta * (0.5 + user._statsComputed.str / 400);
|
||||
}
|
||||
}
|
||||
|
||||
if (!user._tmp.quest) user._tmp.quest = {};
|
||||
user._tmp.quest.progressDelta = user.party.quest.progress.up - prevProgress;
|
||||
}
|
||||
task.value += nextDelta;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user