mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
feat(event): 10th Birthday Bash
with @CuriousMagpie and @phillipthelen
This commit is contained in:
@@ -540,6 +540,11 @@ const backgrounds = {
|
||||
snowy_temple: { },
|
||||
winter_lake_with_swans: { },
|
||||
},
|
||||
eventBackgrounds: {
|
||||
birthday_bash: {
|
||||
price: 0,
|
||||
},
|
||||
},
|
||||
timeTravelBackgrounds: {
|
||||
airship: {
|
||||
price: 1,
|
||||
@@ -583,7 +588,9 @@ forOwn(backgrounds, (backgroundsInSet, set) => {
|
||||
forOwn(backgroundsInSet, (background, bgKey) => {
|
||||
background.key = bgKey;
|
||||
background.set = set;
|
||||
background.price = background.price || 7;
|
||||
if (background.price !== 0) {
|
||||
background.price = background.price || 7;
|
||||
}
|
||||
background.text = background.text || t(`background${upperFirst(camelCase(bgKey))}Text`);
|
||||
background.notes = background.notes || t(`background${upperFirst(camelCase(bgKey))}Notes`);
|
||||
|
||||
|
||||
@@ -10,11 +10,15 @@ const gemsPromo = {
|
||||
|
||||
export const EVENTS = {
|
||||
noEvent: {
|
||||
start: '2023-01-31T20:00-05:00',
|
||||
start: '2023-02-01T23:59-05:00',
|
||||
end: '2023-02-14T08:00-05:00',
|
||||
season: 'normal',
|
||||
npcImageSuffix: '',
|
||||
},
|
||||
birthday10: {
|
||||
start: '2023-01-23T08:00-05:00',
|
||||
end: '2023-02-01T23:59-05:00',
|
||||
},
|
||||
winter2023: {
|
||||
start: '2022-12-20T08:00-05:00',
|
||||
end: '2023-01-31T23:59-05:00',
|
||||
|
||||
@@ -798,6 +798,12 @@ const armor = {
|
||||
winter2023Healer: {
|
||||
set: 'winter2023CardinalHealerSet',
|
||||
},
|
||||
birthday2023: {
|
||||
text: t('armorSpecialBirthday2023Text'),
|
||||
notes: t('armorSpecialBirthday2023Notes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('armor_special_birthday2023'),
|
||||
},
|
||||
};
|
||||
|
||||
const armorStats = {
|
||||
@@ -923,6 +929,12 @@ const back = {
|
||||
value: 0,
|
||||
canOwn: ownsItem('back_special_namingDay2020'),
|
||||
},
|
||||
anniversary: {
|
||||
text: t('backSpecialAnniversaryText'),
|
||||
notes: t('backSpecialAnniversaryNotes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('back_special_anniversary'),
|
||||
},
|
||||
};
|
||||
|
||||
const body = {
|
||||
@@ -992,6 +1004,12 @@ const body = {
|
||||
value: 0,
|
||||
canOwn: ownsItem('body_special_namingDay2018'),
|
||||
},
|
||||
anniversary: {
|
||||
text: t('bodySpecialAnniversaryText'),
|
||||
notes: t('bodySpecialAnniversaryNotes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('body_special_anniversary'),
|
||||
},
|
||||
};
|
||||
|
||||
const eyewear = {
|
||||
@@ -1140,6 +1158,12 @@ const eyewear = {
|
||||
value: 0,
|
||||
canOwn: ownsItem('eyewear_special_ks2019'),
|
||||
},
|
||||
anniversary: {
|
||||
text: t('eyewearSpecialAnniversaryText'),
|
||||
notes: t('eyewearSpecialAnniversaryNotes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('eyewear_special_anniversary'),
|
||||
},
|
||||
};
|
||||
|
||||
const head = {
|
||||
|
||||
@@ -70,13 +70,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionShimmer'),
|
||||
limited: true,
|
||||
event: EVENTS.spring2022,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndMarch'),
|
||||
previousDate: t('marchYYYY', { year: 2020 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('marchYYYY', { year: 2022 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.spring2022.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
Fairy: {
|
||||
@@ -109,13 +109,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionAquatic'),
|
||||
limited: true,
|
||||
event: EVENTS.summer2022,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndJuly'),
|
||||
previousDate: t('augustYYYY', { year: 2020 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('julyYYYY', { year: 2022 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.summer2022.start, EVENTS.summer2022.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
Ember: {
|
||||
@@ -188,12 +188,12 @@ const premium = {
|
||||
text: t('hatchingPotionPeppermint'),
|
||||
limited: true,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndJanuary'),
|
||||
previousDate: t('januaryYYYY', { year: 2018 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('januaryYYYY', { year: 2022 }),
|
||||
}),
|
||||
event: EVENTS.winter2022,
|
||||
event: EVENTS.birthday10,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
StarryNight: {
|
||||
@@ -239,13 +239,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionGlow'),
|
||||
limited: true,
|
||||
event: EVENTS.fall2021,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndOctober'),
|
||||
previousDate: t('septemberYYYY', { year: 2019 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('octoberYYYY', { year: 2021 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.fall2021.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
Frost: {
|
||||
@@ -286,13 +286,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionCelestial'),
|
||||
limited: true,
|
||||
event: EVENTS.spring2022,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndMarch'),
|
||||
previousDate: t('marchYYYY', { year: 2020 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('marchYYYY', { year: 2022 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.spring2022.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
Sunshine: {
|
||||
@@ -399,13 +399,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionSandSculpture'),
|
||||
limited: true,
|
||||
event: EVENTS.summer2021,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndJuly'),
|
||||
previousDate: t('juneYYYY', { year: 2020 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('julyYYYY', { year: 2021 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.summer2021.start, EVENTS.summer2021.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
Windup: {
|
||||
@@ -426,26 +426,26 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionVampire'),
|
||||
limited: true,
|
||||
event: EVENTS.fall2022,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndOctober'),
|
||||
previousDate: t('octoberYYYY', { year: 2021 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('octoberYYYY', { year: 2022 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.fall2022.start, EVENTS.fall2022.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
AutumnLeaf: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionAutumnLeaf'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202111,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndNovember'),
|
||||
previousDate: t('novemberYYYY', { year: 2020 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('novemberYYYY', { year: 2021 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.potions202111.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
BlackPearl: {
|
||||
@@ -460,12 +460,12 @@ const premium = {
|
||||
text: t('hatchingPotionStainedGlass'),
|
||||
limited: true,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndJanuary'),
|
||||
previousDate: t('januaryYYYY', { year: 2021 }),
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('januaryYYYY', { year: 2022 }),
|
||||
}),
|
||||
event: EVENTS.winter2022,
|
||||
event: EVENTS.birthday10,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.winter2022.start, EVENTS.winter2022.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
PolkaDot: {
|
||||
@@ -532,12 +532,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionPorcelain'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202208,
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndAugust'),
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateStartFebruary'),
|
||||
previousDate: t('augustYYYY', { year: 2022 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202208.start, EVENTS.potions202208.end);
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import each from 'lodash/each';
|
||||
import moment from 'moment';
|
||||
import { EVENTS } from './constants/events';
|
||||
import {
|
||||
drops as dropEggs,
|
||||
quests as questEggs,
|
||||
@@ -118,6 +120,9 @@ const canFindSpecial = {
|
||||
'Jackalope-RoyalPurple': true, // subscription
|
||||
'Wolf-Cerberus': false, // Pet once granted to backers
|
||||
'Gryphon-Gryphatrice': false, // Pet once granted to kickstarter
|
||||
|
||||
// Birthday Pet
|
||||
'Gryphatrice-Jubilant': false,
|
||||
},
|
||||
mounts: {
|
||||
// Thanksgiving pet ladder
|
||||
@@ -174,6 +179,7 @@ const specialPets = {
|
||||
'Fox-Veteran': 'veteranFox',
|
||||
'JackOLantern-Glow': 'glowJackolantern',
|
||||
'Gryphon-Gryphatrice': 'gryphatrice',
|
||||
'Gryphatrice-Jubilant': 'jubilantGryphatrice',
|
||||
'JackOLantern-RoyalPurple': 'royalPurpleJackolantern',
|
||||
};
|
||||
|
||||
@@ -207,6 +213,16 @@ each(specialPets, (translationString, key) => {
|
||||
};
|
||||
});
|
||||
|
||||
Object.assign(petInfo['Gryphatrice-Jubilant'], {
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
currency: 'gems',
|
||||
event: 'birthday10',
|
||||
value: 60,
|
||||
purchaseType: 'pets',
|
||||
});
|
||||
|
||||
each(specialMounts, (translationString, key) => {
|
||||
mountInfo[key] = {
|
||||
key,
|
||||
|
||||
Reference in New Issue
Block a user