mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
feat(event): Winter Wonderland 2021 and Gift-One-Get-One Promotion
This commit is contained in:
@@ -81,7 +81,7 @@ const bundles = {
|
||||
'penguin',
|
||||
],
|
||||
canBuy () {
|
||||
return moment().isBetween('2019-12-19', '2020-02-02');
|
||||
return moment().isBetween('2020-12-17T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
|
||||
@@ -16,19 +16,23 @@ export const EVENTS = {
|
||||
noCurrentEvent2021: {
|
||||
start: '2021-01-31T20:00-04:00',
|
||||
end: '2021-03-20T08:00-04:00',
|
||||
season: 'normal',
|
||||
},
|
||||
winter2021: {
|
||||
winter2021NoPromo: {
|
||||
start: '2021-01-07T20:00-04:00',
|
||||
end: '2021-01-31T20:00-04:00',
|
||||
season: 'winter',
|
||||
},
|
||||
winter2021Promo: {
|
||||
winter2021: {
|
||||
start: '2020-12-17T08:00-04:00',
|
||||
end: '2021-01-07T20:00-04:00',
|
||||
season: 'winter',
|
||||
promo: 'g1g1',
|
||||
},
|
||||
noCurrentEvent2020: {
|
||||
start: '2020-10-31T20:00-04:00',
|
||||
end: '2020-12-17T08:00-04:00',
|
||||
season: 'normal',
|
||||
},
|
||||
fall2020: {
|
||||
start: '2020-09-22T08:00-04:00',
|
||||
|
||||
@@ -41,6 +41,12 @@ const SEASONAL_SETS = {
|
||||
'winter2020LanternSet',
|
||||
'winter2020EvergreenSet',
|
||||
'winter2020WinterSpiceSet',
|
||||
|
||||
// winter 2021
|
||||
'winter2021WinterMoonMageSet',
|
||||
'winter2021HollyIvyRogueSet',
|
||||
'winter2021IceFishingWarriorSet',
|
||||
'winter2021ArcticExplorerHealerSet',
|
||||
],
|
||||
spring: [
|
||||
// spring 2014
|
||||
|
||||
@@ -19,7 +19,7 @@ const CURRENT_SEASON = findKey(EVENTS, event => {
|
||||
});
|
||||
|
||||
const gearEvents = cloneDeep(EVENTS);
|
||||
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021Promo', 'noCurrentEvent2021'].forEach(nonGearEvent => {
|
||||
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => {
|
||||
delete gearEvents[nonGearEvent];
|
||||
}); // TODO maybe we can match with regex instead of manually specifying here?
|
||||
|
||||
@@ -648,6 +648,18 @@ const armor = {
|
||||
fall2020Healer: {
|
||||
set: 'fall2020DeathsHeadMothHealerSet',
|
||||
},
|
||||
winter2021Rogue: {
|
||||
set: 'winter2021HollyIvyRogueSet',
|
||||
},
|
||||
winter2021Warrior: {
|
||||
set: 'winter2021IceFishingWarriorSet',
|
||||
},
|
||||
winter2021Mage: {
|
||||
set: 'winter2021WinterMoonMageSet',
|
||||
},
|
||||
winter2021Healer: {
|
||||
set: 'winter2021ArcticExplorerHealerSet',
|
||||
},
|
||||
};
|
||||
|
||||
const armorStats = {
|
||||
@@ -1637,6 +1649,18 @@ const head = {
|
||||
fall2020Healer: {
|
||||
set: 'fall2020DeathsHeadMothHealerSet',
|
||||
},
|
||||
winter2021Rogue: {
|
||||
set: 'winter2021HollyIvyRogueSet',
|
||||
},
|
||||
winter2021Warrior: {
|
||||
set: 'winter2021IceFishingWarriorSet',
|
||||
},
|
||||
winter2021Mage: {
|
||||
set: 'winter2021WinterMoonMageSet',
|
||||
},
|
||||
winter2021Healer: {
|
||||
set: 'winter2021ArcticExplorerHealerSet',
|
||||
},
|
||||
};
|
||||
|
||||
const headStats = {
|
||||
@@ -2360,6 +2384,15 @@ const shield = {
|
||||
fall2020Healer: {
|
||||
set: 'fall2020DeathsHeadMothHealerSet',
|
||||
},
|
||||
winter2021Rogue: {
|
||||
set: 'winter2021HollyIvyRogueSet',
|
||||
},
|
||||
winter2021Warrior: {
|
||||
set: 'winter2021IceFishingWarriorSet',
|
||||
},
|
||||
winter2021Healer: {
|
||||
set: 'winter2021ArcticExplorerHealerSet',
|
||||
},
|
||||
};
|
||||
|
||||
const shieldStats = {
|
||||
@@ -2969,6 +3002,18 @@ const weapon = {
|
||||
fall2020Healer: {
|
||||
set: 'fall2020DeathsHeadMothHealerSet',
|
||||
},
|
||||
winter2021Rogue: {
|
||||
set: 'winter2021HollyIvyRogueSet',
|
||||
},
|
||||
winter2021Warrior: {
|
||||
set: 'winter2021IceFishingWarriorSet',
|
||||
},
|
||||
winter2021Mage: {
|
||||
set: 'winter2021WinterMoonMageSet',
|
||||
},
|
||||
winter2021Healer: {
|
||||
set: 'winter2021ArcticExplorerHealerSet',
|
||||
},
|
||||
};
|
||||
|
||||
const weaponStats = {
|
||||
|
||||
@@ -226,6 +226,14 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionIcySnow'),
|
||||
limited: true,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndJanuary'),
|
||||
previousDate: t('decemberYYYY', { year: 2018 }),
|
||||
}),
|
||||
event: EVENTS.winter2021,
|
||||
canBuy () {
|
||||
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
},
|
||||
RoseQuartz: {
|
||||
value: 2,
|
||||
@@ -311,12 +319,14 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionAurora'),
|
||||
limited: true,
|
||||
canBuy () {
|
||||
return moment().isBetween('2019-12-19', '2020-02-02');
|
||||
},
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndJanuary'),
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndJanuary'),
|
||||
previousDate: t('decemberYYYY', { year: 2019 }),
|
||||
}),
|
||||
event: EVENTS.winter2021,
|
||||
canBuy () {
|
||||
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
},
|
||||
Ruby: {
|
||||
value: 2,
|
||||
@@ -400,6 +410,18 @@ const premium = {
|
||||
canBuy: hasQuestAchievementFunction('blackPearl'),
|
||||
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
||||
},
|
||||
StainedGlass: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionStainedGlass'),
|
||||
limited: true,
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndJanuary'),
|
||||
}),
|
||||
event: EVENTS.winter2021,
|
||||
canBuy () {
|
||||
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const wacky = {
|
||||
|
||||
@@ -259,8 +259,9 @@ const quests = {
|
||||
},
|
||||
evilsanta: {
|
||||
canBuy () {
|
||||
return moment().isBetween('2019-12-19', '2020-02-02');
|
||||
return moment().isBetween('2020-12-17T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
event: EVENTS.winter2021,
|
||||
text: t('questEvilSantaText'),
|
||||
notes: t('questEvilSantaNotes'),
|
||||
addlNotes: t('evilSantaAddlNotes'),
|
||||
@@ -286,8 +287,9 @@ const quests = {
|
||||
},
|
||||
evilsanta2: {
|
||||
canBuy () {
|
||||
return moment().isBetween('2019-12-19', '2020-02-02');
|
||||
return moment().isBetween('2020-12-17T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
event: EVENTS.winter2021,
|
||||
text: t('questEvilSanta2Text'),
|
||||
notes: t('questEvilSanta2Notes'),
|
||||
addlNotes: t('evilSantaAddlNotes'),
|
||||
|
||||
@@ -4,7 +4,27 @@ import moment from 'moment';
|
||||
// path: 'premiumHatchingPotions.Rainbow',
|
||||
const featuredItems = {
|
||||
market () {
|
||||
if (moment().isBefore('2020-12-02')) {
|
||||
if (moment().isBefore('2020-12-17T08:00-04:00')) {
|
||||
return [
|
||||
{
|
||||
type: 'armoire',
|
||||
path: 'armoire',
|
||||
},
|
||||
{
|
||||
type: 'hatchingPotions',
|
||||
path: 'hatchingPotions.White',
|
||||
},
|
||||
{
|
||||
type: 'eggs',
|
||||
path: 'eggs.Cactus',
|
||||
},
|
||||
{
|
||||
type: 'food',
|
||||
path: 'food.Honey',
|
||||
},
|
||||
];
|
||||
}
|
||||
if (moment().isBefore('2021-01-31T20:00-04:00')) {
|
||||
return [
|
||||
{
|
||||
type: 'armoire',
|
||||
@@ -12,15 +32,15 @@ const featuredItems = {
|
||||
},
|
||||
{
|
||||
type: 'premiumHatchingPotion',
|
||||
path: 'premiumHatchingPotions.AutumnLeaf',
|
||||
path: 'premiumHatchingPotions.StainedGlass',
|
||||
},
|
||||
{
|
||||
type: 'premiumHatchingPotion',
|
||||
path: 'premiumHatchingPotions.Frost',
|
||||
path: 'premiumHatchingPotions.Aurora',
|
||||
},
|
||||
{
|
||||
type: 'food',
|
||||
path: 'food.Chocolate',
|
||||
type: 'premiumHatchingPotion',
|
||||
path: 'premiumHatchingPotions.IcySnow',
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -29,49 +49,65 @@ const featuredItems = {
|
||||
type: 'armoire',
|
||||
path: 'armoire',
|
||||
},
|
||||
{
|
||||
type: 'food',
|
||||
path: 'food.Saddle',
|
||||
},
|
||||
{
|
||||
type: 'hatchingPotions',
|
||||
path: 'hatchingPotions.White',
|
||||
path: 'hatchingPotions.Golden',
|
||||
},
|
||||
{
|
||||
type: 'eggs',
|
||||
path: 'eggs.Cactus',
|
||||
},
|
||||
{
|
||||
type: 'food',
|
||||
path: 'food.Honey',
|
||||
path: 'eggs.Fox',
|
||||
},
|
||||
];
|
||||
},
|
||||
quests () {
|
||||
if (moment().isBefore('2020-11-02')) {
|
||||
if (moment().isBefore('2020-12-17T08:00-04:00')) {
|
||||
return [
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.gryphon',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.hedgehog',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.rat',
|
||||
},
|
||||
];
|
||||
}
|
||||
if (moment().isBefore('2021-01-31T20:00-04:00')) {
|
||||
return [
|
||||
{
|
||||
type: 'bundles',
|
||||
path: 'bundles.sandySidekicks',
|
||||
path: 'bundles.winterQuests',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.taskwoodsTerror1',
|
||||
path: 'quests.spider',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.ruby',
|
||||
path: 'quests.silver',
|
||||
},
|
||||
];
|
||||
}
|
||||
return [
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.gryphon',
|
||||
path: 'quests.ghost_stag',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.hedgehog',
|
||||
path: 'quests.unicorn',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.rat',
|
||||
path: 'quests.falcon',
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user