diff --git a/src/app/items.coffee b/src/app/items.coffee index 35412f9e03..b1a6b67ad3 100644 --- a/src/app/items.coffee +++ b/src/app/items.coffee @@ -67,8 +67,8 @@ items = module.exports.items = _.each ['weapon', 'armor', 'head', 'shield'], (key) -> _.each items[key], (item) -> item.type = key -_.each items.pets, (pet) -> pet.notes = 'Find some Hatching Potion to sprinkle on this egg, and one day it will hatch into a loyal pet.' -_.each items.hatchingPotions, (hatchingPotion) -> hatchingPotion.notes = "Sprinkle this on an egg, and it will hatch as a #{hatchingPotion.text} pet." +_.each items.pets, (pet) -> pet.notes = 'Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet.' +_.each items.hatchingPotions, (hatchingPotion) -> hatchingPotion.notes = "Pour this on an egg, and it will hatch as a #{hatchingPotion.text} pet." ### view exports diff --git a/src/app/pets.coffee b/src/app/pets.coffee index 892357f676..93d11d703e 100644 --- a/src/app/pets.coffee +++ b/src/app/pets.coffee @@ -43,7 +43,7 @@ module.exports.app = (appExports, model) -> eggs.splice eggIdx, 1 myHatchingPotion.splice hatchingPotionIdx, 1 user.set 'items.eggs', eggs - user.set 'items.hatchingPotions', myHatching Potion + user.set 'items.hatchingPotions', myHatchingPotion alert 'Your egg hatched! Visit your stable to equip your pet.' @@ -65,9 +65,9 @@ module.exports.app = (appExports, model) -> appExports.buyHatchingPotion = (e, el) -> name = $(el).attr 'data-hatchingPotion' - newHatchingPotion = _.findWhere hatchingPotion, name: name + newHatchingPotion = _.findWhere hatchingPotions, name: name tokens = user.get('balance') * 4 - if tokens > newHatching Potion.value + if tokens > newHatchingPotion.value if confirm "Buy this hatching potion with #{newHatchingPotion.value} of your #{tokens} tokens?" user.push 'items.hatchingPotions', newHatchingPotion.name user.set 'balance', (tokens - newHatchingPotion.value) / 4 diff --git a/views/app/pets.html b/views/app/pets.html index 5d5d03a791..939f4da6d1 100644 --- a/views/app/pets.html +++ b/views/app/pets.html @@ -38,10 +38,10 @@
  • - {#if not(_user.items.eggs)} -

    You don't have any eggs yet.

    - {/if} + {#if not(_user.items.eggs)} +

    You don't have any eggs yet.

    + {/if} {#each _user.items.eggs as :egg}
    @@ -51,10 +51,10 @@
  • - {#if not(_user.items.hatchingPotions)} -

    You don't have any hatching potions yet.

    - {/if} - + + {#if not(_user.items.hatchingPotions)} +

    You don't have any hatching potions yet.

    + {/if} {#each _user.items.hatchingPotions as :hatchingPotion}
    @@ -71,7 +71,7 @@ {#if not(_user.items.hatchingPotions)}

    You don't have any hatching potions yet.

    {else} -

    What would you like to sprinkle on your {_hatchEgg.text} egg?

    +

    Which hatching potion will you pour on your {_hatchEgg.text} egg?