mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
first pass on refactoring
This commit is contained in:
171
website/common/script/content/constants/questSeasonal.js
Normal file
171
website/common/script/content/constants/questSeasonal.js
Normal file
@@ -0,0 +1,171 @@
|
||||
import find from 'lodash/find';
|
||||
import moment from 'moment';
|
||||
import EVENTS from 'events';
|
||||
import t from '../translation';
|
||||
|
||||
const CURRENT_EVENT = find(
|
||||
EVENTS, event => moment().isBetween(event.start, event.end) && Boolean(event.season),
|
||||
);
|
||||
|
||||
const QUEST_SEASONAL = {
|
||||
// winter
|
||||
evilsanta: {
|
||||
event: CURRENT_EVENT && CURRENT_EVENT.season === 'winter' ? CURRENT_EVENT : null,
|
||||
text: t('questEvilSantaText'),
|
||||
notes: t('questEvilSantaNotes'),
|
||||
addlNotes: t('evilSantaAddlNotes'),
|
||||
completion: t('questEvilSantaCompletion'),
|
||||
value: 4,
|
||||
category: 'pet',
|
||||
boss: {
|
||||
name: t('questEvilSantaBoss'),
|
||||
hp: 300,
|
||||
str: 1,
|
||||
},
|
||||
drop: {
|
||||
items: [
|
||||
{
|
||||
type: 'mounts',
|
||||
key: 'BearCub-Polar',
|
||||
text: t('questEvilSantaDropBearCubPolarMount'),
|
||||
},
|
||||
],
|
||||
gp: 20,
|
||||
exp: 100,
|
||||
},
|
||||
},
|
||||
evilsanta2: {
|
||||
event: CURRENT_EVENT && CURRENT_EVENT.season === 'winter' ? CURRENT_EVENT : null,
|
||||
text: t('questEvilSanta2Text'),
|
||||
notes: t('questEvilSanta2Notes'),
|
||||
addlNotes: t('evilSantaAddlNotes'),
|
||||
completion: t('questEvilSanta2Completion'),
|
||||
value: 4,
|
||||
category: 'pet',
|
||||
collect: {
|
||||
tracks: {
|
||||
text: t('questEvilSanta2CollectTracks'),
|
||||
count: 20,
|
||||
},
|
||||
branches: {
|
||||
text: t('questEvilSanta2CollectBranches'),
|
||||
count: 10,
|
||||
},
|
||||
},
|
||||
drop: {
|
||||
items: [
|
||||
{
|
||||
type: 'pets',
|
||||
key: 'BearCub-Polar',
|
||||
text: t('questEvilSanta2DropBearCubPolarPet'),
|
||||
},
|
||||
],
|
||||
gp: 20,
|
||||
exp: 100,
|
||||
},
|
||||
},
|
||||
// spring
|
||||
egg: {
|
||||
text: t('questEggHuntText'),
|
||||
notes: t('questEggHuntNotes'),
|
||||
completion: t('questEggHuntCompletion'),
|
||||
value: 1,
|
||||
category: 'pet',
|
||||
event: CURRENT_EVENT && CURRENT_EVENT.season === 'spring' ? CURRENT_EVENT : null,
|
||||
collect: {
|
||||
plainEgg: {
|
||||
text: t('questEggHuntCollectPlainEgg'),
|
||||
count: 40,
|
||||
},
|
||||
},
|
||||
drop: {
|
||||
items: [
|
||||
{
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
}, {
|
||||
type: 'eggs',
|
||||
key: 'Egg',
|
||||
text: t('questEggHuntDropPlainEgg'),
|
||||
},
|
||||
],
|
||||
gp: 0,
|
||||
exp: 0,
|
||||
},
|
||||
},
|
||||
waffle: {
|
||||
text: t('questWaffleText'),
|
||||
notes: t('questWaffleNotes'),
|
||||
completion: t('questWaffleCompletion'),
|
||||
value: 4,
|
||||
category: 'hatchingPotion',
|
||||
event: CURRENT_EVENT && CURRENT_EVENT.season === 'spring' ? CURRENT_EVENT : null,
|
||||
boss: {
|
||||
name: t('questWaffleBoss'),
|
||||
hp: 500,
|
||||
str: 2,
|
||||
rage: {
|
||||
title: t('questWaffleRageTitle'),
|
||||
description: t('questWaffleRageDescription'),
|
||||
value: 50,
|
||||
progressDrain: 0.5,
|
||||
effect: t('questWaffleRageEffect'),
|
||||
},
|
||||
},
|
||||
drop: {
|
||||
items: [
|
||||
{
|
||||
type: 'hatchingPotions',
|
||||
key: 'Dessert',
|
||||
text: t('questWaffleDropDessertPotion'),
|
||||
}, {
|
||||
type: 'hatchingPotions',
|
||||
key: 'Dessert',
|
||||
text: t('questWaffleDropDessertPotion'),
|
||||
}, {
|
||||
type: 'hatchingPotions',
|
||||
key: 'Dessert',
|
||||
text: t('questWaffleDropDessertPotion'),
|
||||
},
|
||||
],
|
||||
gp: 40,
|
||||
exp: 500,
|
||||
unlock: t('questWaffleUnlockText'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default QUEST_SEASONAL;
|
||||
Reference in New Issue
Block a user