Merge branch 'winter' into develop

This commit is contained in:
Tyler Renelle
2013-12-20 21:59:54 -07:00
10 changed files with 144 additions and 59 deletions

View File

@@ -302,7 +302,7 @@
"_commentitemsother" : "OTHER ITEMS", "_commentitemsother" : "OTHER ITEMS",
"healthPotionName" : "Health Potion", "healthPotionName" : "Health Potion",
"healthPotionNotes" : "Recover 15 HP Instantly", "healthPotionNotes" : "Recover 15 HP Instantly",
"rerollName" : "Fortify", "rerollName" : "Fortify Potion",
"rerollNotes" : "Resets your task values back to yellow. Useful when everything's red and it's hard to stay alive.", "rerollNotes" : "Resets your task values back to yellow. Useful when everything's red and it's hard to stay alive.",
"rerollModelHeader" : "Reset Your Tasks", "rerollModelHeader" : "Reset Your Tasks",
"rerollModelText1" : "Highly discouraged because red tasks provide good incentive to improve", "rerollModelText1" : "Highly discouraged because red tasks provide good incentive to improve",

View File

@@ -84,7 +84,7 @@ menu.pets div
margin-top:1em margin-top:1em
p p
text-align:center text-align:center
width:6em //width:6em
margin-top:-.5em margin-top:-.5em
.hatchingPotion-menu > div .hatchingPotion-menu > div
display:inline-block display:inline-block

View File

