mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Merge branch 'winter' into develop
This commit is contained in:
@@ -302,7 +302,7 @@
|
||||
"_commentitemsother" : "OTHER ITEMS",
|
||||
"healthPotionName" : "Health Potion",
|
||||
"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.",
|
||||
"rerollModelHeader" : "Reset Your Tasks",
|
||||
"rerollModelText1" : "Highly discouraged because red tasks provide good incentive to improve",
|
||||
|
||||
@@ -84,7 +84,7 @@ menu.pets div
|
||||
margin-top:1em
|
||||
p
|
||||
text-align:center
|
||||
width:6em
|
||||
//width:6em
|
||||
margin-top:-.5em
|
||||
.hatchingPotion-menu > div
|
||||
display:inline-block
|
||||
|
||||
@@ -166,6 +166,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
||||
$event && ($event.stopPropagation(),$event.preventDefault());
|
||||
if ($scope.spell.target != type) return Notification.text("Invalid 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(){
|
||||
var msg = "You cast " + $scope.spell.text;
|
||||
switch (type) {
|
||||
|
||||
@@ -299,7 +299,8 @@ api.buyGemsPaypalIPN = function(req, res) {
|
||||
api.cast = function(req, res) {
|
||||
var user = res.locals.user;
|
||||
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 err = arguments[0];
|
||||
|
||||
@@ -43,6 +43,7 @@ var UserSchema = new Schema({
|
||||
ultimateGear: Boolean,
|
||||
beastMaster: Boolean,
|
||||
veteran: Boolean,
|
||||
snowball: Number,
|
||||
streak: Number,
|
||||
challenges: Array
|
||||
},
|
||||
@@ -62,9 +63,7 @@ var UserSchema = new Schema({
|
||||
|
||||
backer: {
|
||||
tier: Number,
|
||||
//admin: Boolean, // FIXME migrate to contributor.admin
|
||||
npc: String,
|
||||
//contributor: String, // FIXME migrate to contributor.text
|
||||
tokensApplied: Boolean
|
||||
},
|
||||
|
||||
@@ -82,7 +81,7 @@ var UserSchema = new Schema({
|
||||
ads: {type: Boolean, 'default': false},
|
||||
skin: {type: Schema.Types.Mixed, 'default': {}}, // eg, {skeleton: true, pumpkin: true, eb052b: true}
|
||||
hair: {type: Schema.Types.Mixed, 'default': {}},
|
||||
shirt: {type: Schema.Types.Mixed, 'default': {}}
|
||||
shirt: {type: Schema.Types.Mixed, 'default': {}},
|
||||
},
|
||||
|
||||
flags: {
|
||||
@@ -128,6 +127,10 @@ var UserSchema = new Schema({
|
||||
},
|
||||
},
|
||||
|
||||
special:{
|
||||
snowball: {type: Number, 'default': 0}
|
||||
},
|
||||
|
||||
// -------------- Animals -------------------
|
||||
// Complex bit here. The result looks like:
|
||||
// pets: {
|
||||
@@ -245,7 +248,8 @@ var UserSchema = new Schema({
|
||||
per: Number,
|
||||
con: Number,
|
||||
stealth: Number,
|
||||
streaks: Boolean
|
||||
streaks: Boolean,
|
||||
snowball: Boolean
|
||||
}
|
||||
},
|
||||
tags: [
|
||||
|
||||
@@ -47,6 +47,12 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
||||
.badge.badge-info.stack-count {{points}}
|
||||
//-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
|
||||
h2 Market
|
||||
.row-fluid
|
||||
@@ -94,17 +100,21 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
||||
p
|
||||
| {{food.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
menu.pets-menu(label='Saddle')
|
||||
|
||||
li.customize-menu
|
||||
menu.pets-menu(label='Special')
|
||||
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}}')
|
||||
p
|
||||
| {{Content.food.Saddle.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
|
||||
li.customize-menu
|
||||
menu.pets-menu(label='Services')
|
||||
div
|
||||
// Once grunt-spritesmith is merged, let's use https://github.com/browserquest/BrowserQuest/blob/master/client/img/1/item-firepotion.png
|
||||
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')
|
||||
| Fortify 4
|
||||
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')
|
||||
p
|
||||
| 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
|
||||
|
||||
@@ -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:#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
|
||||
// Bangs
|
||||
li.customize-menu
|
||||
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_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})')
|
||||
@@ -50,7 +59,7 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
|
||||
// Base
|
||||
li.customize-menu
|
||||
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_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})')
|
||||
@@ -67,7 +76,7 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
|
||||
// Beard
|
||||
li.customize-menu
|
||||
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_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")')
|
||||
@@ -75,7 +84,7 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template')
|
||||
// Mustache
|
||||
li.customize-menu
|
||||
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_2_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.mustache.2}', ng-click='unlock("hair.mustache.2")')
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ figure.herobox(ng-click='spell ? castEnd(profile, "user", $event) : clickMember(
|
||||
// Mount Body
|
||||
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
|
||||
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.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_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_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.costume.head}}', ng-if='profile.preferences.costume')
|
||||
|
||||
@@ -12,6 +12,41 @@ div(modal='modals.newStuff')
|
||||
h3.popover-title
|
||||
a(target='_blank', href='https://twitter.com/Mihakuu') Bailey
|
||||
.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...
|
||||
br
|
||||
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>
|
||||
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)
|
||||
small.muted 12/16/2013
|
||||
|
||||
|
||||
hr
|
||||
|
||||
h5 12/7/20132
|
||||
table.table.table-striped
|
||||
|
||||
@@ -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}')
|
||||
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
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user