habitica/website/common/script/content/shop-featuredItems.js

103 lines
2.1 KiB
JavaScript
Raw Normal View History

import moment from 'moment';
2022-06-13 20:37:02 +00:00
import { EVENTS } from './constants';
// Magic Hatching Potions are configured like this:
// type: 'premiumHatchingPotion', // note no "s" at the end
// path: 'premiumHatchingPotions.Rainbow',
const featuredItems = {
2019-11-14 21:08:45 +00:00
market () {
if (moment().isBetween(EVENTS.potions202305.start, EVENTS.potions202305.end)) {
return [
{
type: 'armoire',
path: 'armoire',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Fairy',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Floral',
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.Golden',
},
];
}
2019-11-14 21:08:45 +00:00
return [
{
type: 'armoire',
path: 'armoire',
},
{
type: 'food',
path: 'food.Honey',
2019-11-14 21:08:45 +00:00
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.Golden',
2019-11-14 21:08:45 +00:00
},
{
type: 'eggs',
path: 'eggs.Dragon',
2019-11-14 21:08:45 +00:00
},
];
},
quests () { // start date is 3/28
if (moment().isBetween(EVENTS.bundle202303.start, EVENTS.bundle202303.end)) {
return [
{
type: 'bundles',
path: 'bundles.jungleBuddies',
},
{
type: 'quests',
path: 'quests.kraken',
},
{
type: 'quests',
path: 'quests.nudibranch',
},
];
}
if (moment().isBetween('2023-03-28T08:00-05:00', EVENTS.spring2023.end)) {
return [
{
type: 'quests',
path: 'quests.egg',
},
{
type: 'quests',
path: 'quests.yarn',
},
{
type: 'quests',
path: 'quests.ghost_stag',
},
];
}
2019-12-19 22:54:27 +00:00
return [
{
type: 'quests',
path: 'quests.rat',
2019-12-19 22:54:27 +00:00
},
{
type: 'quests',
path: 'quests.kraken',
2019-12-19 22:54:27 +00:00
},
{
type: 'quests',
path: 'quests.nudibranch',
2019-12-19 22:54:27 +00:00
},
];
},
seasonal: 'spring2022Healer',
timeTravelers: [
// TODO
],
};
export default featuredItems;