feat(event): New Year's 2016

This commit is contained in:
Sabe Jones
2016-12-30 22:19:29 +00:00
parent 2a1f52a359
commit 969607cd3b
70 changed files with 7695 additions and 7534 deletions

View File

@@ -0,0 +1,73 @@
var migrationName = '20161230_nye_hats.js';
var authorName = 'Sabe'; // in case script author needs to know when their ...
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
/*
* Yearly New Year's party hat award
*/
var mongo = require('mongoskin');
var connectionString = 'mongodb://localhost:27017/habitrpg?auto_reconnect=true'; // FOR TEST DATABASE
var dbUsers = mongo.db(connectionString).collection('users');
// specify a query to limit the affected users (empty for all users):
var query = {
'migration':{$ne:migrationName},
'auth.timestamps.loggedin':{$gt:new Date('2016-11-30')} // Remove after first run
};
// specify fields we are interested in to limit retrieved data (empty if we're not reading data):
var fields = {
'items.gear.owned': 1,
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
setTimeout(displayData, 300000);
return;
}
count++;
// specify user data to change:
var set = {};
if (typeof user.items.gear.owned.head_special_nye2015 !== 'undefined') {
set = {'migration':migrationName, 'items.gear.owned.head_special_nye2016':false};
} else if (typeof user.items.gear.owned.head_special_nye2014 !== 'undefined') {
set = {'migration':migrationName, 'items.gear.owned.head_special_nye2015':false};
} else if (typeof user.items.gear.owned.head_special_nye !== 'undefined') {
set = {'migration':migrationName, 'items.gear.owned.head_special_nye2014':false};
} else {
set = {'migration':migrationName, 'items.gear.owned.head_special_nye':false};
}
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 136 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 144 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 155 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

