diff --git a/public/img/hatching_powder.png b/public/img/hatching_powder.png new file mode 100644 index 0000000000..34db3dc933 Binary files /dev/null and b/public/img/hatching_powder.png differ diff --git a/public/img/sprites/PetEggs.css b/public/img/sprites/PetEggs.css index c81fa53424..c8db9170f9 100644 --- a/public/img/sprites/PetEggs.css +++ b/public/img/sprites/PetEggs.css @@ -1,10 +1,13 @@ -Pet_Egg_Wolf, Pet_Egg_Tiger, Pet_Egg_PolarBear, Pet_Egg_Panda, Pet_Egg_Lion, Pet_Egg_FlyingPig, Pet_Egg_Drake, Pet_Egg_Cactus, Pet_Egg_Bear {background: url(Egg_Sprite_Sheet.png) no-repeat} -Pet_Egg_Wolf {background-position: 0 0; width: 48px; height: 51px} -Pet_Egg_Tiger {background-position: 0 -51; width: 48px; height: 51px} -Pet_Egg_PolarBear{background-position: 0 -102; width: 48px; height: 51px} -Pet_Egg_Panda {background-position: 0 -153; width: 48px; height: 51px} -Pet_Egg_Lion {background-position: 0 -204; width: 48px; height: 51px} -Pet_Egg_FlyingPig {background-position: 0 -255; width: 48px; height: 51px} -Pet_Egg_Drake {background-position: 0 -306; width: 48px; height: 51px} -Pet_Egg_Cactus {background-position: 0 -357; width: 48px; height: 51px} -Pet_Egg_Bear {background-position: 0 -408; width: 48px; height: 51px} \ No newline at end of file +.Pet_Egg_Wolf, .Pet_Egg_TigerCub, .Pet_Egg_PolarBear, .Pet_Egg_PandaCub, .Pet_Egg_LionCub, .Pet_Egg_FlyingPig, .Pet_Egg_Dragon, .Pet_Egg_Cactus, .Pet_Egg_BearCub, .Pet_Egg_Fox {background: url("/img/sprites/Egg_Sprite_Sheet.png") no-repeat} +.Pet_Egg_Wolf {background-position: 0px 0px; width: 48px; height: 51px} +.Pet_Egg_TigerCub {background-position: 0px -51px; width: 48px; height: 51px} +.Pet_Egg_PolarBear {background-position: 0px -102px; width: 48px; height: 51px} +.Pet_Egg_PandaCub {background-position: 0px -153px; width: 48px; height: 51px} +.Pet_Egg_LionCub {background-position: 0px -204px; width: 48px; height: 51px} +.Pet_Egg_FlyingPig {background-position: 0px -255px; width: 48px; height: 51px} +.Pet_Egg_Dragon {background-position: 0px -306px; width: 48px; height: 51px} +.Pet_Egg_Cactus {background-position: 0px -357px; width: 48px; height: 51px} +.Pet_Egg_BearCub {background-position: 0px -408px; width: 48px; height: 51px} + +/* these not designed yet? */ +.Pet_Egg_Fox {background-position: 0px -408px; width: 48px; height: 51px} \ No newline at end of file diff --git a/src/app/items.coffee b/src/app/items.coffee index b2f77cf3bd..9af3ce0d6a 100644 --- a/src/app/items.coffee +++ b/src/app/items.coffee @@ -66,6 +66,9 @@ 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 Powder to sprinkle on this egg, and one day it will hatch into a loyal pet.' +_.each items.food, (food) -> food.notes = "Sprinkle this on an egg, and it will hatch as a #{food.text} pet." + ### view exports ### diff --git a/src/app/scoring.coffee b/src/app/scoring.coffee index f264b75253..af09fb6459 100644 --- a/src/app/scoring.coffee +++ b/src/app/scoring.coffee @@ -121,10 +121,12 @@ score = (model, taskId, direction, times, batch, cron) -> drop = randomVal(food) user.push 'items.food', drop.text drop.type = 'Food' + drop.dialog = "You've found #{drop.text} Hatching Powder! #{drop.notes}" else drop = randomVal(pets) user.push 'items.eggs', drop drop.type = 'Egg' + drop.dialog = "You've found a #{drop.text} Egg! #{drop.notes}" model.set '_drop', drop $('#item-dropped-modal').modal 'show' diff --git a/styles/app/index.styl b/styles/app/index.styl index 20031b95a0..396a5b7593 100644 --- a/styles/app/index.styl +++ b/styles/app/index.styl @@ -8,6 +8,7 @@ @import "./items.styl"; @import "./alerts.styl"; @import "../../public/img/sprites/pet_sprites.css"; +@import "../../public/img/sprites/PetEggs.css"; @import "./helpers.styl"; @import "./responsive.styl"; @import "./header.styl"; diff --git a/styles/app/items.styl b/styles/app/items.styl index dc8700d359..c6bddc2eff 100644 --- a/styles/app/items.styl +++ b/styles/app/items.styl @@ -81,4 +81,15 @@ outline: 1px solid rgba(0,0,0,0.1) outline-offset: -1px &:hover, &:focus - background-color: darken($better, 10%) \ No newline at end of file + background-color: darken($better, 10%) + + +.item-drop-icon + float:left + padding-right:20px + padding-bottom:20px + +.Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Veteran, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_SugarCube, .Pet_Food_Strawberry, .Pet_Food_Rotten, .Pet_Food_Licorice, .Pet_Food_Golden, .Pet_Food_Cream, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Chocolate, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base + background: url("/img/hatching_powder.png") no-repeat + width:34px + height:34px \ No newline at end of file diff --git a/views/app/pets.html b/views/app/pets.html index 9644c86c93..6d4bf7b49e 100644 --- a/views/app/pets.html +++ b/views/app/pets.html @@ -1,4 +1,5 @@ +

You've unlocked the drop system.

Here's your first egg! {_user.items.eggs.0.text}

@@ -7,11 +8,11 @@
- -

An item has dropped!

-

Here's your {_drop.type} – {_drop.text}!

-
-

{_drop.notes}

+ + +

{_drop.dialog}

+ + <@footer>