@@ -166,6 +166,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$event && ($event.stopPropagation(),$event.preventDefault()); $event && ($event.stopPropagation(),$event.preventDefault());
if ($scope.spell.target != type) return Notification.text("Invalid target"); if ($scope.spell.target != type) return Notification.text("Invalid target");
$scope.spell.cast(User.user, target); $scope.spell.cast(User.user, target);
User.save();
$http.post('/api/v2/user/class/cast/' + $scope.spell.name, {target:target, type:type}).success(function(){ $http.post('/api/v2/user/class/cast/' + $scope.spell.name, {target:target, type:type}).success(function(){
var msg = "You cast " + $scope.spell.text; var msg = "You cast " + $scope.spell.text;
switch (type) { switch (type) {

View File

@@ -299,7 +299,8 @@ api.buyGemsPaypalIPN = function(req, res) {
api.cast = function(req, res) { api.cast = function(req, res) {
var user = res.locals.user; var user = res.locals.user;
var type = req.body.type, target = req.body.target; var type = req.body.type, target = req.body.target;
var spell = shared.content.spells[user.stats.class][req.params.spell]; var klass = shared.content.spells.special[req.params.spell] ? 'special' : user.stats.class
var spell = shared.content.spells[klass][req.params.spell];
var done = function(){ var done = function(){
var err = arguments[0]; var err = arguments[0];

View File

@@ -43,6 +43,7 @@ var UserSchema = new Schema({
ultimateGear: Boolean, ultimateGear: Boolean,
beastMaster: Boolean, beastMaster: Boolean,
veteran: Boolean, veteran: Boolean,
snowball: Number,
streak: Number, streak: Number,
challenges: Array challenges: Array
}, },
@@ -62,9 +63,7 @@ var UserSchema = new Schema({
backer: { backer: {
tier: Number, tier: Number,
//admin: Boolean, // FIXME migrate to contributor.admin
npc: String, npc: String,
//contributor: String, // FIXME migrate to contributor.text
tokensApplied: Boolean tokensApplied: Boolean
}, },
@@ -82,7 +81,7 @@ var UserSchema = new Schema({
ads: {type: Boolean, 'default': false}, ads: {type: Boolean, 'default': false},
skin: {type: Schema.Types.Mixed, 'default': {}}, // eg, {skeleton: true, pumpkin: true, eb052b: true} skin: {type: Schema.Types.Mixed, 'default': {}}, // eg, {skeleton: true, pumpkin: true, eb052b: true}
hair: {type: Schema.Types.Mixed, 'default': {}}, hair: {type: Schema.Types.Mixed, 'default': {}},
shirt: {type: Schema.Types.Mixed, 'default': {}} shirt: {type: Schema.Types.Mixed, 'default': {}},
}, },
flags: { flags: {
@@ -128,6 +127,10 @@ var UserSchema = new Schema({
}, },
}, },
special:{
snowball: {type: Number, 'default': 0}
},
// -------------- Animals ------------------- // -------------- Animals -------------------
// Complex bit here. The result looks like: // Complex bit here. The result looks like:
// pets: { // pets: {
@@ -245,7 +248,8 @@ var UserSchema = new Schema({
per: Number, per: Number,
con: Number, con: Number,
stealth: Number, stealth: Number,
streaks: Boolean streaks: Boolean,
snowball: Boolean
} }
}, },
tags: [ tags: [

View File

@@ -47,6 +47,12 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
.badge.badge-info.stack-count {{points}} .badge.badge-info.stack-count {{points}}
//-p {{food}} //-p {{food}}
li.customize-menu(ng-if='user.items.special.snowball')
menu.pets-menu(label='Special')
div
button.customize-option(popover='{{Content.special.snowball.notes}}', popover-title='{{Content.special.snowball.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='castStart(Content.special.snowball)', class='inventory_special_snowball')
.badge.badge-info.stack-count {{user.items.special.snowball}}
.span6 .span6
h2 Market h2 Market
.row-fluid .row-fluid
@@ -94,17 +100,21 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
p p
| {{food.value}} | {{food.value}}
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems
menu.pets-menu(label='Saddle')
li.customize-menu
menu.pets-menu(label='Special')
div div
button.customize-option(popover='{{Content.food.Saddle.notes}}', popover-title='{{Content.food.Saddle.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("food", Content.food.Saddle)', class='Pet_Food_{{Content.food.Saddle.name}}') button.customize-option(popover='{{Content.food.Saddle.notes}}', popover-title='{{Content.food.Saddle.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("food", Content.food.Saddle)', class='Pet_Food_{{Content.food.Saddle.name}}')
p p
| {{Content.food.Saddle.value}} | {{Content.food.Saddle.value}}
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems
li.customize-menu
menu.pets-menu(label='Services')
div div
// Once grunt-spritesmith is merged, let's use https://github.com/browserquest/BrowserQuest/blob/master/client/img/1/item-firepotion.png button.customize-option(popover='Return all tasks to neutral value (yellow color), and restore all lost Health.', popover-title=env.t('rerollName'), popover-trigger='mouseenter', popover-placement='left', ng-click='modals.reroll = true', class='inventory_special_fortify')
button.btn(popover='Return all tasks to neutral value (yellow color), and restore all lost Health.', popover-title=env.t('rerollName'), popover-trigger='mouseenter', popover-placement='left', ng-click='modals.reroll = true') p
| Fortify 4 | 4
span.Pet_Currency_Gem1x.inline-gems
div
button.customize-option(popover='{{Content.spells.special.snowball.notes}}', popover-title='{{Content.spells.special.snowball.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("special", Content.spells.special.snowball)', class='inventory_special_snowball')
p
| {{Content.spells.special.snowball.value}}
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems

View File

@@ -37,12 +37,21 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
button(type='button', class='customize-option', style='width: 40px; height: 40px; background-color:#ec720f;', ng-click='set({"preferences.hair.color": "red" })') button(type='button', class='customize-option', style='width: 40px; height: 40px; background-color:#ec720f;', ng-click='set({"preferences.hair.color": "red" })')
button(type='button', class='customize-option', style='width: 40px; height: 40px; background-color:#2e2e2e;', ng-click='set({"preferences.hair.color": "black"})') button(type='button', class='customize-option', style='width: 40px; height: 40px; background-color:#2e2e2e;', ng-click='set({"preferences.hair.color": "black"})')
// Special Events
li.customize-menu.well.limited-edition
.label.label-info.pull-right(popover='Available for purchase until January 31st (but permanently in your options if purchased).', popover-title='Limited Edition', popover-placement='right', popover-trigger='mouseenter')
| Limited Edition 
i.icon.icon-question-sign
menu(label='Winter Colors')
each color in ['candycane','frost','winternight','holly']
button(type='button', ng-class='{locked: !user.purchased.hair.color.#{color}}', class='customize-option hair_bangs_1_#{color}', style='width: 40px; height: 40px;', ng-click='unlock("hair.color.#{color}")')
button.btn.btn-small.btn-primary(ng-hide='user.purchased.hair.color.candycane && user.purchased.hair.color.frost && user.purchased.hair.color.winternight && user.purchased.hair.color.holly', ng-click='unlock("hair.color.candycane,hair.color.frost,hair.color.winternight,hair.color.holly")') Unlock Set - 5<span class="Pet_Currency_Gem1x inline-gems"/>
h5 Hair h5 Hair
// Bangs // Bangs
li.customize-menu li.customize-menu
menu(label='Bangs') menu(label='Bangs')
button(class='head_base_0 customize-option', type='button', ng-click='set({"preferences.hair.bangs":0})') button(class='head_0 customize-option', type='button', ng-click='set({"preferences.hair.bangs":0})')
button(class='hair_bangs_1_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":1})') button(class='hair_bangs_1_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":1})')
button(class='hair_bangs_2_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":2})') button(class='hair_bangs_2_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":2})')
button(class='hair_bangs_3_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":3})') button(class='hair_bangs_3_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":3})')
@@ -50,7 +59,7 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
// Base // Base
li.customize-menu li.customize-menu
menu(label='Base') menu(label='Base')
button(class='head_base_0 customize-option', type='button', ng-click='set({"preferences.hair.base":0})') button(class='head_0 customize-option', type='button', ng-click='set({"preferences.hair.base":0})')
button(class='hair_base_1_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.base":1})') button(class='hair_base_1_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.base":1})')
button(class='hair_base_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.base.2}', ng-click='unlock("hair.base.2")') button(class='hair_base_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.base.2}', ng-click='unlock("hair.base.2")')
button(class='hair_base_3_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.base":3})') button(class='hair_base_3_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.base":3})')
@@ -67,7 +76,7 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
// Beard // Beard
li.customize-menu li.customize-menu
menu(label='Beard') menu(label='Beard')
button(class='head_base_0 customize-option', type='button', ng-click='set({"preferences.hair.beard":0})') button(class='head_0 customize-option', type='button', ng-click='set({"preferences.hair.beard":0})')
button(class='hair_beard_1_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.beard.1}', ng-click='unlock("hair.beard.1")') button(class='hair_beard_1_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.beard.1}', ng-click='unlock("hair.beard.1")')
button(class='hair_beard_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.beard.2}', ng-click='unlock("hair.beard.2")') button(class='hair_beard_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.beard.2}', ng-click='unlock("hair.beard.2")')
button(class='hair_beard_3_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.beard.3}', ng-click='unlock("hair.beard.3")') button(class='hair_beard_3_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.beard.3}', ng-click='unlock("hair.beard.3")')
@@ -75,7 +84,7 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
// Mustache // Mustache
li.customize-menu li.customize-menu
menu(label='Mustache') menu(label='Mustache')
button(class='head_base_0 customize-option', type='button', ng-click='set({"preferences.hair.mustache":0})') button(class='head_0 customize-option', type='button', ng-click='set({"preferences.hair.mustache":0})')
button(class='hair_mustache_1_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.mustache.1}', ng-click='unlock("hair.mustache.1")') button(class='hair_mustache_1_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.mustache.1}', ng-click='unlock("hair.mustache.1")')
button(class='hair_mustache_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.mustache.2}', ng-click='unlock("hair.mustache.2")') button(class='hair_mustache_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.mustache.2}', ng-click='unlock("hair.mustache.2")')

View File

@@ -8,6 +8,9 @@ figure.herobox(ng-click='spell ? castEnd(profile, "user", $event) : clickMember(
// Mount Body // Mount Body
span(ng-if='profile.items.currentMount', class='Mount_Body_{{profile.items.currentMount}}') span(ng-if='profile.items.currentMount', class='Mount_Body_{{profile.items.currentMount}}')
span(ng-if='profile.stats.buffs.snowball')
span.snowman
span(ng-if='!profile.stats.buffs.snowball')
// Avatar // Avatar
span(class='skin_{{profile.preferences.skin}}') span(class='skin_{{profile.preferences.skin}}')
@@ -15,12 +18,12 @@ figure.herobox(ng-click='spell ? castEnd(profile, "user", $event) : clickMember(
span(class='{{profile.preferences.size}}_{{profile.items.gear.equipped.armor}}', ng-if='!profile.preferences.costume') span(class='{{profile.preferences.size}}_{{profile.items.gear.equipped.armor}}', ng-if='!profile.preferences.costume')
span(class='{{profile.preferences.size}}_{{profile.items.gear.costume.armor}}', ng-if='profile.preferences.costume') span(class='{{profile.preferences.size}}_{{profile.items.gear.costume.armor}}', ng-if='profile.preferences.costume')
span(class='head_base_0') span(class='head_0')
span(class='hair_base_{{profile.preferences.hair.base}}_{{profile.preferences.hair.color}}') span(class='hair_base_{{profile.preferences.hair.base}}_{{profile.preferences.hair.color}}')
span(class='hair_bangs_{{profile.preferences.hair.bangs}}_{{profile.preferences.hair.color}}') span(class='hair_bangs_{{profile.preferences.hair.bangs}}_{{profile.preferences.hair.color}}')
span(class='hair_beard_{{profile.preferences.hair.beard}}_{{profile.preferences.hair.color}}')
span(class='hair_mustache_{{profile.preferences.hair.mustache}}_{{profile.preferences.hair.color}}') span(class='hair_mustache_{{profile.preferences.hair.mustache}}_{{profile.preferences.hair.color}}')
span(class='hair_beard_{{profile.preferences.hair.beard}}_{{profile.preferences.hair.color}}')
span(class='{{profile.items.gear.equipped.head}}', ng-if='!profile.preferences.costume') span(class='{{profile.items.gear.equipped.head}}', ng-if='!profile.preferences.costume')
span(class='{{profile.items.gear.costume.head}}', ng-if='profile.preferences.costume') span(class='{{profile.items.gear.costume.head}}', ng-if='profile.preferences.costume')

View File

@@ -12,6 +12,41 @@ div(modal='modals.newStuff')
h3.popover-title h3.popover-title
a(target='_blank', href='https://twitter.com/Mihakuu') Bailey a(target='_blank', href='https://twitter.com/Mihakuu') Bailey
.popover-content .popover-content
h4 Winter Wonderland Event!
p It's time for HabitRPG's biggest event yet - Winter Wonderland! The fun starts today, on the first day of winter, and ends on January 31st - HabitRPG's birthday.
p Get prepared to build new habits, earn fun drops, hold your party members accountable for their tasks, and decorate your avatar. Various features will be rolling out over the course of the event, so expect many updates! For starters...
table.table.table-striped
tr
td
h4 NPC Decorations
p Looks like everyone is really getting into the winter spirit! Check out the new NPC sprites. (And I heard a rumor that the final NPC might show up, just in time for the new year...)
tr
td
.customize-option.hair_bangs_1_winternight.pull-right
h4 Limited-Edition Holiday Hair-Colors
p Now your avatar can dye their hair Candy Cane, Frost, Winter Sky, or Holly! You'll only be able to purchase these hair colors until January 31st, when they will be retired.
tr
td
.shop_snowball.pull-right
h4 The Great HabitRPG Snowball Fight
p Yes, you can now buy snowballs and hurl them at all your friends... to, uh, help them improve their habits. How? Weeeeellll, let's just say that after getting walloped, they might find themselves needing some extra gold to escape their predicament...
//-span.shop_head_special_candycane.item-img.shop-sprite
tr
td
h4 More to Come
p A beast is roaring in the distant mountains, mysterious tracks have appeared in the snow, and Lemoness is furiously crocheting something sparkly.
p It's going to be a wild winter.
hr
p By @lemoness
small.muted 12/20/2013
hr
h5 12/16/2013
p Good gracious, where do I start... p Good gracious, where do I start...
br br
table.table.table-striped table.table.table-striped
@@ -37,10 +72,6 @@ div(modal='modals.newStuff')
p The API has been completely overhauled, and v2 comes with many more routes for a *full featured* API. v1 is no longer supported, take heed ye 3rd-party-ists! For the time being, basic routes are supported (such as up/down -scoring). v2 will be documented soon, and I'll ping you when. see <a href='https://trello.com/c/L4pYimQM/343-api-v2' target='_blank'>APIv2</a> p The API has been completely overhauled, and v2 comes with many more routes for a *full featured* API. v1 is no longer supported, take heed ye 3rd-party-ists! For the time being, basic routes are supported (such as up/down -scoring). v2 will be documented soon, and I'll ping you when. see <a href='https://trello.com/c/L4pYimQM/343-api-v2' target='_blank'>APIv2</a>
hr hr
p By @lemoness @sabrecat @danielthebard @fuzzytrees @crystalphoenix @rosemonkeyct @fandekasp, and many more. (Who am I missing? We'll put up a CONTRIBUTORS.md soon) p By @lemoness @sabrecat @danielthebard @fuzzytrees @crystalphoenix @rosemonkeyct @fandekasp, and many more. (Who am I missing? We'll put up a CONTRIBUTORS.md soon)
small.muted 12/16/2013
hr
h5 12/7/20132 h5 12/7/20132
table.table.table-striped table.table.table-striped

View File

@@ -60,6 +60,32 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
span(bo-class='{"shop_{{item.key}} shop-sprite item-img": true}') span(bo-class='{"shop_{{item.key}} shop-sprite item-img": true}')
p.task-text {{item.text}} p.task-text {{item.text}}
// Winter Event
ul.items.rewards(ng-if='main && list.type=="reward" && (user.items.special.snowball>0 || user.stats.buffs.snowball)')
li.task.reward-item(ng-if='user.items.special.snowball>0')
.task-meta-controls
span.task-notes(popover-trigger='mouseenter', popover-placement='left', popover='{{Content.spells.special.snowball.notes}}', popover-title='{{Content.spells.special.snowball.text}}')
i.icon-comment
//left-hand size commands
.task-controls
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.snowball)')
span.reward-cost {{user.items.special.snowball}}
span.shop_snowball(style='display:inline-block;vertical-align:top;')
// main content
p.task-text {{Content.spells.special.snowball.text}}
li.task.reward-item(ng-if='user.stats.buffs.snowball')
.task-meta-controls
span.task-notes(popover-trigger='mouseenter', popover-placement='left', popover='{{Content.spells.special.salt.notes}}', popover-title='{{Content.spells.special.salt.text}}')
i.icon-comment
//left-hand size commands
.task-controls
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.salt)')
span.reward-cost {{Content.spells.special.salt.value}}
span.shop_gold
// main content
span.shop_salt.shop-sprite.item-img
p.task-text {{Content.spells.special.salt.text}}
// Spells // Spells
ul.items(ng-if='main && list.type=="reward" && user.stats.class && !user.preferences.disableClasses') ul.items(ng-if='main && list.type=="reward" && user.stats.class && !user.preferences.disableClasses')
li.task.reward-item(ng-repeat='(k,spell) in Content.spells[user.stats.class]', ng-show='user.stats.lvl >= spell.lvl') li.task.reward-item(ng-repeat='(k,spell) in Content.spells[user.stats.class]', ng-show='user.stats.lvl >= spell.lvl')