feat: Lower cost of orb of rebirth

closes #7917
fixes #7944
This commit is contained in:
Blade Barringer
2016-09-09 21:08:42 -05:00
parent 0dfb1f150f
commit f496a6b0c7
8 changed files with 25 additions and 32 deletions

View File

@@ -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: {