Incentives, Batch 2 (#8435)
* feat(content): Incentives batch 2 gear * feat(incentives): incentives 55-100 * chore(migration): hand out missed incentive * refactor(constant): export MAX_INCENTIVES * fix(incentives): correct const import and say "Royal Purple Potion" not "Royal Purple"
This commit is contained in:
@@ -2,6 +2,7 @@ export const MAX_HEALTH = 50;
|
||||
export const MAX_LEVEL = 100;
|
||||
export const MAX_STAT_POINTS = MAX_LEVEL;
|
||||
export const ATTRIBUTES = ['str', 'int', 'per', 'con'];
|
||||
export const MAX_INCENTIVES = 100;
|
||||
|
||||
export const TAVERN_ID = '00000000-0000-4000-A000-000000000000';
|
||||
export const LARGE_GROUP_COUNT_MESSAGE_CUTOFF = 5000;
|
||||
|
||||
@@ -49,6 +49,13 @@ let armor = {
|
||||
value: 130,
|
||||
canOwn: ownsItem('armor_special_mammothRiderArmor'),
|
||||
},
|
||||
pageArmor: {
|
||||
text: t('armorSpecialPageArmorText'),
|
||||
notes: t('armorSpecialPageArmorNotes', { con: 16 }),
|
||||
con: 16,
|
||||
value: 0,
|
||||
canOwn: ownsItem('armor_special_pageArmor'),
|
||||
},
|
||||
yeti: {
|
||||
event: EVENTS.winter,
|
||||
specialClass: 'warrior',
|
||||
@@ -690,6 +697,13 @@ let head = {
|
||||
value: 130,
|
||||
canOwn: ownsItem('head_special_mammothRiderHelm'),
|
||||
},
|
||||
pageHelm: {
|
||||
text: t('headSpecialPageHelmText'),
|
||||
notes: t('headSpecialPageHelmNotes', { per: 16 }),
|
||||
per: 16,
|
||||
value: 0,
|
||||
canOwn: ownsItem('head_special_pageHelm'),
|
||||
},
|
||||
nye: {
|
||||
event: EVENTS.nye,
|
||||
text: t('headSpecialNyeText'),
|
||||
@@ -1368,6 +1382,13 @@ let shield = {
|
||||
value: 130,
|
||||
canOwn: ownsItem('shield_special_mammothRiderHorn'),
|
||||
},
|
||||
diamondStave: {
|
||||
text: t('shieldSpecialDiamondStaveText'),
|
||||
notes: t('shieldSpecialDiamondStaveNotes', { int: 16 }),
|
||||
int: 16,
|
||||
value: 0,
|
||||
canOwn: ownsItem('shield_special_diamondStave'),
|
||||
},
|
||||
yeti: {
|
||||
event: EVENTS.winter,
|
||||
specialClass: 'warrior',
|
||||
@@ -1757,6 +1778,13 @@ let weapon = {
|
||||
value: 130,
|
||||
canOwn: ownsItem('weapon_special_mammothRiderSpear'),
|
||||
},
|
||||
pageBanner: {
|
||||
text: t('weaponSpecialPageBannerText'),
|
||||
notes: t('weaponSpecialPageBannerNotes', { str: 16 }),
|
||||
str: 16,
|
||||
value: 0,
|
||||
canOwn: ownsItem('weapon_special_pageBanner'),
|
||||
},
|
||||
yeti: {
|
||||
event: EVENTS.winter,
|
||||
specialClass: 'warrior',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import { MAX_INCENTIVES } from '../constants';
|
||||
|
||||
module.exports = function getLoginIncentives (api) {
|
||||
let loginIncentives = {
|
||||
@@ -145,13 +146,89 @@ module.exports = function getLoginIncentives (api) {
|
||||
user.items.food.Saddle += 1;
|
||||
},
|
||||
},
|
||||
55: {
|
||||
rewardKey: ['Pet_HatchingPotion_Purple'],
|
||||
reward: [api.hatchingPotions.RoyalPurple],
|
||||
assignReward: function assignReward (user) {
|
||||
if (!user.items.hatchingPotions.RoyalPurple) user.items.hatchingPotions.RoyalPurple = 0;
|
||||
user.items.hatchingPotions.RoyalPurple += 1;
|
||||
},
|
||||
},
|
||||
60: {
|
||||
rewardKey: ['slim_armor_special_pageArmor'],
|
||||
reward: [api.gear.flat.armor_special_pageArmor],
|
||||
assignReward: function assignReward (user) {
|
||||
user.items.gear.owned.armor_special_pageArmor = true; // eslint-disable-line camelcase
|
||||
},
|
||||
},
|
||||
65: {
|
||||
rewardKey: ['Pet_HatchingPotion_Purple'],
|
||||
reward: [api.hatchingPotions.RoyalPurple],
|
||||
assignReward: function assignReward (user) {
|
||||
if (!user.items.hatchingPotions.RoyalPurple) user.items.hatchingPotions.RoyalPurple = 0;
|
||||
user.items.hatchingPotions.RoyalPurple += 1;
|
||||
},
|
||||
},
|
||||
70: {
|
||||
rewardKey: ['head_special_pageHelm'],
|
||||
reward: [api.gear.flat.head_special_pageHelm],
|
||||
assignReward: function assignReward (user) {
|
||||
user.items.gear.owned.head_special_pageHelm = true; // eslint-disable-line camelcase
|
||||
},
|
||||
},
|
||||
75: {
|
||||
rewardKey: ['Pet_HatchingPotion_Purple'],
|
||||
reward: [api.hatchingPotions.RoyalPurple],
|
||||
assignReward: function assignReward (user) {
|
||||
if (!user.items.hatchingPotions.RoyalPurple) user.items.hatchingPotions.RoyalPurple = 0;
|
||||
user.items.hatchingPotions.RoyalPurple += 1;
|
||||
},
|
||||
},
|
||||
80: {
|
||||
rewardKey: ['weapon_special_pageBanner'],
|
||||
reward: [api.gear.flat.weapon_special_pageBanner],
|
||||
assignReward: function assignReward (user) {
|
||||
user.items.gear.owned.weapon_special_pageBanner = true; // eslint-disable-line camelcase
|
||||
},
|
||||
},
|
||||
85: {
|
||||
rewardKey: ['Pet_HatchingPotion_Purple'],
|
||||
reward: [api.hatchingPotions.RoyalPurple],
|
||||
assignReward: function assignReward (user) {
|
||||
if (!user.items.hatchingPotions.RoyalPurple) user.items.hatchingPotions.RoyalPurple = 0;
|
||||
user.items.hatchingPotions.RoyalPurple += 1;
|
||||
},
|
||||
},
|
||||
90: {
|
||||
rewardKey: ['shield_special_diamondStave'],
|
||||
reward: [api.gear.flat.shield_special_diamondStave],
|
||||
assignReward: function assignReward (user) {
|
||||
user.items.gear.owned.shield_special_diamondStave = true; // eslint-disable-line camelcase
|
||||
},
|
||||
},
|
||||
95: {
|
||||
rewardKey: ['Pet_HatchingPotion_Purple'],
|
||||
reward: [api.hatchingPotions.RoyalPurple],
|
||||
assignReward: function assignReward (user) {
|
||||
if (!user.items.hatchingPotions.RoyalPurple) user.items.hatchingPotions.RoyalPurple = 0;
|
||||
user.items.hatchingPotions.RoyalPurple += 1;
|
||||
},
|
||||
},
|
||||
100: {
|
||||
rewardKey: ['Pet_Food_Saddle'],
|
||||
reward: [api.food.Saddle],
|
||||
assignReward: function assignReward (user) {
|
||||
if (!user.items.food.Saddle) user.items.food.Saddle = 0;
|
||||
user.items.food.Saddle += 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// Add refence link to next reward and add filler days so we have a map to refernce the next reward from any day
|
||||
// We could also, use a list, but then we would be cloning each of the rewards.
|
||||
// Create a new array if we want the loginIncentives to be immutable in the future
|
||||
let nextRewardKey;
|
||||
_.range(51).reverse().forEach(function addNextRewardLink (index) {
|
||||
_.range(MAX_INCENTIVES + 1).reverse().forEach(function addNextRewardLink (index) {
|
||||
if (loginIncentives[index] && loginIncentives[index].rewardKey) {
|
||||
loginIncentives[index].nextRewardAt = nextRewardKey;
|
||||
nextRewardKey = index;
|
||||
@@ -165,7 +242,7 @@ module.exports = function getLoginIncentives (api) {
|
||||
});
|
||||
|
||||
let prevRewardKey;
|
||||
_.range(51).forEach(function addPrevRewardLink (index) {
|
||||
_.range(MAX_INCENTIVES + 1).forEach(function addPrevRewardLink (index) {
|
||||
loginIncentives[index].prevRewardKey = prevRewardKey;
|
||||
if (loginIncentives[index].rewardKey) prevRewardKey = index;
|
||||
});
|
||||
|
||||
@@ -21,12 +21,14 @@ import {
|
||||
MAX_HEALTH,
|
||||
MAX_LEVEL,
|
||||
MAX_STAT_POINTS,
|
||||
MAX_INCENTIVES,
|
||||
TAVERN_ID,
|
||||
LARGE_GROUP_COUNT_MESSAGE_CUTOFF,
|
||||
SUPPORTED_SOCIAL_NETWORKS,
|
||||
} from './constants';
|
||||
|
||||
api.constants = {
|
||||
MAX_INCENTIVES,
|
||||
LARGE_GROUP_COUNT_MESSAGE_CUTOFF,
|
||||
SUPPORTED_SOCIAL_NETWORKS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user