feat(cont): 2023 Spring Fling content (#14525)

* feat(cont): 2023 Spring Fling

* feat(content): 2023 Spring Fling (attempt to add Jungle Buddies Quest Bundle)

* fix(event): various typos and date ranges

* fix(event): correct countdown on Shiny Seed

* fix(quests): correct TypeError in featured list

* feat(content): update Spring gear to canon desc

---------

Co-authored-by: SabreCat <sabe@habitica.com>
This commit is contained in:
Natalie L
2023-03-17 16:05:04 -04:00
committed by GitHub
parent 1940062200
commit a363e68080
11 changed files with 173 additions and 48 deletions

View File

@@ -12,7 +12,7 @@ export default prefill({
pastelHairColors: { setPrice: 5, availableUntil: '2016-01-01' },
rainbowHairColors: { setPrice: 5, text: t('rainbowColors') },
shimmerHairColors: {
setPrice: 5, availableFrom: '2022-04-14T08:00-05:00', availableUntil: '2022-04-30T20:00-05:00', text: t('shimmerColors'),
setPrice: 5, availableFrom: '2023-04-11T08:00-05:00', availableUntil: EVENTS.spring2023.end, text: t('shimmerColors'),
},
hauntedHairColors: {
setPrice: 5, availableFrom: '2022-10-04T08:00-04:00', availableUntil: EVENTS.fall2022.end, text: t('hauntedColors'),
@@ -23,7 +23,7 @@ export default prefill({
rainbowSkins: { setPrice: 5, text: t('rainbowSkins') },
animalSkins: { setPrice: 5, text: t('animalSkins') },
pastelSkins: {
setPrice: 5, availableFrom: '2022-04-14T08:00-05:00', availableUntil: '2022-04-30T20:00-05:00', text: t('pastelSkins'),
setPrice: 5, availableFrom: '2022-04-11T08:00-05:00', availableUntil: EVENTS.spring2023.end, text: t('pastelSkins'),
},
spookySkins: { setPrice: 5, availableUntil: '2016-01-01', text: t('spookySkins') },
supernaturalSkins: {

View File

@@ -10,11 +10,18 @@ const gemsPromo = {
export const EVENTS = {
noEvent: {
start: '2023-02-28T23:59-05:00',
end: '2023-03-21T08:00-05:00',
start: '2023-05-01T23:59-05:00',
end: '2023-06-22T08:00-05:00',
season: 'normal',
npcImageSuffix: '',
},
spring2023: {
start: '2023-03-21T08:00-04:00',
end: '2023-04-30T23:59-04:00',
npcImageSuffix: '_spring',
season: 'spring',
gear: true,
},
bundle202303: {
start: '2023-03-16T08:00-04:00',
end: '2023-03-31T23:59-04:00',

View File

@@ -52,6 +52,7 @@ const SEASONAL_SETS = {
'winter2023WalrusWarriorSet',
'winter2023FairyLightsMageSet',
'winter2023CardinalHealerSet',
],
spring: [
// spring 2014
@@ -101,6 +102,11 @@ const SEASONAL_SETS = {
'spring2022PeridotHealerSet',
'spring2022RainstormWarriorSet',
'spring2022MagpieRogueSet',
'spring2023CaterpillarRogueSet',
'spring2023HummingbirdWarriorSet',
'spring2023MoonstoneMageSet',
'spring2023LilyHealerSet',
],
summer: [

View File

@@ -789,15 +789,19 @@ const armor = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Mage: {
set: 'winter2023FairyLightsMageSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
birthday2023: {
text: t('armorSpecialBirthday2023Text'),
@@ -805,6 +809,18 @@ const armor = {
value: 0,
canOwn: ownsItem('armor_special_birthday2023'),
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Mage: {
set: 'spring2023MoonstoneMageSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
const armorStats = {
@@ -1947,15 +1963,19 @@ const head = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Mage: {
set: 'winter2023FairyLightsMageSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
nye2022: {
text: t('headSpecialNye2022Text'),
@@ -1963,6 +1983,18 @@ const head = {
value: 0,
canOwn: ownsItem('head_special_nye2022'),
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Mage: {
set: 'spring2023MoonstoneMageSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
const headStats = {
@@ -2742,7 +2774,7 @@ const shield = {
},
spring2022Healer: {
set: 'spring2022PeridotHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'summer',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2022Rogue: {
set: 'summer2022CrabRogueSet',
@@ -2770,12 +2802,24 @@ const shield = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
@@ -3519,15 +3563,31 @@ const weapon = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Mage: {
set: 'winter2023FairyLightsMageSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Mage: {
set: 'spring2023MoonstoneMageSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};

View File

@@ -219,12 +219,12 @@ const premium = {
text: t('hatchingPotionRainbow'),
limited: true,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2019 }),
availableDate: t('dateEndApril'),
previousDate: t('marchYYYY', { year: 2021 }),
}),
event: EVENTS.spring2021,
event: EVENTS.spring2023,
canBuy () {
return moment().isBefore(EVENTS.spring2021.end);
return moment().isBefore(EVENTS.spring2023.end);
},
},
Glass: {
@@ -389,13 +389,13 @@ const premium = {
value: 2,
text: t('hatchingPotionBirchBark'),
limited: true,
event: EVENTS.spring2021,
event: EVENTS.spring2023,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2020 }),
availableDate: t('dateEndApril'),
previousDate: t('marchYYYY', { year: 2021 }),
}),
canBuy () {
return moment().isBefore(EVENTS.spring2021.end);
return moment().isBefore(EVENTS.spring2023.end);
},
},
Fluorite: {
@@ -482,13 +482,13 @@ const premium = {
value: 2,
text: t('hatchingPotionPolkaDot'),
limited: true,
event: EVENTS.spring2022,
event: EVENTS.spring2023,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2021 }),
availableDate: t('dateEndApril'),
previousDate: t('marchYYYY', { year: 2022 }),
}),
canBuy () {
return moment().isBefore(EVENTS.spring2022.end);
return moment().isBefore(EVENTS.spring2023.end);
},
},
MossyStone: {

View File

@@ -74,7 +74,7 @@ const QUEST_SEASONAL = {
egg: {
event: CURRENT_EVENT && CURRENT_EVENT.season === 'spring' ? CURRENT_EVENT : null,
canBuy () {
return this.event && moment().isBetween(this.event.start, this.event.end);
return this.event && moment().isBetween('2023-03-28T08:00-05:00', this.event.end);
},
text: t('questEggHuntText'),
notes: t('questEggHuntNotes'),

View File

@@ -5,7 +5,7 @@ import { EVENTS } from './constants';
// path: 'premiumHatchingPotions.Rainbow',
const featuredItems = {
market () {
if (moment().isBetween(EVENTS.potions202302.start, EVENTS.potions202302.end)) {
if (moment().isBetween(EVENTS.spring2023.start, EVENTS.spring2023.end)) {
return [
{
type: 'armoire',
@@ -13,15 +13,15 @@ const featuredItems = {
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.RoseQuartz',
path: 'premiumHatchingPotions.PolkaDot',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Cupid',
path: 'premiumHatchingPotions.BirchBark',
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.CottonCandyPink',
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Rainbow',
},
];
}
@@ -32,51 +32,68 @@ const featuredItems = {
},
{
type: 'food',
path: 'food.RottenMeat',
path: 'food.Honey',
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.CottonCandyBlue',
path: 'hatchingPotions.Golden',
},
{
type: 'eggs',
path: 'eggs.FlyingPig',
path: 'eggs.Dragon',
},
];
},
quests () {
if (moment().isBetween(EVENTS.bundle202302.start, EVENTS.bundle202302.end)) {
quests () { // start date is 3/28
if (moment().isBetween(EVENTS.bundle202303.start, EVENTS.bundle202303.end)) {
return [
{
type: 'bundles',
path: 'bundles.mythicalMarvels',
path: 'bundles.jungleBuddies',
},
{
type: 'quests',
path: 'quests.treeling',
path: 'quests.kraken',
},
{
type: 'quests',
path: 'quests.rock',
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',
},
];
}
return [
{
type: 'quests',
path: 'quests.slime',
path: 'quests.rat',
},
{
type: 'quests',
path: 'quests.seaserpent',
path: 'quests.kraken',
},
{
type: 'quests',
path: 'quests.unicorn',
path: 'quests.nudibranch',
},
];
},
seasonal: 'winter2022Healer',
seasonal: 'spring2022Healer',
timeTravelers: [
// TODO
],

View File

@@ -360,9 +360,9 @@ spells.special = {
previousPurchase: true,
target: 'user',
notes: t('spellSpecialShinySeedNotes'),
event: EVENTS.spring2022,
event: EVENTS.spring2023,
canOwn () {
return moment().isBetween('2022-04-14T08:00-05:00', EVENTS.spring2022.end);
return moment().isBetween('2023-04-18T08:00-05:00', EVENTS.spring2023.end);
},
cast (user, target, req) {
if (!user.items.special.shinySeed) throw new NotAuthorized(t('spellNotOwned')(req.language));