diff --git a/common/locales/en/pets.json b/common/locales/en/pets.json index 528c36ed9e..3d3cc45748 100644 --- a/common/locales/en/pets.json +++ b/common/locales/en/pets.json @@ -1,11 +1,13 @@ { "pets": "Pets", "petsFound": "Pets Found", + "magicPets": "Magic Potion Pets", "rarePets": "Rare Pets", "questPets": "Quest Pets", "mounts": "Mounts", "mountsTamed": "Mounts Tamed", "questMounts": "Quest Mounts", + "magicMounts": "Magic Potion Mounts", "rareMounts": "Rare Mounts", "etherealLion": "Ethereal Lion", "veteranWolf": "Veteran Wolf", diff --git a/common/script/content/index.coffee b/common/script/content/index.coffee index 6d53393b08..b70fff0add 100644 --- a/common/script/content/index.coffee +++ b/common/script/content/index.coffee @@ -1157,7 +1157,7 @@ api.timeTravelStable = 'Mammoth-Base': t('mammoth') 'MantisShrimp-Base': t('mantisShrimp') -api.hatchingPotions = +api.dropHatchingPotions = Base: value: 2, text: t('hatchingPotionBase') White: value: 2, text: t('hatchingPotionWhite') Desert: value: 2, text: t('hatchingPotionDesert') @@ -1168,11 +1168,19 @@ api.hatchingPotions = CottonCandyPink: value: 4, text: t('hatchingPotionCottonCandyPink') CottonCandyBlue: value: 4, text: t('hatchingPotionCottonCandyBlue') Golden: value: 5, text: t('hatchingPotionGolden') + +api.premiumHatchingPotions = Spooky: value: 2, text: t('hatchingPotionSpooky'), addlNotes: t('premiumPotionAddlNotes'), premium: true, limited: true -_.each api.hatchingPotions, (pot,key) -> +_.each api.dropHatchingPotions, (pot,key) -> _.defaults pot, {key, value: 2, notes: t('hatchingPotionNotes', {potText: pot.text}), premium: false, limited: false, canBuy: (()->true)} +_.each api.premiumHatchingPotions, (pot,key) -> + _.defaults pot, {key, value: 2, notes: t('hatchingPotionNotes', {potText: pot.text}), premium: true, limited: false, canBuy: (()->true)} + +api.hatchingPotions = _.merge(api.dropHatchingPotions, api.premiumPotionAddlNotes) + + api.pets = _.transform api.dropEggs, (m, egg) -> _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> if not pot.premium diff --git a/website/views/options/inventory/mounts.jade b/website/views/options/inventory/mounts.jade index 1d3191780f..bbb9e9889d 100644 --- a/website/views/options/inventory/mounts.jade +++ b/website/views/options/inventory/mounts.jade @@ -1,12 +1,12 @@ -mixin mountList(source,showPremium) +mixin mountList(eggSource, potionSource) menu.pets(type='list') - each egg in source + each egg in eggSource -if(!egg.noMount) { li.customize-menu menu - each potion in env.Content.hatchingPotions + each potion in potionSource - mount = egg.key+"-"+potion.key - div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom', ng-hide='#{potion.premium} && #{!showPremium}') + div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom') button(class="pet-button Mount_Head_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")') button(class="pet-button mount-not-owned", ng-if='!user.items.mounts["#{mount}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"] || user.items.pets["#{mount}"])') .PixelPaw @@ -23,10 +23,23 @@ mixin mountList(source,showPremium) p=env.t('mattShall', {name: "{{user.profile.name}}"}) h4 {{:: env.t('stableMountMasterProgress', { number: mountMasterProgress }) }} .row: .col-md-12 - +mountList(env.Content.dropEggs,true) + +mountList(env.Content.dropEggs,env.Content.dropHatchingPotions) + + .row: .col-md-12 + h4=env.t('magicMounts') + menu.pets(type='list') + each potion in env.Content.premiumHatchingPotions + li.customize-menu + menu + each egg in env.Content.dropEggs + - mount = egg.key+"-"+potion.key + div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom') + button(class="pet-button Mount_Head_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")') + button(class="pet-button mount-not-owned", ng-if='!user.items.mounts["#{mount}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"] || user.items.pets["#{mount}"])') + .PixelPaw .row: .col-md-12 h4=env.t('questMounts') - +mountList(env.Content.questEggs) + +mountList(env.Content.questEggs,env.Content.dropHatchingPotions) .row: .col-md-12 h4=env.t('rareMounts') menu diff --git a/website/views/options/inventory/pets.jade b/website/views/options/inventory/pets.jade index 21ba457cdb..898ad529e9 100644 --- a/website/views/options/inventory/pets.jade +++ b/website/views/options/inventory/pets.jade @@ -1,11 +1,11 @@ -mixin petList(source,showPremium) +mixin petList(eggSource, potionSource) menu.pets(type='list') - each egg in source + each egg in eggSource li.customize-menu menu - each potion in env.Content.hatchingPotions + each potion in potionSource - pet = egg.key+"-"+potion.key - div(popover-trigger='mouseenter', popover=env.t('petName', {potion: potion.text(env.language.code), egg: egg.text(env.language.code)}), popover-placement='bottom', ng-hide='#{potion.premium} && #{!showPremium}') + div(popover-trigger='mouseenter', popover=env.t('petName', {potion: potion.text(env.language.code), egg: egg.text(env.language.code)}), popover-placement='bottom') button(class="pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]>0', ng-class='{active: user.items.currentPet == "#{pet}", selectableInventory: #{!egg.noMount} && selectedFood && !user.items.mounts["#{pet}"]}', ng-click='choosePet("#{egg.key}", "#{potion.key}")') .progress(ng-show='!user.items.mounts["#{pet}"]') .progress-bar.progress-bar-success(ng-style='{width: user.items.pets["#{pet}"]/.5 + "%"}') @@ -24,10 +24,25 @@ mixin petList(source,showPremium) p=env.t('mattBochText1') h4 {{:: env.t('stableBeastMasterProgress', { number: beastMasterProgress }) }} .row: .col-md-12 - +petList(env.Content.dropEggs,true) + +petList(env.Content.dropEggs,env.Content.dropHatchingPotions) + .row: .col-md-12 + h4=env.t('magicPets') + menu.pets(type='list') + each potion in env.Content.premiumHatchingPotions + li.customize-menu + menu + each egg in env.Content.dropEggs + - pet = egg.key+"-"+potion.key + div(popover-trigger='mouseenter', popover=env.t('petName', {potion: potion.text(env.language.code), egg: egg.text(env.language.code)}), popover-placement='bottom') + button(class="pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]>0', ng-class='{active: user.items.currentPet == "#{pet}", selectableInventory: #{!egg.noMount} && selectedFood && !user.items.mounts["#{pet}"]}', ng-click='choosePet("#{egg.key}", "#{potion.key}")') + .progress(ng-show='!user.items.mounts["#{pet}"]') + .progress-bar.progress-bar-success(ng-style='{width: user.items.pets["#{pet}"]/.5 + "%"}') + button(class="pet-button pet-not-owned", ng-if='!user.items.pets["#{pet}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"])') + .PixelPaw + button(class="pet-evolved pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]<0') .row: .col-md-12 h4=env.t('questPets') - +petList(env.Content.questEggs) + +petList(env.Content.questEggs,env.Content.dropHatchingPotions) .row: .col-md-12 h4=env.t('rarePets')