WIP(NYE): New Year's cards

This commit is contained in:
Sabe Jones 2014-12-29 20:58:28 -06:00
parent 53fff0dbc6
commit d8cfc1dd4b
4 changed files with 43 additions and 14 deletions

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 -------------------

View file

@ -43,15 +43,12 @@ script(type='text/ng-template', id='partials/options.inventory.seasonalshop.html
p
| {{::quest.value}} 
span.Pet_Currency_Gem1x.inline-gems
mixin buySpecialSpell(k,gp)
menu.pets-menu(label='{{::Content.spells.special.#{k}.text()}}')
div
button.customize-option(popover='{{::Content.spells.special.#{k}.notes()}}', popover-title='{{::Content.spells.special.#{k}.text()}}', popover-trigger='mouseenter', popover-placement='right', 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',true)
//-+buySpecialSpell('spookDust',true)
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')
script(type='text/ng-template', id='partials/options.inventory.timetravelers.html')
.container-fluid
@ -132,12 +129,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}}
@ -146,6 +141,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

View file

@ -27,4 +27,25 @@ 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
div(ng-switch='Math.floor(Math.random()*5)')
p(ng-switch-when='0') Happy New Year! May you slay many a bad Habit.
p(ng-switch-when='1') Happy New Year! May you reap many Rewards.
p(ng-switch-when='2') Happy New Year! May you earn many a Perfect Day.
p(ng-switch-when='3') Happy New Year! May your To-Do list stay short and sweet.
p(ng-switch-default) Happy New Year! May you not get attacked by a raging Hippogriff.
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')

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