2017-03-01 16:10:48 +00:00
|
|
|
import assign from 'lodash/assign';
|
|
|
|
|
import defaults from 'lodash/defaults';
|
|
|
|
|
import each from 'lodash/each';
|
2016-09-10 18:37:10 +00:00
|
|
|
import t from './translation';
|
|
|
|
|
|
2019-09-26 19:47:26 +00:00
|
|
|
const CURRENT_SEASON = 'October';
|
2017-03-23 19:41:41 +00:00
|
|
|
|
2019-05-13 16:02:07 +00:00
|
|
|
function hasQuestAchievementFunction (key) {
|
2019-10-08 14:57:10 +00:00
|
|
|
return user => user.achievements.quests
|
|
|
|
|
&& user.achievements.quests[key] > 0;
|
2019-05-13 16:02:07 +00:00
|
|
|
}
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const drops = {
|
2016-09-10 18:37:10 +00:00
|
|
|
Base: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionBase'),
|
|
|
|
|
},
|
|
|
|
|
White: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionWhite'),
|
|
|
|
|
},
|
|
|
|
|
Desert: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionDesert'),
|
|
|
|
|
},
|
|
|
|
|
Red: {
|
|
|
|
|
value: 3,
|
|
|
|
|
text: t('hatchingPotionRed'),
|
|
|
|
|
},
|
|
|
|
|
Shade: {
|
|
|
|
|
value: 3,
|
|
|
|
|
text: t('hatchingPotionShade'),
|
|
|
|
|
},
|
|
|
|
|
Skeleton: {
|
|
|
|
|
value: 3,
|
|
|
|
|
text: t('hatchingPotionSkeleton'),
|
|
|
|
|
},
|
|
|
|
|
Zombie: {
|
|
|
|
|
value: 4,
|
|
|
|
|
text: t('hatchingPotionZombie'),
|
|
|
|
|
},
|
|
|
|
|
CottonCandyPink: {
|
|
|
|
|
value: 4,
|
|
|
|
|
text: t('hatchingPotionCottonCandyPink'),
|
|
|
|
|
},
|
|
|
|
|
CottonCandyBlue: {
|
|
|
|
|
value: 4,
|
|
|
|
|
text: t('hatchingPotionCottonCandyBlue'),
|
|
|
|
|
},
|
|
|
|
|
Golden: {
|
|
|
|
|
value: 5,
|
|
|
|
|
text: t('hatchingPotionGolden'),
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const premium = {
|
2017-02-08 19:14:30 +00:00
|
|
|
RoyalPurple: {
|
2016-09-10 18:37:10 +00:00
|
|
|
value: 2,
|
2017-02-08 19:14:30 +00:00
|
|
|
text: t('hatchingPotionRoyalPurple'),
|
2016-09-10 18:37:10 +00:00
|
|
|
limited: true,
|
|
|
|
|
},
|
2017-02-08 19:14:30 +00:00
|
|
|
Cupid: {
|
2016-09-10 18:37:10 +00:00
|
|
|
value: 2,
|
2017-02-08 19:14:30 +00:00
|
|
|
text: t('hatchingPotionCupid'),
|
2016-09-10 18:37:10 +00:00
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
2017-03-23 19:41:41 +00:00
|
|
|
Shimmer: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionShimmer'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2017-03-23 19:41:41 +00:00
|
|
|
},
|
2017-04-20 19:01:51 +00:00
|
|
|
Fairy: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFairy'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2017-04-20 19:01:51 +00:00
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
Floral: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFloral'),
|
|
|
|
|
limited: true,
|
2019-06-03 20:22:21 +00:00
|
|
|
_season: '_PENDING_',
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
2017-06-29 21:21:20 +00:00
|
|
|
Aquatic: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionAquatic'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2017-06-29 21:21:20 +00:00
|
|
|
},
|
2017-08-08 20:48:59 +00:00
|
|
|
Ember: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionEmber'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2017-08-08 20:48:59 +00:00
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
Thunderstorm: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionThunderstorm'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
2017-02-08 19:14:30 +00:00
|
|
|
Spooky: {
|
2016-09-22 18:04:15 +00:00
|
|
|
value: 2,
|
2017-02-08 19:14:30 +00:00
|
|
|
text: t('hatchingPotionSpooky'),
|
2016-09-22 18:04:15 +00:00
|
|
|
limited: true,
|
2019-09-26 19:47:26 +00:00
|
|
|
_season: 'October',
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
|
|
|
|
previousDate: t('september2017'),
|
|
|
|
|
}),
|
2016-09-22 18:04:15 +00:00
|
|
|
},
|
2017-02-08 19:14:30 +00:00
|
|
|
Ghost: {
|
2016-11-24 01:34:09 +00:00
|
|
|
value: 2,
|
2017-02-08 19:14:30 +00:00
|
|
|
text: t('hatchingPotionGhost'),
|
2016-11-24 01:34:09 +00:00
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2016-11-24 01:34:09 +00:00
|
|
|
},
|
2016-12-15 16:36:28 +00:00
|
|
|
Holly: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionHolly'),
|
|
|
|
|
limited: true,
|
2019-01-02 22:10:57 +00:00
|
|
|
_season: '_PENDING_',
|
2016-12-15 16:36:28 +00:00
|
|
|
},
|
2017-02-08 19:14:30 +00:00
|
|
|
Peppermint: {
|
2017-02-02 17:29:33 +00:00
|
|
|
value: 2,
|
2017-02-08 19:14:30 +00:00
|
|
|
text: t('hatchingPotionPeppermint'),
|
2017-02-02 17:29:33 +00:00
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2017-02-02 17:29:33 +00:00
|
|
|
},
|
2017-12-20 02:23:11 +00:00
|
|
|
StarryNight: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionStarryNight'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2017-12-20 02:23:11 +00:00
|
|
|
},
|
2018-03-13 20:54:27 +00:00
|
|
|
Rainbow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRainbow'),
|
|
|
|
|
limited: true,
|
2019-05-14 21:33:42 +00:00
|
|
|
_season: '_PENDING_',
|
2018-03-13 20:54:27 +00:00
|
|
|
},
|
2018-06-26 20:19:16 +00:00
|
|
|
Glass: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionGlass'),
|
|
|
|
|
limited: true,
|
2019-08-01 23:08:43 +00:00
|
|
|
_season: '_PENDING_',
|
2019-06-20 20:13:19 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJuly'),
|
|
|
|
|
previousDate: t('june2018'),
|
|
|
|
|
}),
|
2018-06-26 20:19:16 +00:00
|
|
|
},
|
2018-09-25 21:30:50 +00:00
|
|
|
Glow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionGlow'),
|
|
|
|
|
limited: true,
|
2019-09-26 19:47:26 +00:00
|
|
|
_season: 'October',
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
|
|
|
|
previousDate: t('september2018'),
|
|
|
|
|
}),
|
2018-09-25 21:30:50 +00:00
|
|
|
},
|
2018-11-20 20:55:45 +00:00
|
|
|
Frost: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFrost'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2018-11-20 20:55:45 +00:00
|
|
|
},
|
2018-12-20 15:40:54 +00:00
|
|
|
IcySnow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionIcySnow'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
2018-12-20 15:40:54 +00:00
|
|
|
},
|
2019-02-12 13:19:58 +00:00
|
|
|
RoseQuartz: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRoseQuartz'),
|
|
|
|
|
limited: true,
|
2019-03-21 21:34:19 +00:00
|
|
|
_season: '_PENDING_',
|
|
|
|
|
},
|
|
|
|
|
Celestial: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionCelestial'),
|
|
|
|
|
limited: true,
|
2019-05-14 21:33:42 +00:00
|
|
|
_season: '_PENDING_',
|
|
|
|
|
},
|
|
|
|
|
Sunshine: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSunshine'),
|
|
|
|
|
limited: true,
|
2019-06-03 20:22:21 +00:00
|
|
|
_season: '_PENDING_',
|
2019-02-12 13:19:58 +00:00
|
|
|
},
|
2019-05-13 16:02:07 +00:00
|
|
|
Bronze: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionBronze'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('bronze'),
|
|
|
|
|
},
|
2019-06-20 20:13:19 +00:00
|
|
|
Watery: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionWatery'),
|
|
|
|
|
limited: true,
|
2019-08-01 23:08:43 +00:00
|
|
|
_season: '_PENDING_',
|
2019-06-20 20:13:19 +00:00
|
|
|
},
|
2019-08-14 00:16:19 +00:00
|
|
|
Silver: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSilver'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('silver'),
|
|
|
|
|
},
|
2019-09-26 19:47:26 +00:00
|
|
|
Shadow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionShadow'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_season: 'October',
|
|
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
};
|
|
|
|
|
|
2019-03-25 22:26:38 +00:00
|
|
|
const wacky = {
|
|
|
|
|
Veggie: {
|
|
|
|
|
text: t('hatchingPotionVeggie'),
|
|
|
|
|
limited: true,
|
2019-05-14 21:33:42 +00:00
|
|
|
_season: '_PENDING_',
|
2019-03-25 22:26:38 +00:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2016-09-10 18:37:10 +00:00
|
|
|
each(drops, (pot, key) => {
|
|
|
|
|
defaults(pot, {
|
|
|
|
|
key,
|
|
|
|
|
value: 2,
|
|
|
|
|
notes: t('hatchingPotionNotes', {
|
|
|
|
|
potText: pot.text,
|
|
|
|
|
}),
|
|
|
|
|
premium: false,
|
|
|
|
|
limited: false,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
each(premium, (pot, key) => {
|
|
|
|
|
defaults(pot, {
|
|
|
|
|
key,
|
|
|
|
|
value: 2,
|
|
|
|
|
notes: t('hatchingPotionNotes', {
|
|
|
|
|
potText: pot.text,
|
|
|
|
|
}),
|
2019-09-26 19:47:26 +00:00
|
|
|
_addlNotes: t('premiumPotionAddlNotes', {
|
|
|
|
|
date: t(`dateEnd${pot._season}`),
|
|
|
|
|
}),
|
2016-09-10 18:37:10 +00:00
|
|
|
premium: true,
|
|
|
|
|
limited: false,
|
|
|
|
|
canBuy () {
|
2017-03-23 19:41:41 +00:00
|
|
|
return pot._season === CURRENT_SEASON;
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2019-03-25 22:26:38 +00:00
|
|
|
each(wacky, (pot, key) => {
|
|
|
|
|
defaults(pot, {
|
|
|
|
|
key,
|
|
|
|
|
value: 2,
|
|
|
|
|
notes: t('hatchingPotionNotes', {
|
|
|
|
|
potText: pot.text,
|
|
|
|
|
}),
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t(`dateEnd${pot._season}`),
|
|
|
|
|
}),
|
|
|
|
|
premium: false,
|
|
|
|
|
limited: true,
|
2019-04-04 15:35:22 +00:00
|
|
|
wacky: true,
|
2019-03-25 22:26:38 +00:00
|
|
|
canBuy () {
|
|
|
|
|
return pot._season === CURRENT_SEASON;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const all = assign({}, drops, premium, wacky);
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2019-10-01 15:53:48 +00:00
|
|
|
export {
|
2016-09-10 18:37:10 +00:00
|
|
|
drops,
|
|
|
|
|
premium,
|
2019-03-25 22:26:38 +00:00
|
|
|
wacky,
|
2016-09-10 18:37:10 +00:00
|
|
|
all,
|
|
|
|
|
};
|