2017-05-18 01:36:34 +00:00
|
|
|
import defaults from 'lodash/defaults';
|
2020-12-11 21:59:41 +00:00
|
|
|
import each from 'lodash/each';
|
2017-05-18 01:36:34 +00:00
|
|
|
import sortBy from 'lodash/sortBy';
|
|
|
|
|
import t from './translation';
|
2022-05-05 21:51:47 +00:00
|
|
|
import { USER_CAN_OWN_QUEST_CATEGORIES } from './constants';
|
|
|
|
|
import QUEST_GENERIC from './quests/generic';
|
|
|
|
|
import QUEST_MASTERCLASSER from './quests/masterclasser';
|
|
|
|
|
import QUEST_PETS from './quests/pets';
|
|
|
|
|
import QUEST_POTIONS from './quests/potions';
|
|
|
|
|
import QUEST_SEASONAL from './quests/seasonal';
|
|
|
|
|
import QUEST_SERIES from './quests/series';
|
|
|
|
|
import QUEST_TIME_TRAVEL from './quests/timeTravel';
|
|
|
|
|
import QUEST_WORLD from './quests/world';
|
2017-05-18 01:36:34 +00:00
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const userCanOwnQuestCategories = USER_CAN_OWN_QUEST_CATEGORIES;
|
2022-01-27 21:59:29 +00:00
|
|
|
const questGeneric = QUEST_GENERIC;
|
|
|
|
|
const questMasterclasser = QUEST_MASTERCLASSER;
|
|
|
|
|
const questPets = QUEST_PETS;
|
|
|
|
|
const questPotions = QUEST_POTIONS;
|
2022-02-02 21:25:28 +00:00
|
|
|
const questSeasonal = QUEST_SEASONAL;
|
|
|
|
|
const questSeries = QUEST_SERIES;
|
2022-01-27 21:59:29 +00:00
|
|
|
const questTimeTravel = QUEST_TIME_TRAVEL;
|
|
|
|
|
const questWorld = QUEST_WORLD;
|
2017-05-18 01:36:34 +00:00
|
|
|
|
2022-02-02 21:48:48 +00:00
|
|
|
// this uses the spread operator, which allows us to combine multiple objects into one
|
|
|
|
|
const quests = {
|
|
|
|
|
...questGeneric,
|
|
|
|
|
...questMasterclasser,
|
|
|
|
|
...questPets,
|
|
|
|
|
...questPotions,
|
|
|
|
|
...questSeasonal,
|
|
|
|
|
...questSeries,
|
|
|
|
|
...questTimeTravel,
|
|
|
|
|
...questWorld,
|
|
|
|
|
};
|
2017-05-18 01:36:34 +00:00
|
|
|
|
|
|
|
|
each(quests, (v, key) => {
|
|
|
|
|
defaults(v, {
|
|
|
|
|
key,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
});
|
2019-10-09 14:51:17 +00:00
|
|
|
|
|
|
|
|
const b = v.boss;
|
|
|
|
|
|
2017-05-18 01:36:34 +00:00
|
|
|
if (b) {
|
|
|
|
|
defaults(b, {
|
|
|
|
|
str: 1,
|
|
|
|
|
def: 1,
|
|
|
|
|
});
|
|
|
|
|
if (b.rage) {
|
2019-10-09 18:08:36 +00:00
|
|
|
defaults(b.rage, {
|
2021-11-04 21:33:08 +00:00
|
|
|
title: t('rage'),
|
2017-05-18 01:36:34 +00:00
|
|
|
description: t('bossRageDescription'),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const questsByLevel = sortBy(quests, quest => quest.lvl || 0);
|
2017-05-18 01:36:34 +00:00
|
|
|
|
2019-10-01 15:53:48 +00:00
|
|
|
export {
|
2017-05-18 01:36:34 +00:00
|
|
|
quests,
|
|
|
|
|
questsByLevel,
|
|
|
|
|
userCanOwnQuestCategories,
|
|
|
|
|
};
|