@@ -1,108 +1,150 @@
.Pet-Wolf-Shade {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Skeleton {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -246px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Spooky {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -82px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Thunderstorm {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -164px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Veteran {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-White {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -82px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Zombie {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -164px -100px;
width: 81px;
height: 99px;
}
.Pet_HatchingPotion_Base { .Pet_HatchingPotion_Base {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px 0px; background-position: -246px -100px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_CottonCandyBlue { .Pet_HatchingPotion_CottonCandyBlue {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px -104px; background-position: 0px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_CottonCandyPink { .Pet_HatchingPotion_CottonCandyPink {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px 0px; background-position: -49px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Desert { .Pet_HatchingPotion_Desert {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -52px; background-position: -98px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Floral { .Pet_HatchingPotion_Floral {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px -52px; background-position: -147px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Ghost { .Pet_HatchingPotion_Ghost {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px -52px; background-position: -328px -208px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Golden { .Pet_HatchingPotion_Golden {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -147px 0px; background-position: -245px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Holly { .Pet_HatchingPotion_Holly {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -147px -52px; background-position: 0px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Peppermint { .Pet_HatchingPotion_Peppermint {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -104px; background-position: -49px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Purple { .Pet_HatchingPotion_Purple {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px 0px; background-position: -98px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Red { .Pet_HatchingPotion_Red {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px -104px; background-position: -147px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_RoyalPurple { .Pet_HatchingPotion_RoyalPurple {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -147px -104px; background-position: -196px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Shade { .Pet_HatchingPotion_Shade {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -196px 0px; background-position: -245px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Skeleton { .Pet_HatchingPotion_Skeleton {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -196px -52px; background-position: -328px 0px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Spooky { .Pet_HatchingPotion_Spooky {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -196px -104px; background-position: -328px -52px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Thunderstorm { .Pet_HatchingPotion_Thunderstorm {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -156px; background-position: -328px -104px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_White { .Pet_HatchingPotion_White {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px -156px; background-position: -328px -156px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Zombie { .Pet_HatchingPotion_Zombie {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px -156px; background-position: -196px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 337 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 261 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -288,7 +288,8 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
} }
$rootScope.purchase = function(type, item){ $rootScope.purchase = function(type, item){
if (type == 'special') return User.buySpecialSpell({params:{key:item.key}}); if (type === 'special') return User.buySpecialSpell({params:{key:item.key}});
if (type === 'card') return $scope.castStart(Content.spells.special[item.key]);
var gems = user.balance * 4; var gems = user.balance * 4;
var price = item.value; var price = item.value;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,108 +1,150 @@
.Pet-Wolf-Shade {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Skeleton {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -246px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Spooky {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -82px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Thunderstorm {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -164px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Veteran {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-White {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -82px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Zombie {
background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -164px -100px;
width: 81px;
height: 99px;
}
.Pet_HatchingPotion_Base { .Pet_HatchingPotion_Base {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px 0px; background-position: -246px -100px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_CottonCandyBlue { .Pet_HatchingPotion_CottonCandyBlue {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px -104px; background-position: 0px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_CottonCandyPink { .Pet_HatchingPotion_CottonCandyPink {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px 0px; background-position: -49px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Desert { .Pet_HatchingPotion_Desert {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -52px; background-position: -98px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Floral { .Pet_HatchingPotion_Floral {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px -52px; background-position: -147px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Ghost { .Pet_HatchingPotion_Ghost {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px -52px; background-position: -328px -208px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Golden { .Pet_HatchingPotion_Golden {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -147px 0px; background-position: -245px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Holly { .Pet_HatchingPotion_Holly {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -147px -52px; background-position: 0px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Peppermint { .Pet_HatchingPotion_Peppermint {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -104px; background-position: -49px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Purple { .Pet_HatchingPotion_Purple {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px 0px; background-position: -98px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Red { .Pet_HatchingPotion_Red {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px -104px; background-position: -147px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_RoyalPurple { .Pet_HatchingPotion_RoyalPurple {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -147px -104px; background-position: -196px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Shade { .Pet_HatchingPotion_Shade {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -196px 0px; background-position: -245px -252px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Skeleton { .Pet_HatchingPotion_Skeleton {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -196px -52px; background-position: -328px 0px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Spooky { .Pet_HatchingPotion_Spooky {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -196px -104px; background-position: -328px -52px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Thunderstorm { .Pet_HatchingPotion_Thunderstorm {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: 0px -156px; background-position: -328px -104px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_White { .Pet_HatchingPotion_White {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -49px -156px; background-position: -328px -156px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }
.Pet_HatchingPotion_Zombie { .Pet_HatchingPotion_Zombie {
background-image: url(/static/sprites/spritesmith-main-16.png); background-image: url(/static/sprites/spritesmith-main-16.png);
background-position: -98px -156px; background-position: -196px -200px;
width: 48px; width: 48px;
height: 51px; height: 51px;
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -739,6 +739,8 @@
"headSpecialFall2016HealerText": "Medusa's Crown", "headSpecialFall2016HealerText": "Medusa's Crown",
"headSpecialFall2016HealerNotes": "Woe to anyone who looks you in the eyes... Increases Intelligence by <%= int %>. Limited Edition 2016 Autumn Gear.", "headSpecialFall2016HealerNotes": "Woe to anyone who looks you in the eyes... Increases Intelligence by <%= int %>. Limited Edition 2016 Autumn Gear.",
"headSpecialNye2016Text": "Whimsical Party Hat",
"headSpecialNye2016Notes": "You've received a Whimsical Party Hat! Wear it with pride while ringing in the New Year! Confers no benefit.",
"headSpecialWinter2017RogueText": "Frosty Helm", "headSpecialWinter2017RogueText": "Frosty Helm",
"headSpecialWinter2017RogueNotes": "Fashioned from ice crystals, this helm will help you move unnoticed through wintry landscapes. Increases Perception by <%= per %>. Limited Edition 2016-2017 Winter Gear.", "headSpecialWinter2017RogueNotes": "Fashioned from ice crystals, this helm will help you move unnoticed through wintry landscapes. Increases Perception by <%= per %>. Limited Edition 2016-2017 Winter Gear.",
"headSpecialWinter2017WarriorText": "Hockey Helm", "headSpecialWinter2017WarriorText": "Hockey Helm",

View File

@@ -677,10 +677,11 @@ let head = {
canOwn: ownsItem('head_special_lunarWarriorHelm'), canOwn: ownsItem('head_special_lunarWarriorHelm'),
}, },
nye: { nye: {
event: EVENTS.winter2016, event: EVENTS.nye,
text: t('headSpecialNyeText'), text: t('headSpecialNyeText'),
notes: t('headSpecialNyeNotes'), notes: t('headSpecialNyeNotes'),
value: 0, value: 0,
canOwn: ownsItem('head_special_nye'),
}, },
yeti: { yeti: {
event: EVENTS.winter, event: EVENTS.winter,
@@ -1152,6 +1153,12 @@ let head = {
value: 60, value: 60,
int: 7, int: 7,
}, },
nye2016: {
text: t('headSpecialNye2016Text'),
notes: t('headSpecialNye2016Notes'),
value: 0,
canOwn: ownsItem('head_special_nye2016'),
},
}; };
let headAccessory = { let headAccessory = {

View File

@@ -233,6 +233,11 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
}; };
const AVAILABLE_SPELLS = [ const AVAILABLE_SPELLS = [
'snowball',
];
const AVAILABLE_CARDS = [
'nye',
]; ];
const AVAILABLE_QUESTS = [ const AVAILABLE_QUESTS = [
@@ -248,7 +253,11 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
return _.indexOf(AVAILABLE_SPELLS, key) !== -1; return _.indexOf(AVAILABLE_SPELLS, key) !== -1;
}); });
if (_.keys(spells).length > 0) { let cards = pickBy(content.cardTypes, (card, key) => {
return _.indexOf(AVAILABLE_CARDS, key) !== -1;
});
if (_.keys(spells).length > 0 || _.keys(cards).length > 0) {
let category = { let category = {
identifier: 'spells', identifier: 'spells',
text: i18n.t('seasonalItems', language), text: i18n.t('seasonalItems', language),
@@ -264,8 +273,21 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
currency: 'gold', currency: 'gold',
locked: false, locked: false,
purchaseType: 'spells', purchaseType: 'spells',
class: `inventory_special_${key}`,
}; };
}); }).concat(_.map(cards, (card, key) => {
return {
key,
text: content.spells.special[key].text(language),
notes: content.spells.special[key].notes(language),
value: content.spells.special[key].value,
type: 'card',
currency: 'gold',
locked: false,
purchaseType: 'spells',
class: `inventory_special_${key}`,
};
}));
categories.push(category); categories.push(category);
} }
@@ -323,6 +345,7 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
locked: false, locked: false,
currency: 'gems', currency: 'gems',
purchaseType: 'gear', purchaseType: 'gear',
class: `shop_${gear.key}`,
}; };
}).value(); }).value();
if (category.items.length > 0) { if (category.items.length > 0) {

View File

@@ -78,6 +78,8 @@ function _setUpNewUser (user) {
let iterableFlags = user.flags.toObject(); let iterableFlags = user.flags.toObject();
user._ABtest = ''; user._ABtest = '';
user.migration = '20161230_nye_hats.js';
user.items.gear.owned.head_special_nye = false;
// A/B test 2016-12-21: Should we deliver notifications for upcoming incentives on days when users don't receive rewards? // A/B test 2016-12-21: Should we deliver notifications for upcoming incentives on days when users don't receive rewards?
if (Math.random() < 0.5) { if (Math.random() < 0.5) {
user._ABtests.checkInModals = '20161221_noCheckInPreviews'; // no 'preview' check-in modals user._ABtests.checkInModals = '20161221_noCheckInPreviews'; // no 'preview' check-in modals

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -11,7 +11,7 @@
li.customize-menu.inventory-gear li.customize-menu.inventory-gear
menu.pets-menu(label='{{category.text}}', ng-repeat='category in seasonalShopCategories') menu.pets-menu(label='{{category.text}}', ng-repeat='category in seasonalShopCategories')
div(ng-repeat='item in category.items', ng-if='!user.items.gear.owned[item.key]') div(ng-repeat='item in category.items', ng-if='!user.items.gear.owned[item.key]')
button.customize-option(class='{{item.class}} shop_{{item.key}}', button.customize-option(class='{{item.class}}',
popover='{{item.notes}}', popover-title='{{item.text}}', popover='{{item.notes}}', popover-title='{{item.text}}',
popover-trigger='mouseenter', popover-placement='right', popover-trigger='mouseenter', popover-placement='right',
popover-append-to-body='true', popover-append-to-body='true',

View File

@@ -1,5 +1,40 @@
h2 12/28/2016 - BEHIND THE SCENES BLOG POST AND QUEST AWARDS BUG FIXED h2 12/30/2016 - NEW YEAR'S EVE CELEBRATION: PARTY HATS, NEW YEAR'S CARDS, SNOWBALLS, AND LAST CHANCE FOR NUTCRACKER SET
hr hr
tr
td
.seasonalshop_open.pull-right
h3 Party Hats
p In honor of the new year, some free Party Hats are available in the Rewards store! Each year you celebrate New Year's with Habitica, you unlock a new hat. Enjoy, and stay tuned for the matching robes in late January during our annual Habitica Birthday Bash!
p.small.muted by Lemoness and SabreCat
tr
td
.inventory_special_nye.pull-left.slight-right-margin
h3 New Year's Cards (Until Jan 1st Only!)
p Until January 1st only, the <a href='/#/options/inventory/seasonalshop'>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
.inventory_special_snowball.pull-right
h3 Snowballs
p The <a href='/#/options/inventory/seasonalshop'>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 and Lemoness
tr
td
h3 Last Chance for Nutcracker Armor
p Reminder: the 31st is the final day to <a href='/#/options/settings/subscription'>subscribe</a> and receive the Nutcracker Armor Set! Subscribing also lets you buy gems for gold. The longer your subscription, the more gems you get!
br
p If you'd like to share the subscription love, don't forget that right now we're holding a special promotion where if you gift a subscription to a friend, you then earn a free subscription for yourself. Spread the love <3
br
p Thanks so much for your support! You help keep Habitica running.
p.small.muted by Lemoness
.promo_mystery_201612.center-block
if menuItem !== 'oldNews'
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h2 12/28/2016 - BEHIND THE SCENES BLOG POST AND QUEST AWARDS BUG FIXED
tr tr
td td
h3 Blog Post: How We Work h3 Blog Post: How We Work
@@ -10,12 +45,6 @@ h2 12/28/2016 - BEHIND THE SCENES BLOG POST AND QUEST AWARDS BUG FIXED
h3 Quest Bug Fixed h3 Quest Bug Fixed
p The Exponential Quest Reward Scrolls issue has been fixed! Now when a quest in a quest line is completed, only the quest owner will receive the next quest in the series, rather than everyone in the party receiving exponentially increasing versions of the latter scrolls. That being said, if you were already granted scrolls from that, you'll get to keep them as a fun bonus. p The Exponential Quest Reward Scrolls issue has been fixed! Now when a quest in a quest line is completed, only the quest owner will receive the next quest in the series, rather than everyone in the party receiving exponentially increasing versions of the latter scrolls. That being said, if you were already granted scrolls from that, you'll get to keep them as a fun bonus.
p.small.muted by Hus274 p.small.muted by Hus274
if menuItem !== 'oldNews'
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h2 12/21/2016 - DECEMBER SUBSCRIBER ITEMS, EQUIPMENT SEARCH, TASK EDIT CHANGES, AND GROUP PLANS! h2 12/21/2016 - DECEMBER SUBSCRIBER ITEMS, EQUIPMENT SEARCH, TASK EDIT CHANGES, AND GROUP PLANS!
tr tr
td td