feat(event): Turkey Day 2017
and (content) November Subscriber Items
128
migrations/20171117_turkey_ladder.js
Normal file
@@ -0,0 +1,128 @@
|
||||
var migrationName = '20171117_turkey_ladder.js';
|
||||
var authorName = 'Sabe'; // in case script author needs to know when their ...
|
||||
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
|
||||
|
||||
/*
|
||||
* Award the Turkey Day ladder:
|
||||
* Grant Turkey Costume to those who have the Gilded Turkey mount
|
||||
* Grant Gilded Turkey mount to those who have the Gilded Turkey pet
|
||||
* Grant Gilded Turkey pet to those who have the Base Turkey mount
|
||||
* Grant Base Turkey mount to those who have the Base Turkey pet
|
||||
* Grant Base Turkey pet to those who have none of the above yet
|
||||
*/
|
||||
|
||||
var monk = require('monk');
|
||||
var connectionString = 'mongodb://localhost:27017/habitrpg?auto_reconnect=true'; // FOR TEST DATABASE
|
||||
var dbUsers = monk(connectionString).get('users', { castIds: false });
|
||||
|
||||
function processUsers(lastId) {
|
||||
// specify a query to limit the affected users (empty for all users):
|
||||
var query = {
|
||||
'migration':{$ne:migrationName},
|
||||
'auth.timestamps.loggedin':{$gt:new Date('2017-11-01')},
|
||||
};
|
||||
|
||||
if (lastId) {
|
||||
query._id = {
|
||||
$gt: lastId
|
||||
}
|
||||
}
|
||||
|
||||
dbUsers.find(query, {
|
||||
sort: {_id: 1},
|
||||
limit: 250,
|
||||
fields: [
|
||||
'items.pets',
|
||||
'items.mounts',
|
||||
] // specify fields we are interested in to limit retrieved data (empty if we're not reading data):
|
||||
})
|
||||
.then(updateUsers)
|
||||
.catch(function (err) {
|
||||
console.log(err);
|
||||
return exiting(1, 'ERROR! ' + err);
|
||||
});
|
||||
}
|
||||
|
||||
var progressCount = 1000;
|
||||
var count = 0;
|
||||
|
||||
function updateUsers (users) {
|
||||
if (!users || users.length === 0) {
|
||||
console.warn('All appropriate users found and modified.');
|
||||
displayData();
|
||||
return;
|
||||
}
|
||||
|
||||
var userPromises = users.map(updateUser);
|
||||
var lastUser = users[users.length - 1];
|
||||
|
||||
return Promise.all(userPromises)
|
||||
.then(function () {
|
||||
processUsers(lastUser._id);
|
||||
});
|
||||
}
|
||||
|
||||
function updateUser (user) {
|
||||
count++;
|
||||
|
||||
var set = {};
|
||||
|
||||
if (user && user.items && user.items.mounts && user.items.mounts['Turkey-Gilded']) {
|
||||
set = {
|
||||
migration: migrationName,
|
||||
'items.gear.owned.head_special_turkeyHelmBase': false,
|
||||
'items.gear.owned.armor_special_turkeyArmorBase': false,
|
||||
'items.gear.owned.back_special_turkeyTailBase': false,
|
||||
};
|
||||
var push = [
|
||||
{
|
||||
type: 'marketGear',
|
||||
path: 'gear.flat.head_special_turkeyHelmBase',
|
||||
_id: monk.id(),
|
||||
},
|
||||
{
|
||||
type: 'marketGear',
|
||||
path: 'gear.flat.armor_special_turkeyArmorBase',
|
||||
_id: monk.id(),
|
||||
},
|
||||
{
|
||||
type: 'marketGear',
|
||||
path: 'gear.flat.back_special_turkeyTailBase',
|
||||
_id: monk.id(),
|
||||
},
|
||||
];
|
||||
} else if (user && user.items && user.items.pets && user.items.pets['Turkey-Gilded']) {
|
||||
set = {'migration':migrationName, 'items.mounts.Turkey-Gilded':true};
|
||||
} else if (user && user.items && user.items.mounts && user.items.mounts['Turkey-Base']) {
|
||||
set = {'migration':migrationName, 'items.pets.Turkey-Gilded':5};
|
||||
} else if (user && user.items && user.items.pets && user.items.pets['Turkey-Base']) {
|
||||
set = {'migration':migrationName, 'items.mounts.Turkey-Base':true};
|
||||
} else {
|
||||
set = {'migration':migrationName, 'items.pets.Turkey-Base':5};
|
||||
}
|
||||
|
||||
dbUsers.update({_id: user._id}, {$set: set});
|
||||
if (push) {
|
||||
dbUsers.update({_id: user._id}, {$push: {pinnedItems: {$each: push}}});
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
module.exports = processUsers;
|
||||
@@ -2,7 +2,7 @@ var _id = '';
|
||||
var update = {
|
||||
$addToSet: {
|
||||
'purchased.plan.mysteryItems':{
|
||||
$each:['armor_mystery_201710','head_mystery_201710']
|
||||
$each:['armor_mystery_201711','body_mystery_201711']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
website/client/assets/images/npc/thanksgiving/quest_shop_npc.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 12 KiB |
BIN
website/client/assets/images/npc/thanksgiving/tavern_npc.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
@@ -1,9 +1,9 @@
|
||||
// this variables are used to determine which shop npc/backgrounds should be loaded
|
||||
// possible values are: normal, fall, habitoween
|
||||
// possible values are: normal, fall, habitoween, thanksgiving
|
||||
// more to be added on future seasons
|
||||
|
||||
$npc_market_flavor: 'normal';
|
||||
$npc_quests_flavor: 'normal';
|
||||
$npc_seasonal_flavor: 'normal';
|
||||
$npc_market_flavor: 'thanksgiving';
|
||||
$npc_quests_flavor: 'thanksgiving';
|
||||
$npc_seasonal_flavor: 'thanksgiving';
|
||||
$npc_timetravelers_flavor: 'normal';
|
||||
$npc_tavern_flavor: 'normal';
|
||||
$npc_tavern_flavor: 'thanksgiving';
|
||||
|
||||
@@ -4,23 +4,34 @@
|
||||
.align-self-center.right-margin(:class='baileyClass')
|
||||
.media-body
|
||||
h1.align-self-center(v-markdown='$t("newStuff")')
|
||||
h2 11/14/2017 - NEW PET QUEST, BEHIND THE SCENES, AND FEATURED WIKI ARTICLE
|
||||
h2 11/17/2017 - THANKSGIVING IN HABITICA, NOVEMBER SUBSCRIBER ITEMS, AND ANDROID UPDATE
|
||||
hr
|
||||
h3 New Pet Quest: A Tangled Yarn
|
||||
p(v-markdown='"Wayward yarn from unfinished craft projects is spreading confusion through the Taskan countryside! Can you wrap up this tangled mess? Get the latest pet quest, [A Tangled Yarn](/shops/quests), and earn some woolen Yarn pets by completing your real-life tasks."')
|
||||
.media
|
||||
.promo_turkey_day_2017.right-margin
|
||||
.media-body.d-flex.align-self-center.flex-column
|
||||
h3 Happy Thanksgiving!
|
||||
p It's Thanksgiving in Habitica! On this day Habiticans celebrate by spending time with loved ones, giving thanks, and riding their glorious turkeys into the magnificent sunset. Some of the NPCs are celebrating the occasion!
|
||||
h3 Turkey Pets, Mounts, and Costume!
|
||||
p For the occasion, all Habiticans have received Turkey-themed items! What items? It all depends on how many Habitica Thanksgivings you've celebrated with us. Each Thanksgiving, you'll get a new and exciting Turkey pet, mount, or gear set! Check your Stable and your pinned Rewards to see what you got!
|
||||
p Thank you for using Habitica - we really love you all <3
|
||||
.small by Lemoness
|
||||
.media
|
||||
.media-body
|
||||
.small by SabreCat, Faelwyn the Rising Phoenix, Bartelmy, Arcosine, stefalupagus, khdarkwolf, JinjooHat, basekick, Hacheiseiko, TheMushroomKing and Vampitch
|
||||
h3 Behind the Scenes: Tips for Burnout Prevention and Recovery from the Habitica Team!
|
||||
p(v-markdown='"There\'s a new [Behind the Scenes post](https://habitica.wordpress.com/2017/11/14/behind-the-scenes-tips-for-burnout-prevention-and-recovery-from-the-habitica-team/) on the Habitica blog in which the team shares their tips for preventing burnout and bouncing back when it happens! Check it out for great ideas for self-care and recuperation!"')
|
||||
.small by Beffymaroo
|
||||
.quest_burnout
|
||||
.media
|
||||
.scene_habit_cycle
|
||||
.media-body
|
||||
h3 Blog Post: The Habit Loop
|
||||
p(v-markdown='"This month\'s [featured Wiki article](https://habitica.wordpress.com/2017/11/08/the-habit-loop/) is about The Habit Loop! We hope that it will help you as you work on building better, stronger, and healthier Habits. Be sure to check it out, and let us know what you think by reaching out on [Twitter](https://twitter.com/habitica), [Tumblr](http://blog.habitrpg.com/), and [Facebook](https://www.facebook.com/Habitica/)."')
|
||||
.small by Beffymaroo and the Wiki Wizards
|
||||
h3 November Subscriber Items Revealed!
|
||||
p(v-markdown='"The November Subscriber Items have been revealed: the [Carpet Rider Item Set](https://habitica.com/user/settings/subscription)! You have until November 30 to receive the item set when you subscribe. If you\'re already an active subscriber, reload the site and then head to Inventory > Items to claim your gear!"')
|
||||
p Subscribers also receive the ability to buy gems for gold -- the longer you subscribe, the more gems you can buy per month! There are other perks as well, such as longer access to uncompressed data and a cute Jackalope pet. Best of all, subscriptions let us keep Habitica running. Thank you very much for your support -- it means a lot to us.
|
||||
.small by Lemoness
|
||||
.promo_mystery_201711.left-margin
|
||||
h3 Android App Update
|
||||
p There’s an exciting new update to our Android app!
|
||||
ul
|
||||
li We’ve smashed some pesky bugs, including the issue with task reordering!
|
||||
li You can now view and assign attribute points (or choose auto-allocation)!
|
||||
li We’ve added Equipment to the Market, plus the ability to change your login name and email, reset or delete your account, make changes to your profile, and access Fix Character Values.
|
||||
li You can also request a password reset from the login screen!
|
||||
p We hope this makes your Habitica experience even better. Be sure to download the update now for a better Habitica experience!
|
||||
p If you like the improvements that we’ve been making to our app, please consider reviewing this new version. It really helps us out!
|
||||
.small by Viirus and piyorii
|
||||
br
|
||||
</template>
|
||||
|
||||
|
||||
@@ -419,6 +419,8 @@
|
||||
"armorSpecialDandySuitNotes": "You're undeniably dressed for success! Increases Perception by <%= per %>.",
|
||||
"armorSpecialSamuraiArmorText": "Samurai Armor",
|
||||
"armorSpecialSamuraiArmorNotes": "This strong, scaled armor is held together by elegant silk cords. Increases Perception by <%= per %>.",
|
||||
"armorSpecialTurkeyArmorBaseText": "Turkey Armor",
|
||||
"armorSpecialTurkeyArmorBaseNotes": "Keep your drumsticks warm and cozy in this feathery armor! Confers no benefit.",
|
||||
|
||||
"armorSpecialYetiText": "Yeti-Tamer Robe",
|
||||
"armorSpecialYetiNotes": "Fuzzy and fierce. Increases Constitution by <%= con %>. Limited Edition 2013-2014 Winter Gear.",
|
||||
@@ -633,6 +635,8 @@
|
||||
"armorMystery201707Notes": "This armor will help you blend in with the creatures of the ocean while you pursue undersea quests and adventures. Confers no benefit. July 2017 Subscriber Item.",
|
||||
"armorMystery201710Text": "Imperious Imp Apparel",
|
||||
"armorMystery201710Notes": "Scaly, shiny, and strong! Confers no benefit. October 2017 Subscriber Item.",
|
||||
"armorMystery201711Text": "Carpet Rider Outfit",
|
||||
"armorMystery201711Notes": "This cozy sweater set will help keep you warm as you ride through the sky! Confers no benefit. November 2017 Subscriber Item.",
|
||||
"armorMystery301404Text": "Steampunk Suit",
|
||||
"armorMystery301404Notes": "Dapper and dashing, wot! Confers no benefit. February 3015 Subscriber Item.",
|
||||
"armorMystery301703Text": "Steampunk Peacock Gown",
|
||||
@@ -795,6 +799,8 @@
|
||||
"headSpecialKabutoNotes": "This helm is functional and beautiful! Your enemies will become distracted admiring it. Increases Intelligence by <%= int %>.",
|
||||
"headSpecialNamingDay2017Text": "Royal Purple Gryphon Helm",
|
||||
"headSpecialNamingDay2017Notes": "Happy Naming Day! Wear this fierce and feathery helm as you celebrate Habitica. Confers no benefit.",
|
||||
"headSpecialTurkeyHelmBaseText": "Turkey Helm",
|
||||
"headSpecialTurkeyHelmBaseNotes": "Your Turkey Day look will be complete when you don this beaked helm! Confers no benefit.",
|
||||
|
||||
"headSpecialNyeText": "Absurd Party Hat",
|
||||
"headSpecialNyeNotes": "You've received an Absurd Party Hat! Wear it with pride while ringing in the New Year! Confers no benefit.",
|
||||
@@ -1350,6 +1356,8 @@
|
||||
"backSpecialSnowdriftVeilNotes": "This translucent veil makes it appear you are surrounded by an elegant flurry of snow! Confers no benefit.",
|
||||
"backSpecialAetherCloakText": "Aether Cloak",
|
||||
"backSpecialAetherCloakNotes": "This cloak once belonged to the Lost Masterclasser herself. Increases Perception by <%= per %>.",
|
||||
"backSpecialTurkeyTailBaseText": "Turkey Tail",
|
||||
"backSpecialTurkeyTailBaseNotes": "Wear your noble Turkey Tail with pride while you celebrate! Confers no benefit.",
|
||||
|
||||
"body": "Body Accessory",
|
||||
"bodyCapitalized": "Body Accessory",
|
||||
@@ -1385,6 +1393,8 @@
|
||||
"bodyMystery201705Notes": "These folded wings don't just look snazzy: they will give you the speed and agility of a gryphon! Confers no benefit. May 2017 Subscriber Item.",
|
||||
"bodyMystery201706Text": "Ragged Corsair's Cloak",
|
||||
"bodyMystery201706Notes": "This cloak has secret pockets to hide all the Gold you loot from your Tasks. Confers no benefit. June 2017 Subscriber Item.",
|
||||
"bodyMystery201711Text": "Carpet Rider Scarf",
|
||||
"bodyMystery201711Notes": "This soft knitted scarf looks quite majestic blowing in the wind. Confers no benefit. November 2017 Subscriber Item.",
|
||||
|
||||
"headAccessory": "head accessory",
|
||||
"headAccessoryCapitalized": "Head Accessory",
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
"mysterySet201708": "Lava Warrior Set",
|
||||
"mysterySet201709": "Sorcery Student Set",
|
||||
"mysterySet201710": "Imperious Imp Set",
|
||||
"mysterySet201711": "Carpet Rider Set",
|
||||
"mysterySet301404": "Steampunk Standard Set",
|
||||
"mysterySet301405": "Steampunk Accessories Set",
|
||||
"mysterySet301703": "Peacock Steampunk Set",
|
||||
|
||||
@@ -175,6 +175,12 @@ let armor = {
|
||||
mystery: '201710',
|
||||
value: 0,
|
||||
},
|
||||
201711: {
|
||||
text: t('armorMystery201711Text'),
|
||||
notes: t('armorMystery201711Notes'),
|
||||
mystery: '201711',
|
||||
value: 0,
|
||||
},
|
||||
301404: {
|
||||
text: t('armorMystery301404Text'),
|
||||
notes: t('armorMystery301404Notes'),
|
||||
@@ -283,6 +289,12 @@ let body = {
|
||||
mystery: '201706',
|
||||
value: 0,
|
||||
},
|
||||
201711: {
|
||||
text: t('bodyMystery201711Text'),
|
||||
notes: t('bodyMystery201711Notes'),
|
||||
mystery: '201711',
|
||||
value: 0,
|
||||
},
|
||||
};
|
||||
|
||||
let eyewear = {
|
||||
|
||||
@@ -100,6 +100,12 @@ let armor = {
|
||||
value: 0,
|
||||
canOwn: ownsItem('armor_special_samuraiArmor'),
|
||||
},
|
||||
turkeyArmorBase: {
|
||||
text: t('armorSpecialTurkeyArmorBaseText'),
|
||||
notes: t('armorSpecialTurkeyArmorBaseNotes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('armor_special_turkeyArmorBase'),
|
||||
},
|
||||
yeti: {
|
||||
event: EVENTS.winter,
|
||||
specialClass: 'warrior',
|
||||
@@ -795,6 +801,12 @@ let back = {
|
||||
per: 10,
|
||||
canOwn: ownsItem('back_special_aetherCloak'),
|
||||
},
|
||||
turkeyTailBase: {
|
||||
text: t('backSpecialTurkeyTailBaseText'),
|
||||
notes: t('backSpecialTurkeyTailBaseNotes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('back_special_turkeyTailBase'),
|
||||
},
|
||||
};
|
||||
|
||||
let body = {
|
||||
@@ -1058,6 +1070,12 @@ let head = {
|
||||
value: 0,
|
||||
canOwn: ownsItem('head_special_nye'),
|
||||
},
|
||||
turkeyHelmBase: {
|
||||
text: t('headSpecialTurkeyHelmBaseText'),
|
||||
notes: t('headSpecialTurkeyHelmBaseNotes'),
|
||||
value: 0,
|
||||
canOwn: ownsItem('head_special_turkeyHelmBase'),
|
||||
},
|
||||
yeti: {
|
||||
event: EVENTS.winter,
|
||||
specialClass: 'warrior',
|
||||
|
||||
@@ -182,6 +182,10 @@ let mysterySets = {
|
||||
start: '2017-10-24',
|
||||
end: '2017-11-02',
|
||||
},
|
||||
201711: {
|
||||
start: '2017-11-17',
|
||||
end: '2017-12-02',
|
||||
},
|
||||
301404: {
|
||||
start: '3014-03-24',
|
||||
end: '3014-04-02',
|
||||
|
||||
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 815 B |
|
After Width: | Height: | Size: 746 B |
|
After Width: | Height: | Size: 574 B |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 531 B |
|
After Width: | Height: | Size: 799 B |
|
After Width: | Height: | Size: 472 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 505 B |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.9 KiB |
BIN
website/raw_sprites/spritesmith_large/promo_mystery_201711.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
website/raw_sprites/spritesmith_large/promo_turkey_day_2017.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -137,6 +137,8 @@ function _setUpNewUser (user) {
|
||||
user.items.quests.dustbunnies = 1;
|
||||
user.purchased.background.violet = true;
|
||||
user.preferences.background = 'violet';
|
||||
user.items.pets['Turkey-Base'] = 5;
|
||||
user.items.currentPet = 'Turkey-Base';
|
||||
|
||||
if (user.registeredThrough === 'habitica-web') {
|
||||
taskTypes = ['habit', 'daily', 'todo', 'reward', 'tag'];
|
||||
|
||||