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:
@@ -1,8 +1,15 @@
|
||||
{
|
||||
"rebirthNew": "Rebirth: New Adventure Available!",
|
||||
"rebirthUnlock": "You've unlocked Rebirth! This special Market item allows you to begin a new game at level 1 while keeping your tasks, achievements, pets, and more. Use it to breathe new life into Habitica if you feel you've achieved it all, or to experience new features with the fresh eyes of a beginning character!",
|
||||
"rebirthAchievement": "You've begun a new adventure! This is Rebirth <%= number %> for you, and the highest Level you've attained is <%= level %>. To stack this Achievement, begin your next new adventure when you've reached an even higher Level!",
|
||||
"rebirthAchievement100": "You've begun a new adventure! This is Rebirth <%= number %> for you, and the highest Level you've attained is 100 or higher. To stack this Achievement, begin your next new adventure when you've reached at least 100!",
|
||||
"rebirthUnlockedNewItem": "Orb of Rebirth Unlocked",
|
||||
"rebirthUnlockedOrb": "A new adventure is available!",
|
||||
"rebirthUnlockedDesc": "Use the Orb of Rebirth to breathe new life into your Habitica adventure once you feel you've achieved it all! Begin again at level 1 while keeping your tasks, Achievements, and Pets with this special item found in the Market.",
|
||||
"rebirthNewAchievement": "New Achievement",
|
||||
"rebirthNewAdventure": "A new adventure begins now!",
|
||||
"rebirthAchievement": "You've used the Orb of Rebirth <strong><%= number %></strong> time, and your highest level reached is <strong><%= level %></strong>.",
|
||||
"rebirthAchievementPlural": "You've used the Orb of Rebirth <strong><%= number %></strong> times, and your highest level reached is <strong><%= level %></strong>.",
|
||||
"rebirthAchievement100": "You've used the Orb of Rebirth <strong><%= number %></strong> times, and your highest level reached is <strong>100</strong> or higher.",
|
||||
"rebirthStackInfo": "This achievement will stack each time you use the Orb of Rebirth.",
|
||||
"rebirthBegan": "Began a New Adventure",
|
||||
"rebirthText": "Began <%= rebirths %> New Adventures",
|
||||
"rebirthOrb": "Used an Orb of Rebirth to start over after attaining Level <%= level %>.",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user