Merge pull request #4452 from SabreCat/nye

New Year's event features
This commit is contained in:
Sabe Jones
2014-12-30 22:18:11 -06:00
8 changed files with 116 additions and 42 deletions
+11
View File
@@ -0,0 +1,11 @@
db.users.update(
{'gear.owned.head_special_nye':{$ne:null}},
{$set:{'gear.owned.head_special_nye2014':false}},
{multi:1}
)
db.users.update(
{'gear.owned.head_special_nye':null},
{$set:{'gear.owned.head_special_nye':false}},
{multi:1}
)
+1
View File
@@ -87,6 +87,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
}
$scope.purchase = function(type, item){
if (type == 'special') return User.user.ops.buySpecialSpell({params:{key:item.key}});
var gems = User.user.balance * 4;
+3
View File
@@ -195,6 +195,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$scope.castStart = function(spell) {
if (User.user.stats.mp < spell.mana) return Notification.text(window.env.t('notEnoughMana'));
if (spell.key == 'nye' && User.user.stats.gp < spell.value)
return Notification.text('Not enough gold.');
$rootScope.applyingAction = true;
$scope.spell = spell;
if (spell.target == 'self') {
+5 -2
View File
@@ -47,7 +47,8 @@ var UserSchema = new Schema({
perfect: Number,
habitBirthday: Boolean,
valentine: Number,
costumeContest: Boolean
costumeContest: Boolean,
nye: Number
},
auth: {
blocked: Boolean,
@@ -173,7 +174,9 @@ var UserSchema = new Schema({
snowball: {type: Number, 'default': 0},
spookDust: {type: Number, 'default': 0},
valentine: Number,
valentineReceived: Array // array of strings, by sender name
valentineReceived: Array, // array of strings, by sender name
nye: Number,
nyeReceived: Array
},
// -------------- Animals -------------------
+15 -11
View File
@@ -43,6 +43,17 @@ script(type='text/ng-template', id='partials/options.inventory.seasonalshop.html
p
| {{::quest.value}}&nbsp;
span.Pet_Currency_Gem1x.inline-gems
menu.pets-menu(label=env.t('seasonalItems'))
div
button.customize-option(popover='{{::Content.spells.special.snowball.notes()}}', popover-title='{{::Content.spells.special.snowball.text()}}', popover-trigger='mouseenter', popover-placement='right', ng-click='purchase("special", Content.spells.special.snowball)', class='inventory_special_snowball')
p
| {{::Content.spells.special.snowball.value}}
span(class='shop_gold')
div
button.customize-option(popover='{{::Content.spells.special.nye.notes()}}', popover-title='{{::Content.spells.special.nye.text()}}', popover-trigger='mouseenter', popover-placement='right', ng-click='castStart(Content.spells.special.nye)', class='inventory_special_nye')
p
| {{Content.spells.special.nye.value}}
span(class='shop_gold')
script(type='text/ng-template', id='partials/options.inventory.timetravelers.html')
.container-fluid
@@ -123,12 +134,10 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
+specialItem('snowball')
+specialItem('spookDust')
//-menu.pets-menu(label=env.t('valentineCard'))
div(ng-if='user.items.special.valentineReceived[0]')
button.customize-option(popover="Valentine's Day Card from {{User.user.items.special.valentineReceived[0]}}", popover-trigger='mouseenter', popover-placement='right', ng-click='openModal("valentine")', class='inventory_special_valentine')
.badge.badge-info.stack-count {{user.items.special.valentineReceived.length}}
//-menu.pets-menu(label=env.t('subscriberItem'))
div(ng-if='user.purchased.plan.customerId || user.purchased.plan.mysteryItems.length')
button.customize-option(popover=env.t('subscriberItemText'), popover-trigger='mouseenter', popover-placement='right', class='inventory_present', ng-click="user.ops.openMysteryItem({})")
.badge.badge-info.stack-count {{user.purchased.plan.mysteryItems.length}}
@@ -137,6 +146,10 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
button.customize-option(popover=env.t('mysticHourglassPopover'), popover-trigger='mouseenter', popover-placement='right', class='inventory_special_trinket', ng-click="$state.go('options.inventory.timetravelers')")
.badge.badge-info.stack-count {{user.purchased.plan.consecutive.trinkets}}
div(ng-if='user.items.special.nyeReceived[0]')
button.customize-option(popover="New Year's Card from {{User.user.items.special.nyeReceived[0]}}", popover-trigger='mouseenter', popover-placement='right', ng-click='openModal("nye")', class='inventory_special_nye')
.badge.badge-info.stack-count {{user.items.special.nyeReceived.length}}
.col-md-6
h2=env.t('market')
.row-fluid
@@ -203,15 +216,6 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
p
| 4
span.Pet_Currency_Gem1x.inline-gems
mixin buySpecialSpell(k,gp)
div
button.customize-option(popover='{{::Content.spells.special.#{k}.notes()}}', popover-title='{{::Content.spells.special.#{k}.text()}}', popover-trigger='mouseenter', popover-placement='top', ng-click='purchase("special", Content.spells.special.#{k})', class='inventory_special_#{k}')
p
| {{::Content.spells.special.#{k}.value}}
span(class='#{gp ? "shop_gold" : "Pet_Currency_Gem1x inline-gems"}')
//-+buySpecialSpell('snowball',false)
//-+buySpecialSpell('spookDust',true)
div(ng-show='user.flags.rebirthEnabled')
button.customize-option(popover=env.t('rebirthPop'), popover-title=env.t('rebirthName'), popover-trigger='mouseenter', popover-placement='top', ng-click='openModal("rebirth")', class='rebirth_orb')
p(ng-show='user.stats.lvl < 100')
+27 -1
View File
@@ -27,4 +27,30 @@ script(id='modals/valentine.html', type='text/ng-template')
p
small For enduring such a saccharine poem, you both receive the "Adoring Friends" badge!
.modal-footer
button.btn.btn-default(ng-click='user.ops.readValentine({});$close()')=env.t('ok')
button.btn.btn-default(ng-click='user.ops.readValentine({});$close()')=env.t('ok')
// New Year's
script(id='modals/nye.html', type='text/ng-template')
.modal-header
h4
.inventory_special_nye.pull-right
=env.t('nyeCard')
.modal-body
.bg-info(style='padding:10px')
p To: {{user.profile.name}}, From: {{user.items.special.nyeReceived[0]}}
hr
ul.list-unstyled(ng-switch='Math.floor(Math.random()*5)')
li(ng-switch-when='0')
=env.t('newYear0')
li(ng-switch-when='1')
=env.t('newYear1')
li(ng-switch-when='2')
=env.t('newYear2')
li(ng-switch-when='3')
=env.t('newYear3')
li(ng-switch-default)
=env.t('newYear4')
p
small For celebrating the new year together, you both receive the "Auld Acquaintance" badge!
.modal-footer
button.btn.btn-default(ng-click='user.ops.readNYE({});$close()')=env.t('ok')
+48 -28
View File
@@ -1,38 +1,58 @@
h5
h5 NEW YEAR'S EVE CELEBRATION: Party Hats, New Year's Cards, Snowballs, and Last Chance for Penguin Item Set
tr
td
h5 December Subscriber Item Set and Seasonal Shop! Plus, Flagging Posts and Winter Plot-Line Continues
tr
td
h5 December Subscriber Item Set
.promo_mystery_201412.pull-right
p The December Subscriber Item has been revealed: the Penguin Item Set! All December subscribers will receive the Penguin Hat and the Penguin Suit. You still have six days to <a href='https://habitrpg.com/#/options/settings/subscription' target='_blank'>subscribe</a>) and receive the item set! Thank you so much for your support - we really do rely on you to keep HabitRPG free to use and running smoothly.
p.small.muted by Lemoness
tr
td
h5 Seasonal Shop: Seasonal Outfits and Quests
.seasonalshop_winter2015.pull-right
p The <a href='https://habitrpg.com/#/options/inventory/seasonalshop'>Seasonal Shop</a> has opened! The Seasonal Sorceress is stocking the seasonal edition versions of last year's winter outfits, now available for Gems instead of Gold, and the two winter quests, Trapper Santa and Find the Cub. The Seasonal Shop will only be open until January 31st, so don't wait!
p.small.muted by SabreCat and Lemoness
tr
td
h5 Flagging Posts
p You can now report inappropriate posts to moderators simply by clicking the new flag button next to the post. You should only report posts that violate the Community Guidelines and/or Terms of Service. Thanks for helping us to keep Habitica safe and pleasant for everybody!
p.small.muted by Alys, Blade, and Matteo
tr
td
h5 Winter Plot-Line Continues
p SabreCat's news is dire. "Most of my sabertooth friends have been impossible to reach, but one thing is clear: the prides have been disappearing from the Steppes. There are also reports that something drove the mammoths to early migration and disturbed the hibernation of the terrible lizards."
p He wraps his cloak around himself as another blast of frigid wind roars through the streets. An icy winter gale has been blowing from the north, rattling the window panes and setting the pets and mounts to trembling and howling.
p "I've never seen anything like it!" says Matt the Beast Master. "Something is terrifying all my animals - even the cacti, who are normally so mighty and brave! For something to frighten a cactus..." He shakes his head.
p The stress level in Habitica is mounting.
p.small.muted Missed the previous Winter Plot-line? Catch up on the story <a href='http://habitrpg.wikia.com/wiki/Winter_Wonderland#Winter_Mystery_Plot' target='_blank'>here</a>!
p.small.muted by Lemoness
h5 Party Hats
.promo_partyhats.pull-right
p In honor of the new year, some free Party Hats are available in the Rewards store! New users get the ever-handsome Absurd Party Hat, and users who already received one last year get the Silly Party Hat. These hats will be available to purchase until January 31st, but once you've bought them, you'll have them forever. Enjoy!
p.small.muted by Lemoness and SabreCat
tr
td
h5 New Year's Cards (Until Jan 1st Only!)
.inventory_special_nye.pull-right
p Until January 1st only, the <a href='https://habitrpg.com/#/options/inventory/seasonalshop' target='_blank'>Seasonal Shop</a> is stocking New Year's Cards! Now you can send cards to your friends (and yourself) to wish them a Happy Habit New Year. All senders and recipients will receive the Auld Acquaintance badge!
p.small.muted by Lemoness and SabreCat
tr
td
h5 Snowballs
.inventory_special_snowball.pull-right
p The <a href='https://habitrpg.com/#/options/inventory/seasonalshop' target='_blank'>Seasonal Shop</a> is also stocking Snowballs for gold! Throw them at your friends to have an exciting effect. Anyone hit with a snowball earns the Annoying Friends badge. The results of being hit with a Snowball will last until the end of your day, but you can also reverse them early by buying Salt from the Rewards column. Snowballs are available until January 31st.
p.small.muted by Shaner, Lemoness, and SabreCat
tr
td
h5 Last Chance for Penguin Item Set
p Reminder: this is the final day to <a href='https://habitrpg.com/#/options/settings/subscription' target='_blank'>subscribe</a> and receive the Penguin Item Set! If you want the Penguin Hat or the Penguin Suit, now's the time! Thanks so much for your support <3
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h5 12/25/2014 - December Subscriber Item Set and Seasonal Shop! Plus, Flagging Posts and Winter Plot-Line Continues
tr
td
h5 December Subscriber Item Set
.promo_mystery_201412.pull-right
p The December Subscriber Item has been revealed: the Penguin Item Set! All December subscribers will receive the Penguin Hat and the Penguin Suit. You still have six days to <a href='https://habitrpg.com/#/options/settings/subscription' target='_blank'>subscribe</a>) and receive the item set! Thank you so much for your support - we really do rely on you to keep HabitRPG free to use and running smoothly.
p.small.muted by Lemoness
tr
td
h5 Seasonal Shop: Seasonal Outfits and Quests
.seasonalshop_winter2015.pull-right
p The <a href='https://habitrpg.com/#/options/inventory/seasonalshop'>Seasonal Shop</a> has opened! The Seasonal Sorceress is stocking the seasonal edition versions of last year's winter outfits, now available for Gems instead of Gold, and the two winter quests, Trapper Santa and Find the Cub. The Seasonal Shop will only be open until January 31st, so don't wait!
p.small.muted by SabreCat and Lemoness
tr
td
h5 Flagging Posts
p You can now report inappropriate posts to moderators simply by clicking the new flag button next to the post. You should only report posts that violate the Community Guidelines and/or Terms of Service. Thanks for helping us to keep Habitica safe and pleasant for everybody!
p.small.muted by Alys, Blade, and Matteo
tr
td
h5 Winter Plot-Line Continues
p SabreCat's news is dire. "Most of my sabertooth friends have been impossible to reach, but one thing is clear: the prides have been disappearing from the Steppes. There are also reports that something drove the mammoths to early migration and disturbed the hibernation of the terrible lizards."
p He wraps his cloak around himself as another blast of frigid wind roars through the streets. An icy winter gale has been blowing from the north, rattling the window panes and setting the pets and mounts to trembling and howling.
p "I've never seen anything like it!" says Matt the Beast Master. "Something is terrifying all my animals - even the cacti, who are normally so mighty and brave! For something to frighten a cactus..." He shakes his head.
p The stress level in Habitica is mounting.
p.small.muted Missed the previous Winter Plot-line? Catch up on the story <a href='http://habitrpg.wikia.com/wiki/Winter_Wonderland#Winter_Mystery_Plot' target='_blank'>here</a>!
p.small.muted by Lemoness
h5 12/21/2014 - Winter Wonderland Begins, Winter Class Outfits, Wintery Hair Colors, and NPC Decorations!
tr
td
+6
View File
@@ -179,3 +179,9 @@ div(ng-if='::profile.achievements.costumeContest')
=env.t('costumeContestText')
hr
div(ng-if='::profile.achievements.nye')
.achievement.achievement-valentine
h5=env.t('auldAcquaintance')
small
=env.t('auldAcquaintanceText', {cards: "{{::profile.achievements.nye}}"})
hr