Skip to content

Commit d31a129

Browse files
committed
Change XP multiplier for overdue tasks that are based on task due date so the XP multiplier get less over time
1 parent 5db378f commit d31a129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/store/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default createStore({
2626
Number(new Date().setHours(23, 59, 59, 999))) /
2727
(1000 * 24 * 60 * 60); //calculate number of days until the task is due
2828
const dateMultiplier: number =
29-
daysToDue < 0 ? 0.5 : 1 + 1 / (daysToDue + 1); //if task is overdue, xp multiplier is half the amount, else xp multiplier bonus increases when task gets closer to due date
29+
daysToDue < 0 ? -3 / (daysToDue - 1) : 1 + 1 / (daysToDue + 1); //if task is overdue, xp multiplier is less than 1 that decreases over time when task is overdue, else xp multiplier bonus increases (more than 1) when task gets closer to due date
3030
let repeatMultiplier: number; //calculate task repetition multiplier based on task repetition occurance and task repetition frequency
3131
if (task.repeatFrequency == 1) {
3232
//if task repetition is daily

0 commit comments

Comments
 (0)