feat(pets): Peppermint Hatching Potions
Also fixes an issue where the pet hatching modal would appear when the user attempted to hatch a premium version of a quest pet.
84
common/dist/sprites/spritesmith-main-10.css
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
.Pet-Wolf-White {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: 0px 0px;
|
||||
width: 81px;
|
||||
height: 99px;
|
||||
}
|
||||
.Pet-Wolf-Zombie {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -82px 0px;
|
||||
width: 81px;
|
||||
height: 99px;
|
||||
}
|
||||
.Pet_HatchingPotion_Base {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: 0px -100px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_CottonCandyBlue {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -49px -100px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_CottonCandyPink {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -98px -100px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Desert {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -164px 0px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Golden {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -164px -52px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Peppermint {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -213px -104px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Red {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -49px -152px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Shade {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -98px -152px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Skeleton {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -147px -152px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Spooky {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -213px 0px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_White {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: -213px -52px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
.Pet_HatchingPotion_Zombie {
|
||||
background-image: url(spritesmith-main-10.png);
|
||||
background-position: 0px -152px;
|
||||
width: 48px;
|
||||
height: 51px;
|
||||
}
|
||||
BIN
common/dist/sprites/spritesmith-main-10.png
vendored
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
564
common/dist/sprites/spritesmith-main-6.css
vendored
BIN
common/dist/sprites/spritesmith-main-6.png
vendored
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
1306
common/dist/sprites/spritesmith-main-7.css
vendored
BIN
common/dist/sprites/spritesmith-main-7.png
vendored
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 145 KiB |
1876
common/dist/sprites/spritesmith-main-8.css
vendored
BIN
common/dist/sprites/spritesmith-main-8.png
vendored
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 139 KiB |
2486
common/dist/sprites/spritesmith-main-9.css
vendored
BIN
common/dist/sprites/spritesmith-main-9.png
vendored
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -156,6 +156,7 @@
|
||||
"hatchingPotionCottonCandyBlue": "Cotton Candy Blue",
|
||||
"hatchingPotionGolden": "Golden",
|
||||
"hatchingPotionSpooky": "Spooky",
|
||||
"hatchingPotionPeppermint": "Peppermint",
|
||||
|
||||
"hatchingPotionNotes": "Pour this on an egg, and it will hatch as a <%= potText(locale) %> pet.",
|
||||
"premiumPotionAddlNotes": "Not usable on quest pet eggs.",
|
||||
|
||||
@@ -62,5 +62,6 @@
|
||||
"witchyWizardSet": "Witchy Wizard (Mage)",
|
||||
"mummyMedicSet": "Mummy Medic (Healer)",
|
||||
"vampireSmiterSet": "Vampire Smiter (Rogue)",
|
||||
"fallEventAvailability": "Available until October 31"
|
||||
"fallEventAvailability": "Available until October 31",
|
||||
"winterEventAvailability": "Available until December 31"
|
||||
}
|
||||
|
||||
@@ -1030,6 +1030,14 @@ api.premiumHatchingPotions = {
|
||||
canBuy: (function() {
|
||||
return false;
|
||||
})
|
||||
},
|
||||
Peppermint: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionPeppermint'),
|
||||
limited: true,
|
||||
canBuy: (function() {
|
||||
return true;
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -89,17 +89,18 @@ describe('Inventory Controller', function() {
|
||||
});
|
||||
|
||||
it('does not show modal if user tries to hatch a pet they own', function(){
|
||||
user.items.pets['Cactus-Base'] = 5;
|
||||
scope.chooseEgg('Cactus');
|
||||
scope.choosePotion('Base');
|
||||
expect(user.items.eggs).to.eql({Cactus: 0});
|
||||
expect(user.items.hatchingPotions).to.eql({Base: 0});
|
||||
expect(user.items.pets).to.eql({'Cactus-Base': 5});
|
||||
expect(scope.selectedEgg).to.eql(null);
|
||||
expect(scope.selectedPotion).to.eql(null);
|
||||
expect(rootScope.openModal).to.have.been.calledOnce;
|
||||
scope.chooseEgg('Cactus');
|
||||
scope.choosePotion('Base');
|
||||
expect(rootScope.openModal).to.not.have.been.calledTwice;
|
||||
expect(rootScope.openModal).to.not.have.been.called;
|
||||
});
|
||||
|
||||
it('does not show modal if user tries to hatch a premium quest pet', function(){
|
||||
user.items.eggs = {Snake: 1};
|
||||
user.items.hatchingPotions = {Peppermint: 1};
|
||||
scope.chooseEgg('Snake');
|
||||
scope.choosePotion('Peppermint');
|
||||
expect(rootScope.openModal).to.not.have.been.called;
|
||||
});
|
||||
|
||||
it('does not show pet hatching modal if user has opted out', function(){
|
||||
|
||||
@@ -115,11 +115,12 @@ habitrpg.controller("InventoryCtrl",
|
||||
var potName = Content.hatchingPotions[potion.key].text();
|
||||
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
|
||||
|
||||
var userHasPet = user.items.pets[egg.key + '-' + potion.key] > 0;
|
||||
var invalidPet = (user.items.pets[egg.key + '-' + potion.key] > 0) ||
|
||||
(Content.hatchingPotions[potion.key].premium && !Content.dropEggs[egg.key])
|
||||
|
||||
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
|
||||
|
||||
if (!user.preferences.suppressModals.hatchPet && !userHasPet) {
|
||||
if (!user.preferences.suppressModals.hatchPet && !invalidPet) {
|
||||
$scope.hatchedPet = {
|
||||
egg: eggName,
|
||||
potion: potName,
|
||||
|
||||
@@ -136,6 +136,19 @@
|
||||
| {{::pot.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
|
||||
li.customize-menu
|
||||
menu.pets-menu!=env.t('magicHatchingPotions') + " - " + env.t('winterEventAvailability')
|
||||
p.muted=env.t('premiumPotionNoDropExplanation')
|
||||
div(ng-repeat='pot in Content.hatchingPotions', ng-if='pot.premium && pot.canBuy(user)')
|
||||
button.customize-option(class='Pet_HatchingPotion_{{::pot.key}}',
|
||||
popover='{{::pot.notes()}} {{::pot.addlNotes()}}', 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('food'))
|
||||
p.muted!=env.t('dropsExplanation')
|
||||
|
||||
@@ -1,39 +1,55 @@
|
||||
h2 12/1/2015 - DECEMBER ARMOIRE ITEMS, BACKGROUNDS, MYSTERY BOX, AND GAYMERX ARMOR!
|
||||
h2 12/7/2015 - PEPPERMINT PETS AND PUSH TASK TO BOTTOM!
|
||||
hr
|
||||
tr
|
||||
td
|
||||
.weapon_armoire_blueLongbow.pull-right
|
||||
h3 December Armoire Items
|
||||
p There is new equipment in Enchanted Armoire, a 100 GP Reward in the Rewards Column which unlocks after you've attained Ultimate Gear!
|
||||
.Pet-Wolf-Peppermint.pull-right
|
||||
h3 Peppermint Magic Hatching Potions
|
||||
p A new Magic Hatching Potion is available!
|
||||
br
|
||||
p Click on the Enchanted Armoire for a random chance at special Equipment, including the Crystal Crescent Set and the Blue Longbow! It may also give you random XP or food items. We'll be adding new equipment to it during the first week of each month, but even when you've exhausted the current supply, you can keep clicking for a chance at food and XP.
|
||||
p Between now and December 31st, you can buy Peppermint Hatching Potions from <a href='/#/options/inventory/drops'>the Market</a> and use them to hatch any standard pet egg. (Magic Hatching Potions do not work on Quest Pet eggs.) You'll find it very easy to care for your new Peppermint Pets: they love to eat every kind of food!
|
||||
br
|
||||
p Now go spend all that accumulated Gold! May the Random Number Generator smile upon you...
|
||||
p.small.muted by Lemoness and SabreCat
|
||||
p.small.muted Art by starsystemic, Fandekasp, and nonight
|
||||
tr
|
||||
td
|
||||
.background_winter_town.pull-right
|
||||
h3 December Backgrounds
|
||||
p There are three new avatar backgrounds in the <a href='/#/options/profile/backgrounds'>Background Shop!</a> Now your avatar can ski on the Alpine Slopes, gaze at the Snowy Sunrise, or bustle through a Winter Town!
|
||||
p.small.muted by Karithina, Inventrix, and Midori88
|
||||
tr
|
||||
td
|
||||
.inventory_present_12.pull-right
|
||||
h3 December Mystery Box
|
||||
p Ooh... What could it be? All Habiticans who are <a href='/#/options/settings/subscription'>subscribed</a> during the month of December will receive the 2015 December Mystery Item Set! It will be revealed on the 23rd, so keep your eyes peeled. Thanks for supporting the site <3
|
||||
p Peppermint Hatching Potions are a Seasonal Edition item, so they will only be available during this time each year! Be sure to get them while you can.
|
||||
p.small.muted by Lemoness
|
||||
tr
|
||||
td
|
||||
.head_special_gaymerx.pull-right
|
||||
h3 GaymerX Armor
|
||||
p In honor of Habitica's partnership with the GaymerX3 Conference (December 11-13, in downtown San Jose), the Rainbow Warrior set is available once again from the Rewards column! It will only be available until December 14th, so be sure to get it now. Plus, the Unconventional Armor set will be available at the conference, so don't forget to pick up a promo card if you attend!
|
||||
h3 Push Task to Bottom
|
||||
p Now you can easily push a task to the bottom of a list! Hold the Control or Command key, and the Push Task to Top icon will switch to a Push Task to Bottom icon. Click that and down goes the task!
|
||||
p.small.muted by TheHollidayInn
|
||||
|
||||
if menuItem !== 'oldNews'
|
||||
hr
|
||||
a(href='/static/old-news', target='_blank') Read older news
|
||||
|
||||
mixin oldNews
|
||||
h2 12/1/2015 - DECEMBER ARMOIRE ITEMS, BACKGROUNDS, MYSTERY BOX, AND GAYMERX ARMOR!
|
||||
tr
|
||||
td
|
||||
.weapon_armoire_blueLongbow.pull-right
|
||||
h3 December Armoire Items
|
||||
p There is new equipment in Enchanted Armoire, a 100 GP Reward in the Rewards Column which unlocks after you've attained Ultimate Gear!
|
||||
br
|
||||
p Click on the Enchanted Armoire for a random chance at special Equipment, including the Crystal Crescent Set and the Blue Longbow! It may also give you random XP or food items. We'll be adding new equipment to it during the first week of each month, but even when you've exhausted the current supply, you can keep clicking for a chance at food and XP.
|
||||
br
|
||||
p Now go spend all that accumulated Gold! May the Random Number Generator smile upon you...
|
||||
p.small.muted by Lemoness and SabreCat
|
||||
p.small.muted Art by starsystemic, Fandekasp, and nonight
|
||||
tr
|
||||
td
|
||||
.background_winter_town.pull-right
|
||||
h3 December Backgrounds
|
||||
p There are three new avatar backgrounds in the <a href='/#/options/profile/backgrounds'>Background Shop!</a> Now your avatar can ski on the Alpine Slopes, gaze at the Snowy Sunrise, or bustle through a Winter Town!
|
||||
p.small.muted by Karithina, Inventrix, and Midori88
|
||||
tr
|
||||
td
|
||||
.inventory_present_12.pull-right
|
||||
h3 December Mystery Box
|
||||
p Ooh... What could it be? All Habiticans who are <a href='/#/options/settings/subscription'>subscribed</a> during the month of December will receive the 2015 December Mystery Item Set! It will be revealed on the 23rd, so keep your eyes peeled. Thanks for supporting the site <3
|
||||
p.small.muted by Lemoness
|
||||
tr
|
||||
td
|
||||
.head_special_gaymerx.pull-right
|
||||
h3 GaymerX Armor
|
||||
p In honor of Habitica's partnership with the GaymerX3 Conference (December 11-13, in downtown San Jose), the Rainbow Warrior set is available once again from the Rewards column! It will only be available until December 14th, so be sure to get it now. Plus, the Unconventional Armor set will be available at the conference, so don't forget to pick up a promo card if you attend!
|
||||
h2 11/25/2015 - HABITICA THANKSGIVING! NOVEMBER SUBSCRIBER ITEM AND TURKEY PETS AND MOUNTS
|
||||
tr
|
||||
td
|
||||
|
||||