Merge branch 'sabrecat/potion-quests' into release

This commit is contained in:
Sabe Jones
2019-05-21 14:28:46 -05:00
72 changed files with 8889 additions and 8602 deletions
@@ -5,6 +5,13 @@ import t from './translation';
const CURRENT_SEASON = 'May';
function hasQuestAchievementFunction (key) {
return (user) => {
return user.achievements.quests &&
user.achievements.quests[key] > 0;
};
}
let drops = {
Base: {
value: 2,
@@ -174,6 +181,13 @@ let premium = {
limited: true,
_season: 'May',
},
Bronze: {
value: 2,
text: t('hatchingPotionBronze'),
limited: true,
_season: 'March',
canBuy: hasQuestAchievementFunction('bronze'),
},
};
const wacky = {
+32 -1
View File
@@ -3353,7 +3353,38 @@ let quests = {
unlock: t('questVelociraptorUnlockText'),
},
},
bronze: {
text: t('questBronzeText'),
notes: t('questBronzeNotes'),
completion: t('questBronzeCompletion'),
value: 4,
category: 'pet',
boss: {
name: t('questBronzeBoss'),
hp: 800,
str: 2,
},
drop: {
items: [
{
type: 'hatchingPotions',
key: 'Bronze',
text: t('questBronzeDropBronzePotion'),
}, {
type: 'hatchingPotions',
key: 'Bronze',
text: t('questBronzeDropBronzePotion'),
}, {
type: 'hatchingPotions',
key: 'Bronze',
text: t('questBronzeDropBronzePotion'),
},
],
gp: 63,
exp: 575,
unlock: t('questBronzeUnlockText'),
},
},
};
each(quests, (v, key) => {
+1 -1
View File
@@ -73,7 +73,7 @@ shops.getMarketCategories = function getMarket (user, language) {
notes: i18n.t('premiumPotionNoDropExplanation', language),
};
premiumHatchingPotionsCategory.items = sortBy(values(content.hatchingPotions)
.filter(hp => hp.limited && hp.canBuy())
.filter(hp => hp.limited && hp.canBuy(user))
.map(premiumHatchingPotion => {
return getItemInfo(user, 'premiumHatchingPotion', premiumHatchingPotion, officialPinnedItems, language);
}), 'key');