2017-03-01 16:10:48 +00:00
|
|
|
import assign from 'lodash/assign';
|
|
|
|
|
import defaults from 'lodash/defaults';
|
|
|
|
|
import each from 'lodash/each';
|
2016-09-10 18:37:10 +00:00
|
|
|
import t from './translation';
|
|
|
|
|
|
2019-05-13 16:02:07 +00:00
|
|
|
function hasQuestAchievementFunction (key) {
|
2022-02-14 19:55:19 +00:00
|
|
|
return user => user.achievements.quests && user.achievements.quests[key] > 0;
|
2019-05-13 16:02:07 +00:00
|
|
|
}
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const drops = {
|
2016-09-10 18:37:10 +00:00
|
|
|
Base: {
|
|
|
|
|
value: 2,
|
|
|
|
|
},
|
|
|
|
|
White: {
|
|
|
|
|
value: 2,
|
|
|
|
|
},
|
|
|
|
|
Desert: {
|
|
|
|
|
value: 2,
|
|
|
|
|
},
|
|
|
|
|
Red: {
|
|
|
|
|
value: 3,
|
|
|
|
|
},
|
|
|
|
|
Shade: {
|
|
|
|
|
value: 3,
|
|
|
|
|
},
|
|
|
|
|
Skeleton: {
|
|
|
|
|
value: 3,
|
|
|
|
|
},
|
|
|
|
|
Zombie: {
|
|
|
|
|
value: 4,
|
|
|
|
|
},
|
|
|
|
|
CottonCandyPink: {
|
|
|
|
|
value: 4,
|
|
|
|
|
},
|
|
|
|
|
CottonCandyBlue: {
|
|
|
|
|
value: 4,
|
|
|
|
|
},
|
|
|
|
|
Golden: {
|
|
|
|
|
value: 5,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const premium = {
|
2024-05-13 10:29:40 +00:00
|
|
|
RoyalPurple: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRoyalPurple'),
|
|
|
|
|
limited: true,
|
|
|
|
|
},
|
|
|
|
|
Cupid: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionCupid'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndFebruary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Shimmer: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionShimmer'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndApril'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Fairy: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFairy'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndMay'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Floral: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFloral'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndMay'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Aquatic: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionAquatic'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndFebruary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Ember: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionEmber'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndNovember'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Thunderstorm: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionThunderstorm'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndAugust'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Spooky: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSpooky'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndOctober'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Ghost: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionGhost'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndOctober'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Holly: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionHolly'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndJanuary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Peppermint: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionPeppermint'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndJanuary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
StarryNight: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionStarryNight'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndJanuary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Rainbow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRainbow'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndApril'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Glass: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionGlass'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndJuly'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Glow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionGlow'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndOctober'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Frost: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionFrost'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndNovember'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
IcySnow: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionIcySnow'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndJanuary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
RoseQuartz: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionRoseQuartz'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndFebruary'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Celestial: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionCelestial'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndApril'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Sunshine: {
|
|
|
|
|
value: 2,
|
|
|
|
|
text: t('hatchingPotionSunshine'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndMay'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
2019-05-13 16:02:07 +00:00
|
|
|
Bronze: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('bronze'),
|
2019-06-20 20:13:19 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
Watery: {},
|
2019-08-14 00:16:19 +00:00
|
|
|
Silver: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('silver'),
|
2019-09-26 19:47:26 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
Shadow: {},
|
2019-11-26 21:58:18 +00:00
|
|
|
Amber: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('amber'),
|
2019-12-19 22:54:27 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
Aurora: {},
|
2020-02-13 00:30:54 +00:00
|
|
|
Ruby: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('ruby'),
|
2020-03-17 20:35:38 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
BirchBark: {},
|
2020-06-11 21:38:05 +00:00
|
|
|
Fluorite: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('fluorite'),
|
2020-06-18 18:16:07 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
SandSculpture: {},
|
2020-08-25 21:04:28 +00:00
|
|
|
Windup: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('windup'),
|
|
|
|
|
},
|
2020-09-14 21:05:54 +00:00
|
|
|
Turquoise: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('turquoise'),
|
2020-11-09 21:06:56 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
Vampire: {},
|
|
|
|
|
AutumnLeaf: {},
|
2020-11-16 21:52:06 +00:00
|
|
|
BlackPearl: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('blackPearl'),
|
2021-03-25 20:21:24 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
StainedGlass: {},
|
|
|
|
|
PolkaDot: {},
|
2021-05-18 20:20:23 +00:00
|
|
|
MossyStone: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('stone'),
|
2021-08-17 21:16:28 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
Sunset: {},
|
|
|
|
|
Moonglow: {},
|
2021-08-24 20:42:40 +00:00
|
|
|
SolarSystem: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('solarSystem'),
|
|
|
|
|
},
|
2021-11-23 21:33:47 +00:00
|
|
|
Onyx: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('onyx'),
|
2022-08-15 20:14:23 +00:00
|
|
|
},
|
2024-04-05 03:42:28 +00:00
|
|
|
Porcelain: {},
|
2023-02-13 05:17:56 +00:00
|
|
|
PinkMarble: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('pinkMarble'),
|
2024-01-26 22:35:02 +00:00
|
|
|
},
|
2020-12-22 15:14:00 +00:00
|
|
|
};
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2019-03-25 22:26:38 +00:00
|
|
|
const wacky = {
|
2024-05-13 10:29:40 +00:00
|
|
|
Veggie: {
|
|
|
|
|
text: t('hatchingPotionVeggie'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('eventAvailability', {
|
|
|
|
|
date: t('dateEndApril'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
2020-04-04 00:25:43 +00:00
|
|
|
Dessert: {
|
|
|
|
|
canBuy: hasQuestAchievementFunction('waffle'),
|
|
|
|
|
},
|
2022-04-04 21:29:51 +00:00
|
|
|
VirtualPet: {
|
2022-04-06 18:36:43 +00:00
|
|
|
canBuy: hasQuestAchievementFunction('virtualpet'),
|
2022-04-04 21:29:51 +00:00
|
|
|
},
|
2024-05-13 10:29:40 +00:00
|
|
|
TeaShop: {
|
|
|
|
|
text: t('hatchingPotionTeaShop'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('premiumPotionAddlNotes', {
|
|
|
|
|
date: t('dateEndApril'),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
Fungi: {
|
|
|
|
|
text: t('hatchingPotionFungi'),
|
|
|
|
|
limited: true,
|
|
|
|
|
_addlNotes: t('premiumPotionAddlNotes', {
|
|
|
|
|
date: t('dateEndApril'),
|
|
|
|
|
}),
|
|
|
|
|
canBuy: hasQuestAchievementFunction('fungi'),
|
|
|
|
|
},
|
2019-03-25 22:26:38 +00:00
|
|
|
};
|
|
|
|
|
|
2016-09-10 18:37:10 +00:00
|
|
|
each(drops, (pot, key) => {
|
|
|
|
|
defaults(pot, {
|
|
|
|
|
key,
|
|
|
|
|
value: 2,
|
2024-04-05 03:42:28 +00:00
|
|
|
text: t(`hatchingPotion${key}`),
|
2016-09-10 18:37:10 +00:00
|
|
|
notes: t('hatchingPotionNotes', {
|
2024-04-05 03:42:28 +00:00
|
|
|
potText: t(`hatchingPotion${key}`),
|
2016-09-10 18:37:10 +00:00
|
|
|
}),
|
|
|
|
|
premium: false,
|
|
|
|
|
limited: false,
|
|
|
|
|
canBuy () {
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
each(premium, (pot, key) => {
|
|
|
|
|
defaults(pot, {
|
|
|
|
|
key,
|
|
|
|
|
value: 2,
|
2024-04-05 03:42:28 +00:00
|
|
|
text: t(`hatchingPotion${key}`),
|
2016-09-10 18:37:10 +00:00
|
|
|
notes: t('hatchingPotionNotes', {
|
2024-04-05 03:42:28 +00:00
|
|
|
potText: t(`hatchingPotion${key}`),
|
2020-02-18 09:45:57 +00:00
|
|
|
}),
|
2024-04-05 03:42:28 +00:00
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
2016-09-10 18:37:10 +00:00
|
|
|
premium: true,
|
2024-04-05 03:42:28 +00:00
|
|
|
limited: true,
|
2016-09-10 18:37:10 +00:00
|
|
|
canBuy () {
|
2019-12-19 22:54:27 +00:00
|
|
|
return false;
|
2016-09-10 18:37:10 +00:00
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2019-03-25 22:26:38 +00:00
|
|
|
each(wacky, (pot, key) => {
|
|
|
|
|
defaults(pot, {
|
|
|
|
|
key,
|
|
|
|
|
value: 2,
|
2024-04-05 03:42:28 +00:00
|
|
|
text: t(`hatchingPotion${key}`),
|
2019-03-25 22:26:38 +00:00
|
|
|
notes: t('hatchingPotionNotes', {
|
2024-04-05 03:42:28 +00:00
|
|
|
potText: t(`hatchingPotion${key}`),
|
2019-03-25 22:26:38 +00:00
|
|
|
}),
|
2024-04-05 03:42:28 +00:00
|
|
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
2019-03-25 22:26:38 +00:00
|
|
|
premium: false,
|
|
|
|
|
limited: true,
|
2019-04-04 15:35:22 +00:00
|
|
|
wacky: true,
|
2019-03-25 22:26:38 +00:00
|
|
|
canBuy () {
|
2019-12-19 22:54:27 +00:00
|
|
|
return false;
|
2019-03-25 22:26:38 +00:00
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const all = assign({}, drops, premium, wacky);
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2019-10-01 15:53:48 +00:00
|
|
|
export {
|
2022-02-14 19:55:19 +00:00
|
|
|
drops, premium, wacky, all,
|
2016-09-10 18:37:10 +00:00
|
|
|
};
|