fix incorrect score setup

This commit is contained in:
2026-07-03 13:28:26 +03:00
parent 45ff877017
commit 15c3ec2018
6 changed files with 352 additions and 12 deletions
+2
View File
@@ -55,7 +55,9 @@ export function calculatedScore(stat: CardStatistics): number {
const now = Date.now();
const diffMs = now - stat.last_open;
const days = diffMs / (1000 * 60 * 60 * 24);
console.log(`Days ${days}`)
const multiplier = Math.pow(FADE_PER_DAY, Math.max(0, days));
console.log(`multiplier ${multiplier}`)
const v = stat.score * multiplier;
return v;
}