Orb of Rebirth Updates (Count usage) (#15629)

* Update orb of rebirth to count every usage

* Orb of rebirth modal UI updates

* Fix rebirth modal showing again after page refresh

* remove unused MAX_LEVEL

* scale orb of rebirth on modal

* UI & wording updates for Orb of Rebirth

* UI & wording updates for Orb of Rebirth cont.

* Orb of rebirth UI tweaks

* Orb of rebirth UI tweaks

* Orb of Rebirth modal UI tweak

* Extend modal waves

* Continued Orb of Rebirth UI Updates

* Orb of rebirth margin tweak

* rebirth-orb asset
This commit is contained in:
Fiz
2026-03-12 14:51:48 -05:00
committed by GitHub
parent 8c90e5472b
commit 74fc543ef2
8 changed files with 412 additions and 72 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ import each from 'lodash/each';
import pick from 'lodash/pick';
import i18n from '../i18n';
import { capByLevel } from '../statHelpers';
import { MAX_LEVEL } from '../constants';
import {
NotAuthorized,
} from '../libs/errors';
@@ -103,9 +102,9 @@ export default async function rebirth (user, tasks = [], req = {}, analytics) {
if (!user.achievements.rebirths) {
user.achievements.rebirths = 1;
user.achievements.rebirthLevel = lvl;
} else if (lvl > user.achievements.rebirthLevel || lvl === MAX_LEVEL) {
} else {
user.achievements.rebirths += 1;
user.achievements.rebirthLevel = lvl;
user.achievements.rebirthLevel = Math.max(user.achievements.rebirthLevel || 0, lvl);
}
if (!notFree) {