feat(event): Wonderland 2019-20

This commit is contained in:
Sabe Jones
2019-12-19 16:54:27 -06:00
parent a4eabc05e7
commit c4b16f86db
96 changed files with 451 additions and 127 deletions

View File

@@ -4,8 +4,6 @@ import each from 'lodash/each';
import moment from 'moment';
import t from './translation';
const CURRENT_SEASON = '_NONE_';
function hasQuestAchievementFunction (key) {
return user => user.achievements.quests
&& user.achievements.quests[key] > 0;
@@ -64,31 +62,26 @@ const premium = {
value: 2,
text: t('hatchingPotionCupid'),
limited: true,
_season: '_PENDING_',
},
Shimmer: {
value: 2,
text: t('hatchingPotionShimmer'),
limited: true,
_season: '_PENDING_',
},
Fairy: {
value: 2,
text: t('hatchingPotionFairy'),
limited: true,
_season: '_PENDING_',
},
Floral: {
value: 2,
text: t('hatchingPotionFloral'),
limited: true,
_season: '_PENDING_',
},
Aquatic: {
value: 2,
text: t('hatchingPotionAquatic'),
limited: true,
_season: '_PENDING_',
},
Ember: {
value: 2,
@@ -118,7 +111,6 @@ const premium = {
value: 2,
text: t('hatchingPotionSpooky'),
limited: true,
_season: '_PENDING_',
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndOctober'),
previousDate: t('september2017'),
@@ -128,37 +120,45 @@ const premium = {
value: 2,
text: t('hatchingPotionGhost'),
limited: true,
_season: '_PENDING_',
},
Holly: {
value: 2,
text: t('hatchingPotionHolly'),
limited: true,
_season: '_PENDING_',
canBuy () {
return moment().isBetween('2019-12-19', '2020-02-02');
},
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndJanuary'),
previousDate: t('decemberYYYY', { year: 2016 }),
}),
},
Peppermint: {
value: 2,
text: t('hatchingPotionPeppermint'),
limited: true,
_season: '_PENDING_',
},
StarryNight: {
value: 2,
text: t('hatchingPotionStarryNight'),
limited: true,
_season: '_PENDING_',
canBuy () {
return moment().isBetween('2019-12-19', '2020-02-02');
},
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndJanuary'),
previousDate: t('decemberYYYY', { year: 2017 }),
}),
},
Rainbow: {
value: 2,
text: t('hatchingPotionRainbow'),
limited: true,
_season: '_PENDING_',
},
Glass: {
value: 2,
text: t('hatchingPotionGlass'),
limited: true,
_season: '_PENDING_',
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndJuly'),
previousDate: t('june2018'),
@@ -168,7 +168,6 @@ const premium = {
value: 2,
text: t('hatchingPotionGlow'),
limited: true,
_season: '_PENDING_',
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndOctober'),
previousDate: t('september2018'),
@@ -178,31 +177,26 @@ const premium = {
value: 2,
text: t('hatchingPotionFrost'),
limited: true,
_season: '_PENDING_',
},
IcySnow: {
value: 2,
text: t('hatchingPotionIcySnow'),
limited: true,
_season: '_PENDING_',
},
RoseQuartz: {
value: 2,
text: t('hatchingPotionRoseQuartz'),
limited: true,
_season: '_PENDING_',
},
Celestial: {
value: 2,
text: t('hatchingPotionCelestial'),
limited: true,
_season: '_PENDING_',
},
Sunshine: {
value: 2,
text: t('hatchingPotionSunshine'),
limited: true,
_season: '_PENDING_',
},
Bronze: {
value: 2,
@@ -215,7 +209,6 @@ const premium = {
value: 2,
text: t('hatchingPotionWatery'),
limited: true,
_season: '_PENDING_',
},
Silver: {
value: 2,
@@ -228,7 +221,6 @@ const premium = {
value: 2,
text: t('hatchingPotionShadow'),
limited: true,
_season: '_PENDING_',
},
Amber: {
value: 2,
@@ -237,6 +229,17 @@ const premium = {
canBuy: hasQuestAchievementFunction('amber'),
_addlNotes: t('premiumPotionUnlimitedNotes'),
},
Aurora: {
value: 2,
text: t('hatchingPotionAurora'),
limited: true,
canBuy () {
return moment().isBetween('2019-12-19', '2020-02-02');
},
_addlNotes: t('premiumPotionAddlNotes', {
date: t('dateEndJanuary'),
}),
},
};
const wacky = {
@@ -269,13 +272,10 @@ each(premium, (pot, key) => {
notes: t('hatchingPotionNotes', {
potText: pot.text,
}),
_addlNotes: t('premiumPotionAddlNotes', {
date: t(`dateEnd${pot._season}`),
}),
premium: true,
limited: false,
canBuy () {
return pot._season === CURRENT_SEASON;
return false;
},
});
});
@@ -294,7 +294,7 @@ each(wacky, (pot, key) => {
limited: true,
wacky: true,
canBuy () {
return pot._season === CURRENT_SEASON;
return false;
},
});
});