import {sortBy} from 'lodash'; import { merge, setQuestDefaults, } from '../helpers'; //-------------------------------------------------- // Quests are series objects that have defaults applied if not provided // // : { // key: , // text: t(questtext), // notes: t(questnotes), // canBuy: , // value: , // boss: // drop: // } // // is the name of the quest // is a screeaming camelCase version of the key // is a boolean passed in as part of an options object // is the price of the quest in gems - defaults to 4 // only applies to boss quests. An object in this form: { // name: t(questBoss), // str: , // def: , // rage: , // } // only applies to boss quests with rage. An object in this form: { // title: t('bossRageTitle'), // description: t('bossRageDescription') // } // only applies if quest has drops. An object in this form: { // items: , // gp: , // exp: , // unlock: t(questUnlockText), // } // an array of objects representing the items that will be dropped // the amount of gp awarded for completing the quest // the amount of exp awareded for completing the quest //-------------------------------------------------- import worldQuests from './world'; import holidayQuests from './holiday'; import petQuests from './pet'; import unlockableQuests from './unlockable'; import goldPurchasableQuests from './gold-purchasable'; let allQuests = merge([ worldQuests, holidayQuests, petQuests, unlockableQuests, goldPurchasableQuests ]); setQuestDefaults(allQuests); let questsByLevel = sortBy(allQuests, (quest) => { return quest.lvl || 0; }); let canOwnCategories = [ 'unlockable', 'gold', 'pet', ]; export default { all: allQuests, byLevel: questsByLevel, canOwnCategories: canOwnCategories, };