mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
@@ -33,7 +33,7 @@
|
||||
"seasonalShopFallText": "Welcome to the Seasonal Shop!! We're stocking autumn <a href='http://habitica.wikia.com/wiki/Item_Availability' target='_blank'>Seasonal Edition</a> goodies at the moment. Everything here will be available to purchase during the Fall Festival event each year, but we're only open until October 31, so be sure to stock up now, or you'll have to wait a year to buy these items again!",
|
||||
"seasonalShopWinterText": "Welcome to the Seasonal Shop!! We're stocking winter <a href='http://habitica.wikia.com/wiki/Item_Availability' target='_blank'>Seasonal Edition</a> goodies at the moment. Everything here will be available to purchase during the Winter Wonderland event each year, but we're only open until January 31, so be sure to stock up now, or you'll have to wait a year to buy these items again!",
|
||||
"seasonalShopFallTextBroken": "Oh.... Welcome to the Seasonal Shop... We're stocking autumn Seasonal Edition goodies, or something... Everything here will be available to purchase during the Fall Festival event each year, but we're only open until October 31... I guess you should to stock up now, or you'll have to wait... and wait... and wait... <strong>*sigh*</strong>",
|
||||
"seasonalShopRebirth": "If you've used the Orb of Rebirth, you can repurchase this equipment in the Rewards Column. Initially, you'll only be able to purchase the items for your current class (Warrior by default), but fear not, the other class-specific items will become available if you switch to that class.",
|
||||
"seasonalShopRebirth": "If you bought any of this equipment in the past but don't currently own it, you can repurchase it in the Rewards Column. Initially, you'll only be able to purchase the items for your current class (Warrior by default), but fear not, the other class-specific items will become available if you switch to that class.",
|
||||
"candycaneSet": "Candy Cane (Mage)",
|
||||
"skiSet": "Ski-sassin (Rogue)",
|
||||
"snowflakeSet": "Snowflake (Healer)",
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
"rebirthBegin": "Rebirth: Begin a New Adventure",
|
||||
"rebirthStartOver": "Rebirth starts your character over from Level 1.",
|
||||
"rebirthAdvList1": "You return to full Health.",
|
||||
"rebirthAdvList2": "You have no Experience, Gold, or Equipment (with the exception of free items like Mystery items).",
|
||||
"rebirthAdvList2": "You have no Experience or Gold.",
|
||||
"rebirthAdvList3": "Your Habits, Dailies, and To-Dos reset to yellow, and streaks reset, except for challenge tasks.",
|
||||
"rebirthAdvList4": "You have the starting class of Warrior until you earn a new class.",
|
||||
"rebirthInherit": "Your new character inherits a few things from their predecessor:",
|
||||
"rebirthInList1": "Tasks, history, and settings remain.",
|
||||
"rebirthInList1": "Tasks, history, equipment, and settings remain.",
|
||||
"rebirthInList2": "Challenge, Guild, and Party memberships remain.",
|
||||
"rebirthInList3": "Gems, backer tiers, and contributor levels remain.",
|
||||
"rebirthInList4": "Items obtained from Gems or drops (such as pets and mounts) remain, though you cannot access them until you unlock them again.",
|
||||
"rebirthInList5": "Limited edition equipment you've purchased can be repurchased, even if its event has ended. To repurchase class-specific equipment, you must first change to the correct class.",
|
||||
"rebirthEarnAchievement": "You also earn an Achievement for beginning a new adventure!",
|
||||
"beReborn": "Be Reborn",
|
||||
"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!",
|
||||
@@ -21,7 +20,7 @@
|
||||
"rebirthText": "Began <%= rebirths %> New Adventures",
|
||||
"rebirthOrb": "Used an Orb of Rebirth to start over after attaining Level",
|
||||
"rebirthOrb100": "Used an Orb of Rebirth to start over after attaining Level 100 or higher",
|
||||
"rebirthPop": "Begin a new character at Level 1 while retaining achievements, collectibles, and tasks with history.",
|
||||
"rebirthPop": "Begin a new character at Level 1 while retaining achievements, collectibles, equipment, and tasks with history.",
|
||||
"rebirthName": "Orb of Rebirth",
|
||||
"reborn": "Reborn, max level <%= reLevel %>",
|
||||
"confirmReborn": "Are you sure?",
|
||||
|
||||
@@ -5,13 +5,12 @@ import { MAX_LEVEL } from '../constants';
|
||||
import {
|
||||
NotAuthorized,
|
||||
} from '../libs/errors';
|
||||
import resetGear from '../fns/resetGear';
|
||||
import equip from './equip';
|
||||
|
||||
const USERSTATSLIST = ['per', 'int', 'con', 'str', 'points', 'gp', 'exp', 'mp'];
|
||||
|
||||
module.exports = function rebirth (user, tasks = [], req = {}, analytics) {
|
||||
if (user.balance < 2 && user.stats.lvl < MAX_LEVEL) {
|
||||
if (user.balance < 1.5 && user.stats.lvl < MAX_LEVEL) {
|
||||
throw new NotAuthorized(i18n.t('notEnoughGems', req.language));
|
||||
}
|
||||
|
||||
@@ -21,9 +20,9 @@ module.exports = function rebirth (user, tasks = [], req = {}, analytics) {
|
||||
};
|
||||
|
||||
if (user.stats.lvl < MAX_LEVEL) {
|
||||
user.balance -= 2;
|
||||
user.balance -= 1.5;
|
||||
analyticsData.acquireMethod = 'Gems';
|
||||
analyticsData.gemCost = 8;
|
||||
analyticsData.gemCost = 6;
|
||||
} else {
|
||||
analyticsData.gemCost = 0;
|
||||
analyticsData.acquireMethod = '> 100';
|
||||
@@ -59,8 +58,6 @@ module.exports = function rebirth (user, tasks = [], req = {}, analytics) {
|
||||
stats[value] = 0;
|
||||
});
|
||||
|
||||
resetGear(user);
|
||||
|
||||
if (user.items.currentPet) {
|
||||
equip(user, {
|
||||
params: {
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('POST /user/rebirth', () => {
|
||||
|
||||
it('resets user\'s tasks', async () => {
|
||||
await user.update({
|
||||
balance: 2,
|
||||
balance: 1.5,
|
||||
});
|
||||
|
||||
let daily = await generateDaily({
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('shared.ops.rebirth', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
user = generateUser();
|
||||
user.balance = 2;
|
||||
user.balance = 1.5;
|
||||
tasks = [generateHabit(), generateDaily(), generateTodo(), generateReward()];
|
||||
});
|
||||
|
||||
@@ -119,27 +119,25 @@ describe('shared.ops.rebirth', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('resets a user\'s gear', () => {
|
||||
let gearReset = {
|
||||
armor: 'armor_base_0',
|
||||
weapon: 'weapon_warrior_0',
|
||||
head: 'head_base_0',
|
||||
shield: 'shield_base_0',
|
||||
};
|
||||
it('retains a user\'s gear', () => {
|
||||
let prevGearEquipped = user.items.gear.equipped;
|
||||
let prevGearCostume = user.items.gear.costume;
|
||||
let prevPrefCostume = user.preferences.costume;
|
||||
|
||||
rebirth(user);
|
||||
|
||||
expect(user.items.gear.equipped).to.deep.equal(gearReset);
|
||||
expect(user.items.gear.costume).to.deep.equal(gearReset);
|
||||
expect(user.preferences.costume).to.be.false;
|
||||
expect(user.items.gear.equipped).to.deep.equal(prevGearEquipped);
|
||||
expect(user.items.gear.costume).to.deep.equal(prevGearCostume);
|
||||
expect(user.preferences.costume).to.equal(prevPrefCostume);
|
||||
});
|
||||
|
||||
it('resets a user\'s gear owned', () => {
|
||||
it('retains a user\'s gear owned', () => {
|
||||
user.items.gear.owned.weapon_warrior_1 = true; // eslint-disable-line camelcase
|
||||
let prevGearOwned = user.items.gear.owned;
|
||||
|
||||
rebirth(user);
|
||||
|
||||
expect(user.items.gear.owned.weapon_warrior_1).to.be.false;
|
||||
expect(user.items.gear.owned.weapon_warrior_0).to.be.true;
|
||||
expect(user.items.gear.owned).to.equal(prevGearOwned);
|
||||
});
|
||||
|
||||
it('resets a user\'s current pet', () => {
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
popover-append-to-body='true',
|
||||
ng-click='openModal("rebirth")')
|
||||
p(ng-show='user.stats.lvl < 100')
|
||||
| 8
|
||||
| 6
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
div(ng-show='petCount >= 90 || mountCount >= 90')
|
||||
button.customize-option(popover=env.t('petKeyPop'), popover-title=env.t('petKeyName'),
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
p(ng-if='!env.worldDmg.seasonalShop')!=env.t('seasonalShopClosedText')
|
||||
p(ng-if='env.worldDmg.seasonalShop')!=env.t('seasonalShopClosedText')
|
||||
|
||||
// .well(ng-if='User.user.achievements.rebirths > 0')=env.t('seasonalShopRebirth')
|
||||
.well(ng-if='User.user.achievements.rebirths > 0')=env.t('seasonalShopRebirth')
|
||||
|
||||
// li.customize-menu.inventory-gear
|
||||
menu.pets-menu(label=env.t('seasonalItems'))
|
||||
|
||||
@@ -33,7 +33,6 @@ script(type='text/ng-template', id='modals/rebirth.html')
|
||||
li=env.t('rebirthInList2')
|
||||
li=env.t('rebirthInList3')
|
||||
li=env.t('rebirthInList4')
|
||||
li=env.t('rebirthInList5')
|
||||
br
|
||||
|
||||
p
|
||||
@@ -42,11 +41,11 @@ script(type='text/ng-template', id='modals/rebirth.html')
|
||||
=env.t('rebirthEarnAchievement')
|
||||
.modal-footer
|
||||
button.btn.btn-default(ng-click='$close()')=env.t('neverMind')
|
||||
span(ng-if='user.balance < 2 && user.stats.lvl < 100')
|
||||
span(ng-if='user.balance < 1.5 && user.stats.lvl < 100')
|
||||
a.btn.btn-success(ng-click='openModal("buyGems",{track:"Gems > Rebirth"})')=env.t('buyMoreGems')
|
||||
span.gem-cost=env.t('notEnoughGems')
|
||||
span(ng-if='user.balance >= 2 || user.stats.lvl >= 100', ng-controller='SettingsCtrl')
|
||||
span(ng-if='user.balance >= 1.5 || user.stats.lvl >= 100', ng-controller='SettingsCtrl')
|
||||
a.btn.btn-danger(ng-click='clickRebirth($event)')=env.t('beReborn')
|
||||
span.gem-cost(ng-if='user.stats.lvl < 100')
|
||||
| 8
|
||||
| 6
|
||||
=env.t('gems')
|
||||
|
||||
Reference in New Issue
Block a user