feat(content): Winter Wonderland 2021-22

This commit is contained in:
SabreCat
2021-12-21 15:32:11 -06:00
parent 741ddd9006
commit 685ba1286e
12 changed files with 219 additions and 398 deletions
@@ -17,7 +17,7 @@ export default prefill({
setPrice: 5, availableFrom: '2021-09-28T08:00-04:00', availableUntil: '2021-10-31T20:00-04:00', text: t('hauntedColors'),
},
winteryHairColors: {
setPrice: 5, availableFrom: '2021-01-05', availableUntil: '2021-02-01', text: t('winteryColors'),
setPrice: 5, availableFrom: '2021-12-23T08:00-05:00', availableUntil: '2022-01-31T20:00-05:00', text: t('winteryColors'),
},
rainbowSkins: { setPrice: 5, text: t('rainbowSkins') },
animalSkins: { setPrice: 5, text: t('animalSkins') },
@@ -32,6 +32,6 @@ export default prefill({
setPrice: 5, availableFrom: '2021-07-13T08:00-04:00', availableUntil: '2021-07-31T20:00-04:00', text: t('splashySkins'),
},
winterySkins: {
setPrice: 5, availableFrom: '2021-01-05', availableUntil: '2021-02-01', text: t('winterySkins'),
setPrice: 5, availableFrom: '2021-12-23T08:00-05:00', availableUntil: '2022-01-31T20:00-05:00', text: t('winterySkins'),
},
});
+1 -4
View File
@@ -1,10 +1,7 @@
import moment from 'moment';
import find from 'lodash/find';
import t from './translation';
import { EVENTS } from './constants';
const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end));
/*
---------------------------------------------------------------
Discounted Item Bundles
@@ -87,7 +84,7 @@ const bundles = {
'penguin',
],
canBuy () {
return CURRENT_EVENT && CURRENT_EVENT.season === 'winter';
return moment().isBetween('2022-01-11T08:00-05:00', '2022-01-31T20:00-05:00');
},
type: 'quests',
value: 7,
@@ -10,17 +10,22 @@ const gemsPromo = {
export const EVENTS = {
noCurrentEvent: {
start: '2022-01-06T20:00-05:00',
start: '2022-01-31T20:00-05:00',
end: '2022-02-28T20:00-05:00',
season: 'normal',
npcImageSuffix: '',
},
winter2022: {
start: '2021-12-21T08:00-05:00',
end: '2022-01-31T20:00-05:00',
season: 'winter',
npcImageSuffix: '_winter',
gear: true,
},
winter2022Promo: {
start: '2021-12-16T08:00-05:00',
end: '2022-01-06T20:00-05:00',
promo: 'g1g1',
season: 'normal',
npcImageSuffix: '',
},
prePromoNoEvent: {
start: '2021-11-28T20:00-05:00',
@@ -18,35 +18,35 @@ const SEASONAL_SETS = {
'festiveFairySet',
'cocoaSet',
// winter 2017
'winter2017IceHockeySet',
'winter2017WinterWolfSet',
'winter2017SugarPlumSet',
'winter2017FrostyRogueSet',
// winter 2018
'winter2018ConfettiSet',
'winter2018GiftWrappedSet',
'winter2018MistletoeSet',
'winter2018ReindeerSet',
// winter 2019
'winter2019PoinsettiaSet',
'winter2019WinterStarSet',
'winter2019BlizzardSet',
'winter2019PyrotechnicSet',
// winter 2020
'winter2020CarolOfTheMageSet',
'winter2020LanternSet',
'winter2020EvergreenSet',
'winter2020WinterSpiceSet',
// winter 2021
'winter2021WinterMoonMageSet',
'winter2021HollyIvyRogueSet',
'winter2021IceFishingWarriorSet',
'winter2021ArcticExplorerHealerSet',
'winter2022FireworksRogueSet',
'winter2022StockingWarriorSet',
'winter2022PomegranateMageSet',
'winter2022IceCrystalHealerSet',
],
spring: [
// spring 2014
File diff suppressed because it is too large Load Diff
@@ -177,18 +177,27 @@ const premium = {
value: 2,
text: t('hatchingPotionHolly'),
limited: true,
canBuy () {
return moment().isBetween('2019-12-19', '2020-02-02');
},
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndJanuary'),
previousDate: t('decemberYYYY', { year: 2016 }),
previousDate: t('januaryYYYY', { year: 2020 }),
}),
event: EVENTS.winter2022,
canBuy () {
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
},
},
Peppermint: {
value: 2,
text: t('hatchingPotionPeppermint'),
limited: true,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndJanuary'),
previousDate: t('januaryYYYY', { year: 2018 }),
}),
event: EVENTS.winter2022,
canBuy () {
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
},
},
StarryNight: {
value: 2,
@@ -450,12 +459,13 @@ const premium = {
value: 2,
text: t('hatchingPotionStainedGlass'),
limited: true,
_addlNotes: t('premiumPotionAddlNotes', {
date: t('dateEndJanuary'),
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndJanuary'),
previousDate: t('januaryYYYY', { year: 2021 }),
}),
event: EVENTS.winter2021,
event: EVENTS.winter2022,
canBuy () {
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
},
},
PolkaDot: {
+7 -17
View File
@@ -9,7 +9,9 @@ import {
USER_CAN_OWN_QUEST_CATEGORIES,
} from './constants';
const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end));
const CURRENT_EVENT = find(
EVENTS, event => moment().isBetween(event.start, event.end) && Boolean(event.season),
);
const userCanOwnQuestCategories = USER_CAN_OWN_QUEST_CATEGORIES;
const quests = {
@@ -260,10 +262,7 @@ const quests = {
},
},
evilsanta: {
canBuy () {
return CURRENT_EVENT && CURRENT_EVENT.season === 'winter';
},
event: EVENTS.winter2021,
event: CURRENT_EVENT && CURRENT_EVENT.season === 'winter' ? CURRENT_EVENT : null,
text: t('questEvilSantaText'),
notes: t('questEvilSantaNotes'),
addlNotes: t('evilSantaAddlNotes'),
@@ -288,10 +287,7 @@ const quests = {
},
},
evilsanta2: {
canBuy () {
return CURRENT_EVENT && CURRENT_EVENT.season === 'winter';
},
event: EVENTS.winter2021,
event: CURRENT_EVENT && CURRENT_EVENT.season === 'winter' ? CURRENT_EVENT : null,
text: t('questEvilSanta2Text'),
notes: t('questEvilSanta2Notes'),
addlNotes: t('evilSantaAddlNotes'),
@@ -518,10 +514,7 @@ const quests = {
completion: t('questEggHuntCompletion'),
value: 1,
category: 'pet',
event: EVENTS.spring2021,
canBuy () {
return moment().isBefore(EVENTS.spring2021.end);
},
event: CURRENT_EVENT && CURRENT_EVENT.season === 'spring' ? CURRENT_EVENT : null,
collect: {
plainEgg: {
text: t('questEggHuntCollectPlainEgg'),
@@ -3586,10 +3579,7 @@ const quests = {
completion: t('questWaffleCompletion'),
value: 4,
category: 'hatchingPotion',
event: EVENTS.spring2021,
canBuy () {
return moment().isBefore(EVENTS.spring2021.end);
},
event: CURRENT_EVENT && CURRENT_EVENT.season === 'spring' ? CURRENT_EVENT : null,
boss: {
name: t('questWaffleBoss'),
hp: 500,
@@ -1,9 +1,29 @@
// import moment from 'moment';
import moment from 'moment';
// Magic Hatching Potions are configured like this:
// type: 'premiumHatchingPotion', // note no "s" at the end
// path: 'premiumHatchingPotions.Rainbow',
const featuredItems = {
market () {
if (moment().isBefore('2022-01-31T20:00-05:00')) {
return [
{
type: 'armoire',
path: 'armoire',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.StainedGlass',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Peppermint',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Holly',
},
];
}
return [
{
type: 'armoire',
@@ -11,35 +31,67 @@ const featuredItems = {
},
{
type: 'food',
path: 'food.Chocolate',
path: 'food.Honey',
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.Shade',
path: 'hatchingPotions.CottonCandyPink',
},
{
type: 'eggs',
path: 'eggs.BearCub',
path: 'eggs.Cactus',
},
];
},
quests () {
if (moment().isBefore('2022-01-11T08:00-05:00')) {
return [
{
type: 'quests',
path: 'quests.evilsanta',
},
{
type: 'quests',
path: 'quests.evilsanta2',
},
{
type: 'quests',
path: 'quests.penguin',
},
];
}
if (moment().isBefore('2022-01-31T20:00-05:00')) {
return [
{
type: 'bundles',
path: 'bundles.winterQuests',
},
{
type: 'quests',
path: 'quests.silver',
},
{
type: 'quests',
path: 'quests.sheep',
},
];
}
return [
{
type: 'quests',
path: 'quests.slime',
path: 'quests.ferret',
},
{
type: 'quests',
path: 'quests.onyx',
path: 'quests.bronze',
},
{
type: 'quests',
path: 'quests.butterfly',
path: 'quests.basilist',
},
];
},
seasonal: 'summer2020Healer',
seasonal: 'winter2021Warrior',
timeTravelers: [
// TODO
],