Skip to content

Commit f5cb8e2

Browse files
committed
chore: add breakdown item if gainMultiplier anything other than 1
1 parent ada3376 commit f5cb8e2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

backend/__tests__/api/controllers/result.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ describe("result controller test", () => {
631631
xp: 0,
632632
dailyXpBonus: false,
633633
xpBreakdown: {
634+
configMultiplier: 0,
634635
accPenalty: 28,
635636
base: 20,
636637
incomplete: 5,

backend/src/api/controllers/result.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ async function calculateXp(
825825
const totalXp =
826826
Math.round((xpAfterAccuracy + incompleteXp) * gainMultiplier) + dailyBonus;
827827

828-
if (gainMultiplier > 1) {
828+
if (gainMultiplier !== 1) {
829829
// breakdown.push([
830830
// "configMultiplier",
831831
// Math.round((xpAfterAccuracy + incompleteXp) * (gainMultiplier - 1)),

0 commit comments

Comments
 (0)