mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 05:03:39 +08:00
making sure to only take unique funboxes
This commit is contained in:
parent
84888c25dd
commit
f8f80fbeb0
1 changed files with 2 additions and 1 deletions
|
|
@ -625,7 +625,8 @@ async function calculateXp(
|
|||
}
|
||||
|
||||
if (funboxBonusConfiguration > 0) {
|
||||
const funboxModifier = _.sumBy(funbox.split("#"), (funboxName) => {
|
||||
const resultFunboxes = _.uniq(funbox.split("#"));
|
||||
const funboxModifier = _.sumBy(resultFunboxes, (funboxName) => {
|
||||
const funbox = FunboxesMetadata[funboxName as string];
|
||||
const difficultyLevel = funbox?.difficultyLevel ?? 0;
|
||||
return Math.max(difficultyLevel * funboxBonusConfiguration, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue