Skip to content

Commit

Permalink
attempt to lower rainbow
Browse files Browse the repository at this point in the history
  • Loading branch information
cozuya committed Sep 25, 2024
1 parent 6797eec commit 92aeed1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion routes/socket/badges.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ELO_BADGES = [

const XP_BADGES = [
// XP to badge
[50, 'xp50'],
[10, 'xp10'],
[100, 'xp100'],
[500, 'xp500'],
[1000, 'xp1000'],
Expand Down
4 changes: 2 additions & 2 deletions routes/socket/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ module.exports.rateEloGame = (game, accounts, winningPlayerNames) => {
account.eloSeason = eloSeason + changeSeason;
account.xpSeason = (account.xpSeason || 0) + xpChangeSeason;

if (account.xpOverall >= 50.0) {
if (account.xpOverall >= 10.0) {
account.isRainbowOverall = true;
account.dateRainbowOverall = new Date();
}

if (account.xpSeason >= 50.0) {
if (account.xpSeason >= 10.0) {
account.isRainbowSeason = true;
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/eloReset.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Account.find({ 'games.0': { $exists: true } })
acc.eloOverall = 1600;
acc.xpOverall = preResetGameCount;
acc.xpSeason = 0;
acc.isRainbowOverall = acc.xpOverall >= 50.0;
acc.isRainbowOverall = acc.xpOverall >= 10.0;
if (acc.isRainbowOverall) {
acc.dateRainbowOverall = new Date();
}
Expand Down

0 comments on commit 92aeed1

Please sign in to comment.