mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
feat(pets): Spooky pets/mounts
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
"eggSingular": "egg",
|
||||
"noEggs": "You don't have any eggs.",
|
||||
"hatchingPotions": "Hatching Potions",
|
||||
"magicHatchingPotions": "Magic Hatching Potions",
|
||||
"hatchingPotion": "hatching potion",
|
||||
"noHatchingPotions": "You don't have any hatching potions.",
|
||||
"inventoryText": "Click an egg to see usable potions highlighted in green and then click one of the highlighted potions to hatch your pet. If no potions are highlighted, click that egg again to deselect it, and instead click a potion first to have the usable eggs highlighted. You can also sell unwanted drops to Alexander the Merchant.",
|
||||
|
||||
@@ -1165,16 +1165,21 @@ api.hatchingPotions =
|
||||
CottonCandyPink: value: 4, text: t('hatchingPotionCottonCandyPink')
|
||||
CottonCandyBlue: value: 4, text: t('hatchingPotionCottonCandyBlue')
|
||||
Golden: value: 5, text: t('hatchingPotionGolden')
|
||||
Spooky: value: 3, text: t('hatchingPotionSpooky'), premium: true
|
||||
Spooky: value: 3, text: t('hatchingPotionSpooky'), premium: true, limited: true
|
||||
|
||||
_.each api.hatchingPotions, (pot,key) ->
|
||||
_.defaults pot, {key, value: 2, notes: t('hatchingPotionNotes', {potText: pot.text}), premium: false, canBuy: true}
|
||||
_.defaults pot, {key, value: 2, notes: t('hatchingPotionNotes', {potText: pot.text}), premium: false, limited: false, canBuy: true}
|
||||
|
||||
api.pets = _.transform api.dropEggs, (m, egg) ->
|
||||
_.defaults m, _.transform api.hatchingPotions, (m2, pot) ->
|
||||
if not pot.premium
|
||||
m2[egg.key + "-" + pot.key] = true
|
||||
|
||||
api.premiumPets = _.transform api.dropEggs, (m, egg) ->
|
||||
_.defaults m, _.transform api.hatchingPotions, (m2, pot) ->
|
||||
if pot.premium
|
||||
m2[egg.key + "-" + pot.key] = true
|
||||
|
||||
api.questPets = _.transform api.questEggs, (m, egg) ->
|
||||
_.defaults m, _.transform api.hatchingPotions, (m2, pot) ->
|
||||
if not pot.premium
|
||||
|
||||
@@ -232,10 +232,10 @@ var UserSchema = new Schema({
|
||||
_.defaults(
|
||||
// First transform to a 1D eggs/potions mapping
|
||||
_.transform(shared.content.pets, function(m,v,k){ m[k] = Number; }),
|
||||
// Then add quest pets
|
||||
// Then add additional pets (quest, backer, contributor, premium)
|
||||
_.transform(shared.content.questPets, function(m,v,k){ m[k] = Number; }),
|
||||
// Then add additional pets (backer, contributor)
|
||||
_.transform(shared.content.specialPets, function(m,v,k){ m[k] = Number; })
|
||||
_.transform(shared.content.specialPets, function(m,v,k){ m[k] = Number; }),
|
||||
_.transform(shared.content.premiumPets, function(m,v,k){ m[k] = Number; })
|
||||
),
|
||||
currentPet: String, // Cactus-Desert
|
||||
|
||||
@@ -265,9 +265,10 @@ var UserSchema = new Schema({
|
||||
mounts: _.defaults(
|
||||
// First transform to a 1D eggs/potions mapping
|
||||
_.transform(shared.content.pets, function(m,v,k){ m[k] = Boolean; }),
|
||||
// Then add quest pets
|
||||
// Then add quest and premium pets
|
||||
_.transform(shared.content.questPets, function(m,v,k){ m[k] = Boolean; }),
|
||||
// Then add additional pets (backer, contributor)
|
||||
_.transform(shared.content.premiumPets, function(m,v,k){ m[k] = Boolean; }),
|
||||
// Then add additional mounts (backer, contributor)
|
||||
_.transform(shared.content.specialMounts, function(m,v,k){ m[k] = Boolean; })
|
||||
),
|
||||
currentMount: String,
|
||||
|
||||
@@ -134,7 +134,19 @@
|
||||
li.customize-menu
|
||||
menu.pets-menu(label=env.t('hatchingPotions'))
|
||||
p.muted!=env.t('dropsExplanation')
|
||||
div(ng-repeat='pot in Content.hatchingPotions', ng-if='pot.canBuy')
|
||||
div(ng-repeat='pot in Content.hatchingPotions', ng-if='!pot.premium')
|
||||
button.customize-option(class='Pet_HatchingPotion_{{::pot.key}}',
|
||||
popover='{{::pot.notes()}}', popover-append-to-body='true',
|
||||
popover-title!=env.t("potion", {potionType: "{{::pot.text()}}"}),
|
||||
popover-trigger='mouseenter', popover-placement='top',
|
||||
ng-click='purchase("hatchingPotions", pot)')
|
||||
p
|
||||
| {{::pot.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
|
||||
li.customize-menu
|
||||
menu.pets-menu(label=env.t('magicHatchingPotions'))
|
||||
div(ng-repeat='pot in Content.hatchingPotions', ng-if='pot.premium')
|
||||
button.customize-option(class='Pet_HatchingPotion_{{::pot.key}}',
|
||||
popover='{{::pot.notes()}}', popover-append-to-body='true',
|
||||
popover-title!=env.t("potion", {potionType: "{{::pot.text()}}"}),
|
||||
|
||||
@@ -8,7 +8,7 @@ mixin mountList(source,showPremium)
|
||||
- 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}')
|
||||
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-hide='user.items.mounts["#{mount}"]')
|
||||
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
|
||||
-}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ mixin petList(source,showPremium)
|
||||
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}"]')
|
||||
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')
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
menu.pets-menu(label=env.t('seasonalItems'))
|
||||
div
|
||||
button.customize-option(class='shop_spookDust',
|
||||
button.customize-option(class='inventory_special_spookDust',
|
||||
popover='{{::Content.spells.special.spookDust.notes()}}',
|
||||
popover-title='{{::Content.spells.special.spookDust.text()}}',
|
||||
popover-trigger='mouseenter', popover-placement='right',
|
||||
@@ -41,6 +41,15 @@
|
||||
ng-click='purchase("special", Content.spells.special.spookDust)')
|
||||
p {{::Content.spells.special.spookDust.value}}
|
||||
span(class='shop_gold')
|
||||
div
|
||||
button.customize-option(class='Pet_HatchingPotion_Spooky',
|
||||
popover='{{::Content.hatchingPotions.Spooky.notes()}}',
|
||||
popover-title!=env.t("potion", {potionType: "{{::Content.hatchingPotions.Spooky.text()}}"}),
|
||||
popover-trigger='mouseenter', popover-placement='right',
|
||||
popover-append-to-body='true',
|
||||
ng-click='purchase("hatchingPotions", Content.hatchingPotions.Spooky)')
|
||||
p {{::Content.hatchingPotions.Spooky.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
|
||||
// div
|
||||
button.customize-option(popover='{{::Content.spells.special.nye.notes()}}', popover-title='{{::Content.spells.special.nye.text()}}', popover-trigger='mouseenter', popover-placement='right', popover-append-to-body='true', ng-click='castStart(Content.spells.special.nye)', class='inventory_special_nye')
|
||||
|
||||
Reference in New Issue
Block a user