2017-03-01 16:10:48 +00:00
|
|
|
import assign from 'lodash/assign';
|
|
|
|
|
import defaults from 'lodash/defaults';
|
|
|
|
|
import each from 'lodash/each';
|
2019-11-12 21:31:17 +00:00
|
|
|
import moment from 'moment';
|
2016-09-10 18:37:10 +00:00
|
|
|
import t from './translation';
|
2022-02-14 19:55:19 +00:00
|
|
|
import { EVENTS } from './constants';
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2019-05-13 16:02:07 +00:00
|
|
|
function hasQuestAchievementFunction (key) {
|
2022-02-14 19:55:19 +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,
|
2020-02-07 20:16:25 +00:00
|
|
|
canBuy () {
|
2022-02-14 19:55:19 +00:00
|
|
|
return moment().isBefore('2022-02-28T20:00-05:00');
|
2020-02-07 20:16:25 +00:00
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
2017-03-23 19:41:41 +00:00
|
|
|
Shimmer: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionShimmer'),
|
|
|
|
|
limited: true,
|
2022-03-29 17:15:01 +00:00
|
|
|
event: EVENTS.spring2022,
|
2020-03-17 20:35:38 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMarch'),
|
2022-03-29 17:15:01 +00:00
|
|
|
previousDate: t('marchYYYY', { year: 2020 }),
|
2020-03-17 20:35:38 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2022-03-29 17:15:01 +00:00
|
|
|
return moment().isBefore(EVENTS.spring2022.end);
|
2020-03-17 20:35:38 +00:00
|
|
|
},
|
2017-03-23 19:41:41 +00:00
|
|
|
},
|
2017-04-20 19:01:51 +00:00
|
|
|
Fairy: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFairy'),
|
|
|
|
|
limited: true,
|
2021-05-11 21:07:44 +00:00
|
|
|
event: EVENTS.potions202105,
|
2020-05-12 20:57:40 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMay'),
|
2021-05-11 21:07:44 +00:00
|
|
|
previousDate: t('mayYYYY', { year: 2020 }),
|
2020-05-12 20:57:40 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2021-05-11 21:07:44 +00:00
|
|
|
return moment().isBefore(EVENTS.potions202105.end);
|
2020-05-12 20:57:40 +00:00
|
|
|
},
|
2017-04-20 19:01:51 +00:00
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
Floral: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFloral'),
|
|
|
|
|
limited: true,
|
2021-05-11 21:07:44 +00:00
|
|
|
event: EVENTS.potions202105,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMay'),
|
2021-05-11 21:30:47 +00:00
|
|
|
previousDate: t('mayYYYY', { year: 2019 }),
|
2021-05-11 21:07:44 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore(EVENTS.potions202105.end);
|
|
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
2017-06-29 21:21:20 +00:00
|
|
|
Aquatic: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionAquatic'),
|
|
|
|
|
limited: true,
|
2020-06-19 19:55:49 +00:00
|
|
|
event: EVENTS.summer2020,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJuly'),
|
|
|
|
|
previousDate: t('juneYYYY', { year: 2017 }),
|
|
|
|
|
}),
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore('2020-08-02');
|
|
|
|
|
},
|
2017-06-29 21:21:20 +00:00
|
|
|
},
|
2017-08-08 20:48:59 +00:00
|
|
|
Ember: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionEmber'),
|
|
|
|
|
limited: true,
|
2021-11-09 20:06:11 +00:00
|
|
|
event: EVENTS.potions202111,
|
2019-11-12 21:31:17 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndNovember'),
|
2021-11-09 20:06:11 +00:00
|
|
|
previousDate: t('novemberYYYY', { year: 2019 }),
|
2019-11-12 21:31:17 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2021-11-09 20:06:11 +00:00
|
|
|
return moment().isBefore(EVENTS.potions202111.end);
|
2019-11-12 21:31:17 +00:00
|
|
|
},
|
2017-08-08 20:48:59 +00:00
|
|
|
},
|
2016-09-10 18:37:10 +00:00
|
|
|
Thunderstorm: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionThunderstorm'),
|
|
|
|
|
limited: true,
|
2021-08-17 21:16:28 +00:00
|
|
|
event: EVENTS.potions202108,
|
2019-11-12 21:31:17 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
2021-08-17 21:16:28 +00:00
|
|
|
availableDate: t('dateEndAugust'),
|
|
|
|
|
previousDate: t('novemberYYYY', { year: 2019 }),
|
2019-11-12 21:31:17 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2021-08-17 21:16:28 +00:00
|
|
|
return moment().isBetween(EVENTS.potions202108.start, EVENTS.potions202108.end);
|
2019-11-12 21:31:17 +00:00
|
|
|
},
|
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,
|
2021-09-21 21:16:52 +00:00
|
|
|
event: EVENTS.fall2021,
|
2019-09-26 19:47:26 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
2021-09-21 21:16:52 +00:00
|
|
|
previousDate: t('septemberYYYY', { year: 2019 }),
|
2019-09-26 19:47:26 +00:00
|
|
|
}),
|
2021-09-21 21:16:52 +00:00
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore(EVENTS.fall2021.end);
|
|
|
|
|
},
|
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,
|
2020-09-23 19:09:38 +00:00
|
|
|
event: EVENTS.fall2020,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore('2020-11-02');
|
|
|
|
|
},
|
2020-09-28 14:52:49 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
|
|
|
|
previousDate: t('septemberYYYY', { year: 2018 }),
|
2020-09-23 19:09:38 +00:00
|
|
|
}),
|
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-12-19 22:54:27 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJanuary'),
|
2021-12-21 21:32:11 +00:00
|
|
|
previousDate: t('januaryYYYY', { year: 2020 }),
|
2019-12-19 22:54:27 +00:00
|
|
|
}),
|
2021-12-21 21:32:11 +00:00
|
|
|
event: EVENTS.winter2022,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
|
|
|
|
|
},
|
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,
|
2021-12-21 21:32:11 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJanuary'),
|
|
|
|
|
previousDate: t('januaryYYYY', { year: 2018 }),
|
|
|
|
|
}),
|
|
|
|
|
event: EVENTS.winter2022,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
|
|
|
|
|
},
|
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-12-19 22:54:27 +00:00
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBetween('2019-12-19', '2020-02-02');
|
|
|
|
|
},
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJanuary'),
|
|
|
|
|
previousDate: t('decemberYYYY', { year: 2017 }),
|
|
|
|
|
}),
|
2017-12-20 02:23:11 +00:00
|
|
|
},
|
2018-03-13 20:54:27 +00:00
|
|
|
Rainbow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRainbow'),
|
|
|
|
|
limited: true,
|
2021-03-25 20:21:24 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMarch'),
|
|
|
|
|
previousDate: t('marchYYYY', { year: 2019 }),
|
|
|
|
|
}),
|
|
|
|
|
event: EVENTS.spring2021,
|
|
|
|
|
canBuy () {
|
2021-04-13 19:36:24 +00:00
|
|
|
return moment().isBefore(EVENTS.spring2021.end);
|
2021-03-25 20:21:24 +00:00
|
|
|
},
|
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-06-20 20:13:19 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJuly'),
|
2021-06-22 23:49:32 +00:00
|
|
|
previousDate: t('juneYYYY', { year: 2019 }),
|
2019-06-20 20:13:19 +00:00
|
|
|
}),
|
2021-06-22 23:49:32 +00:00
|
|
|
event: EVENTS.summer2021,
|
|
|
|
|
canBuy () {
|
2021-06-23 00:18:21 +00:00
|
|
|
return moment().isBetween(EVENTS.summer2021.start, EVENTS.summer2021.end);
|
2021-06-22 23:49:32 +00:00
|
|
|
},
|
2018-06-26 20:19:16 +00:00
|
|
|
},
|
2018-09-25 21:30:50 +00:00
|
|
|
Glow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionGlow'),
|
|
|
|
|
limited: true,
|
2021-09-21 21:16:52 +00:00
|
|
|
event: EVENTS.fall2021,
|
2019-09-26 19:47:26 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
2021-09-21 21:16:52 +00:00
|
|
|
previousDate: t('septemberYYYY', { year: 2019 }),
|
2019-09-26 19:47:26 +00:00
|
|
|
}),
|
2021-09-21 21:16:52 +00:00
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore(EVENTS.fall2021.end);
|
|
|
|
|
},
|
2018-09-25 21:30:50 +00:00
|
|
|
},
|
2018-11-20 20:55:45 +00:00
|
|
|
Frost: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFrost'),
|
|
|
|
|
limited: true,
|
2020-11-09 21:06:56 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndNovember'),
|
|
|
|
|
previousDate: t('novemberYYYY', { year: 2018 }),
|
|
|
|
|
}),
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore('2020-12-02');
|
|
|
|
|
},
|
2018-11-20 20:55:45 +00:00
|
|
|
},
|
2018-12-20 15:40:54 +00:00
|
|
|
IcySnow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionIcySnow'),
|
|
|
|
|
limited: true,
|
2020-12-10 22:53:37 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJanuary'),
|
|
|
|
|
previousDate: t('decemberYYYY', { year: 2018 }),
|
|
|
|
|
}),
|
|
|
|
|
event: EVENTS.winter2021,
|
|
|
|
|
canBuy () {
|
2020-12-17 04:57:08 +00:00
|
|
|
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
2020-12-10 22:53:37 +00:00
|
|
|
},
|
2018-12-20 15:40:54 +00:00
|
|
|
},
|
2019-02-12 13:19:58 +00:00
|
|
|
RoseQuartz: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRoseQuartz'),
|
|
|
|
|
limited: true,
|
2020-02-07 20:16:25 +00:00
|
|
|
canBuy () {
|
2022-02-14 19:55:19 +00:00
|
|
|
return moment().isBefore('2022-02-28T20:00-05:00');
|
2020-02-07 20:16:25 +00:00
|
|
|
},
|
2019-03-21 21:34:19 +00:00
|
|
|
},
|
|
|
|
|
Celestial: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionCelestial'),
|
|
|
|
|
limited: true,
|
2022-03-29 17:15:01 +00:00
|
|
|
event: EVENTS.spring2022,
|
2020-03-17 20:35:38 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMarch'),
|
2022-03-29 17:15:01 +00:00
|
|
|
previousDate: t('marchYYYY', { year: 2020 }),
|
2020-03-17 20:35:38 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2022-03-29 17:15:01 +00:00
|
|
|
return moment().isBefore(EVENTS.spring2022.end);
|
2020-03-17 20:35:38 +00:00
|
|
|
},
|
2019-05-14 21:33:42 +00:00
|
|
|
},
|
|
|
|
|
Sunshine: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSunshine'),
|
|
|
|
|
limited: true,
|
2020-05-12 20:57:40 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMay'),
|
|
|
|
|
previousDate: t('mayYYYY', { year: 2019 }),
|
|
|
|
|
}),
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore('2020-06-02');
|
|
|
|
|
},
|
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-10-10 19:10:07 +00:00
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
2019-05-13 16:02:07 +00:00
|
|
|
},
|
2019-06-20 20:13:19 +00:00
|
|
|
Watery: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionWatery'),
|
|
|
|
|
limited: true,
|
2020-06-19 19:55:49 +00:00
|
|
|
event: EVENTS.summer2020,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJuly'),
|
|
|
|
|
previousDate: t('juneYYYY', { year: 2019 }),
|
|
|
|
|
}),
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore('2020-08-02');
|
|
|
|
|
},
|
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-10-10 19:10:07 +00:00
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
2019-08-14 00:16:19 +00:00
|
|
|
},
|
2019-09-26 19:47:26 +00:00
|
|
|
Shadow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionShadow'),
|
|
|
|
|
limited: true,
|
2020-09-23 19:09:38 +00:00
|
|
|
event: EVENTS.fall2020,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBefore('2020-11-02');
|
|
|
|
|
},
|
2020-09-28 14:52:49 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
|
|
|
|
previousDate: t('septemberYYYY', { year: 2019 }),
|
2020-09-23 19:09:38 +00:00
|
|
|
}),
|
2019-09-26 19:47:26 +00:00
|
|
|
},
|
2019-11-26 21:58:18 +00:00
|
|
|
Amber: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionAmber'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('amber'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2019-12-19 22:54:27 +00:00
|
|
|
Aurora: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionAurora'),
|
|
|
|
|
limited: true,
|
2020-12-10 22:53:37 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJanuary'),
|
|
|
|
|
previousDate: t('decemberYYYY', { year: 2019 }),
|
|
|
|
|
}),
|
|
|
|
|
event: EVENTS.winter2021,
|
2019-12-19 22:54:27 +00:00
|
|
|
canBuy () {
|
2020-12-17 04:57:08 +00:00
|
|
|
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
2019-12-19 22:54:27 +00:00
|
|
|
},
|
|
|
|
|
},
|
2020-02-13 00:30:54 +00:00
|
|
|
Ruby: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRuby'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('ruby'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2020-03-17 20:35:38 +00:00
|
|
|
BirchBark: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionBirchBark'),
|
|
|
|
|
limited: true,
|
2021-04-13 19:36:24 +00:00
|
|
|
event: EVENTS.spring2021,
|
2021-03-25 20:21:24 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMarch'),
|
|
|
|
|
previousDate: t('marchYYYY', { year: 2020 }),
|
|
|
|
|
}),
|
2020-03-17 20:35:38 +00:00
|
|
|
canBuy () {
|
2021-04-13 19:36:24 +00:00
|
|
|
return moment().isBefore(EVENTS.spring2021.end);
|
2020-03-17 20:35:38 +00:00
|
|
|
},
|
|
|
|
|
},
|
2020-06-11 21:38:05 +00:00
|
|
|
Fluorite: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFluorite'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('fluorite'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2020-06-18 18:16:07 +00:00
|
|
|
SandSculpture: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSandSculpture'),
|
|
|
|
|
limited: true,
|
2021-06-22 23:49:32 +00:00
|
|
|
event: EVENTS.summer2021,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJuly'),
|
|
|
|
|
previousDate: t('juneYYYY', { year: 2020 }),
|
|
|
|
|
}),
|
2020-06-18 18:16:07 +00:00
|
|
|
canBuy () {
|
2021-06-23 00:18:21 +00:00
|
|
|
return moment().isBetween(EVENTS.summer2021.start, EVENTS.summer2021.end);
|
2020-06-18 18:16:07 +00:00
|
|
|
},
|
|
|
|
|
},
|
2020-08-25 21:04:28 +00:00
|
|
|
Windup: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionWindup'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('windup'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2020-09-14 21:05:54 +00:00
|
|
|
Turquoise: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionTurquoise'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('turquoise'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2020-09-23 19:09:38 +00:00
|
|
|
Vampire: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionVampire'),
|
|
|
|
|
limited: true,
|
2021-09-21 21:16:52 +00:00
|
|
|
event: EVENTS.fall2021,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndOctober'),
|
|
|
|
|
previousDate: t('septemberYYYY', { year: 2020 }),
|
|
|
|
|
}),
|
2020-09-23 19:09:38 +00:00
|
|
|
canBuy () {
|
2021-09-21 21:16:52 +00:00
|
|
|
return moment().isBefore(EVENTS.fall2021.end);
|
2020-09-23 19:09:38 +00:00
|
|
|
},
|
|
|
|
|
},
|
2020-11-09 21:06:56 +00:00
|
|
|
AutumnLeaf: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionAutumnLeaf'),
|
|
|
|
|
limited: true,
|
2021-11-09 20:06:11 +00:00
|
|
|
event: EVENTS.potions202111,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndNovember'),
|
|
|
|
|
previousDate: t('novemberYYYY', { year: 2020 }),
|
|
|
|
|
}),
|
2020-11-09 21:06:56 +00:00
|
|
|
canBuy () {
|
2021-11-09 20:06:11 +00:00
|
|
|
return moment().isBefore(EVENTS.potions202111.end);
|
2020-11-09 21:06:56 +00:00
|
|
|
},
|
|
|
|
|
},
|
2020-11-16 21:52:06 +00:00
|
|
|
BlackPearl: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionBlackPearl'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('blackPearl'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2020-12-22 15:14:00 +00:00
|
|
|
StainedGlass: {
|
2020-12-10 22:53:37 +00:00
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionStainedGlass'),
|
|
|
|
|
limited: true,
|
2021-12-21 21:32:11 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndJanuary'),
|
|
|
|
|
previousDate: t('januaryYYYY', { year: 2021 }),
|
2020-12-10 22:53:37 +00:00
|
|
|
}),
|
2021-12-21 21:32:11 +00:00
|
|
|
event: EVENTS.winter2022,
|
2020-12-10 22:53:37 +00:00
|
|
|
canBuy () {
|
2021-12-21 21:32:11 +00:00
|
|
|
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
|
2020-12-10 22:53:37 +00:00
|
|
|
},
|
2020-12-22 15:14:00 +00:00
|
|
|
},
|
2021-03-25 20:21:24 +00:00
|
|
|
PolkaDot: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionPolkaDot'),
|
|
|
|
|
limited: true,
|
2022-03-29 17:15:01 +00:00
|
|
|
event: EVENTS.spring2022,
|
|
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
|
|
|
|
availableDate: t('dateEndMarch'),
|
|
|
|
|
previousDate: t('marchYYYY', { year: 2021 }),
|
2021-03-25 20:21:24 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2022-03-29 17:15:01 +00:00
|
|
|
return moment().isBefore(EVENTS.spring2022.end);
|
2021-03-25 20:21:24 +00:00
|
|
|
},
|
|
|
|
|
},
|
2021-05-18 20:20:23 +00:00
|
|
|
MossyStone: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionMossyStone'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('stone'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2021-06-22 23:49:32 +00:00
|
|
|
Sunset: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSunset'),
|
|
|
|
|
limited: true,
|
|
|
|
|
event: EVENTS.summer2021,
|
|
|
|
|
_addlNotes: t('premiumPotionAddlNotes', {
|
|
|
|
|
date: t('dateEndJuly'),
|
|
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2021-06-23 00:18:21 +00:00
|
|
|
return moment().isBetween(EVENTS.summer2021.start, EVENTS.summer2021.end);
|
2021-06-22 23:49:32 +00:00
|
|
|
},
|
|
|
|
|
},
|
2021-08-17 21:16:28 +00:00
|
|
|
Moonglow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionMoonglow'),
|
|
|
|
|
limited: true,
|
|
|
|
|
event: EVENTS.potions202108,
|
|
|
|
|
_addlNotes: t('premiumPotionAddlNotes', {
|
|
|
|
|
date: t('dateEndAugust'),
|
|
|
|
|
}),
|
|
|
|
|
canBuy () {
|
|
|
|
|
return moment().isBetween(EVENTS.potions202108.start, EVENTS.potions202108.end);
|
|
|
|
|
},
|
|
|
|
|
},
|
2021-08-24 20:42:40 +00:00
|
|
|
SolarSystem: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSolarSystem'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('solarSystem'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2021-11-23 21:33:47 +00:00
|
|
|
Onyx: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionOnyx'),
|
|
|
|
|
limited: true,
|
|
|
|
|
canBuy: hasQuestAchievementFunction('onyx'),
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
},
|
2020-12-22 15:14:00 +00:00
|
|
|
};
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2019-03-25 22:26:38 +00:00
|
|
|
const wacky = {
|
|
|
|
|
Veggie: {
|
|
|
|
|
text: t('hatchingPotionVeggie'),
|
|
|
|
|
limited: true,
|
2021-04-13 20:19:44 +00:00
|
|
|
event: EVENTS.spring2021,
|
2020-04-06 18:08:29 +00:00
|
|
|
_addlNotes: t('eventAvailabilityReturning', {
|
2022-04-04 21:29:51 +00:00
|
|
|
availableDate: t('dateEndApril'),
|
|
|
|
|
previousDate: t('aprilYYYY', { year: 2021 }),
|
2020-04-06 18:08:29 +00:00
|
|
|
}),
|
|
|
|
|
canBuy () {
|
2022-04-04 21:29:51 +00:00
|
|
|
return moment().isBetween('2022-04-07T08:00-05:00', EVENTS.spring2022.end);
|
2020-04-06 18:08:29 +00:00
|
|
|
},
|
2019-03-25 22:26:38 +00:00
|
|
|
},
|
2020-04-04 00:25:43 +00:00
|
|
|
Dessert: {
|
|
|
|
|
text: t('hatchingPotionDessert'),
|
|
|
|
|
limited: true,
|
2020-04-06 19:40:09 +00:00
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
2020-04-04 00:25:43 +00:00
|
|
|
canBuy: hasQuestAchievementFunction('waffle'),
|
|
|
|
|
},
|
2022-04-04 21:29:51 +00:00
|
|
|
VirtualPet: {
|
|
|
|
|
text: t('hatchingPotionVirtualPet'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
|
|
|
|
canBuy: hasQuestAchievementFunction('virtualPet'),
|
|
|
|
|
},
|
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,
|
|
|
|
|
}),
|
2020-02-18 09:45:57 +00:00
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndFebruary'),
|
|
|
|
|
}),
|
2016-09-10 18:37:10 +00:00
|
|
|
premium: true,
|
|
|
|
|
limited: false,
|
|
|
|
|
canBuy () {
|
2019-12-19 22:54:27 +00:00
|
|
|
return false;
|
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,
|
|
|
|
|
}),
|
2022-02-14 19:55:19 +00:00
|
|
|
_addlNotes:
|
|
|
|
|
pot._season && pot._season !== '_PENDING_'
|
|
|
|
|
? t('eventAvailability', {
|
|
|
|
|
date: t(`dateEnd${pot._season}`),
|
|
|
|
|
})
|
|
|
|
|
: null,
|
2019-03-25 22:26:38 +00:00
|
|
|
premium: false,
|
|
|
|
|
limited: true,
|
2019-04-04 15:35:22 +00:00
|
|
|
wacky: true,
|
2019-03-25 22:26:38 +00:00
|
|
|
canBuy () {
|
2019-12-19 22:54:27 +00:00
|
|
|
return false;
|
2019-03-25 22:26:38 +00:00
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
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 {
|
2022-02-14 19:55:19 +00:00
|
|
|
drops, premium, wacky, all,
|
2016-09-10 18:37:10 +00:00
|
|
|
};
|