diff --git a/migrations/archive/2019/20191031_habitoween_ladder.js b/migrations/archive/2019/20191031_habitoween_ladder.js new file mode 100644 index 0000000000..2f89509ef4 --- /dev/null +++ b/migrations/archive/2019/20191031_habitoween_ladder.js @@ -0,0 +1,82 @@ +/* + * Award Habitoween ladder items to participants in this month's Habitoween festivities + */ +/* eslint-disable no-console */ + +const MIGRATION_NAME = '20191031_habitoween_ladder'; // Update when running in future years + +import { model as User } from '../../../website/server/models/user'; + +const progressCount = 1000; +let count = 0; + +async function updateUser (user) { + count++; + + const set = {}; + const inc = { + 'items.food.Candy_Skeleton': 1, + 'items.food.Candy_Base': 1, + 'items.food.Candy_CottonCandyBlue': 1, + 'items.food.Candy_CottonCandyPink': 1, + 'items.food.Candy_Shade': 1, + 'items.food.Candy_White': 1, + 'items.food.Candy_Golden': 1, + 'items.food.Candy_Zombie': 1, + 'items.food.Candy_Desert': 1, + 'items.food.Candy_Red': 1, + }; + + set.migration = MIGRATION_NAME; + + if (user && user.items && user.items.pets && user.items.pets['JackOLantern-Glow']) { + set['items.mounts.JackOLantern-Glow'] = true; + } else if (user && user.items && user.items.mounts && user.items.mounts['JackOLantern-Ghost']) { + set['items.pets.JackOLantern-Glow'] = 5; + } else if (user && user.items && user.items.pets && user.items.pets['JackOLantern-Ghost']) { + set['items.mounts.JackOLantern-Ghost'] = true; + } else if (user && user.items && user.items.mounts && user.items.mounts['JackOLantern-Base']) { + set['items.pets.JackOLantern-Ghost'] = 5; + } else if (user && user.items && user.items.pets && user.items.pets['JackOLantern-Base']) { + set['items.mounts.JackOLantern-Base'] = true; + } else { + set['items.pets.JackOLantern-Base'] = 5; + } + + if (count % progressCount === 0) console.warn(`${count} ${user._id}`); + return await User.update({_id: user._id}, {$inc: inc, $set: set}).exec(); +} + +module.exports = async function processUsers () { + let query = { + migration: {$ne: MIGRATION_NAME}, + 'auth.timestamps.loggedin': {$gt: new Date('2019-10-01')}, + }; + + const fields = { + _id: 1, + items: 1, + }; + + while (true) { // eslint-disable-line no-constant-condition + const users = await User // eslint-disable-line no-await-in-loop + .find(query) + .limit(250) + .sort({_id: 1}) + .select(fields) + .lean() + .exec(); + + if (users.length === 0) { + console.warn('All appropriate users found and modified.'); + console.warn(`\n${count} users processed\n`); + break; + } else { + query._id = { + $gt: users[users.length - 1], + }; + } + + await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop + } +}; diff --git a/website/client/src/assets/scss/variables.scss b/website/client/src/assets/scss/variables.scss index 77b0a8265b..3b1c2d17ba 100644 --- a/website/client/src/assets/scss/variables.scss +++ b/website/client/src/assets/scss/variables.scss @@ -2,8 +2,8 @@ // possible values are: normal, fall, habitoween, thanksgiving, winter, nye, birthday, valentines, spring, summer // more to be added on future seasons -$npc_market_flavor: 'fall'; -$npc_quests_flavor: 'fall'; -$npc_seasonal_flavor: 'fall'; +$npc_market_flavor: 'habitoween'; +$npc_quests_flavor: 'habitoween'; +$npc_seasonal_flavor: 'habitoween'; $npc_timetravelers_flavor: 'fall'; -$npc_tavern_flavor: 'fall'; +$npc_tavern_flavor: 'habitoween'; diff --git a/website/common/script/content/stable.js b/website/common/script/content/stable.js index 387633d220..44add8b53d 100644 --- a/website/common/script/content/stable.js +++ b/website/common/script/content/stable.js @@ -123,6 +123,7 @@ const specialMounts = { 'JackOLantern-Ghost': 'ghostJackolantern', 'Hippogriff-Hopeful': 'hopefulHippogriffMount', 'Gryphon-Gryphatrice': 'gryphatrice', + 'JackOLantern-Glow': 'glowJackolantern', }; each(specialPets, (translationString, key) => { diff --git a/website/raw_sprites/spritesmith/customize/hair/hair_bangs_2_red.png b/website/raw_sprites/spritesmith/customize/hair/hair_bangs_2_red.png index e546a2cdd0..1c41648330 100755 Binary files a/website/raw_sprites/spritesmith/customize/hair/hair_bangs_2_red.png and b/website/raw_sprites/spritesmith/customize/hair/hair_bangs_2_red.png differ diff --git a/website/raw_sprites/spritesmith/npcs/npc_bailey.png b/website/raw_sprites/spritesmith/npcs/npc_bailey.png index ea7bd68e40..755699a1cb 100644 Binary files a/website/raw_sprites/spritesmith/npcs/npc_bailey.png and b/website/raw_sprites/spritesmith/npcs/npc_bailey.png differ diff --git a/website/raw_sprites/spritesmith/npcs/npc_justin.png b/website/raw_sprites/spritesmith/npcs/npc_justin.png index d1973b48df..97ce158c9f 100644 Binary files a/website/raw_sprites/spritesmith/npcs/npc_justin.png and b/website/raw_sprites/spritesmith/npcs/npc_justin.png differ diff --git a/website/raw_sprites/spritesmith/npcs/npc_matt.png b/website/raw_sprites/spritesmith/npcs/npc_matt.png index 1cd1006fd3..30e95d29f3 100644 Binary files a/website/raw_sprites/spritesmith/npcs/npc_matt.png and b/website/raw_sprites/spritesmith/npcs/npc_matt.png differ diff --git a/website/raw_sprites/spritesmith/stable/mounts/body/Mount_Body_JackOLantern-Glow.png b/website/raw_sprites/spritesmith/stable/mounts/body/Mount_Body_JackOLantern-Glow.png new file mode 100644 index 0000000000..a2dbaf7dbf Binary files /dev/null and b/website/raw_sprites/spritesmith/stable/mounts/body/Mount_Body_JackOLantern-Glow.png differ diff --git a/website/raw_sprites/spritesmith/stable/mounts/head/Mount_Head_JackOLantern-Glow.png b/website/raw_sprites/spritesmith/stable/mounts/head/Mount_Head_JackOLantern-Glow.png new file mode 100644 index 0000000000..03802230a7 Binary files /dev/null and b/website/raw_sprites/spritesmith/stable/mounts/head/Mount_Head_JackOLantern-Glow.png differ diff --git a/website/raw_sprites/spritesmith/stable/mounts/icon/Mount_Icon_JackOLantern-Glow.png b/website/raw_sprites/spritesmith/stable/mounts/icon/Mount_Icon_JackOLantern-Glow.png new file mode 100644 index 0000000000..cbca3aa783 Binary files /dev/null and b/website/raw_sprites/spritesmith/stable/mounts/icon/Mount_Icon_JackOLantern-Glow.png differ diff --git a/website/raw_sprites/spritesmith_large/promo_habitoween_2019.png b/website/raw_sprites/spritesmith_large/promo_habitoween_2019.png new file mode 100644 index 0000000000..b8314eeb3f Binary files /dev/null and b/website/raw_sprites/spritesmith_large/promo_habitoween_2019.png differ diff --git a/website/server/controllers/api-v3/news.js b/website/server/controllers/api-v3/news.js index 595410109d..b3978ccd5c 100644 --- a/website/server/controllers/api-v3/news.js +++ b/website/server/controllers/api-v3/news.js @@ -4,7 +4,7 @@ const api = {}; // @TODO export this const, cannot export it from here because only routes are exported from // controllers -const LAST_ANNOUNCEMENT_TITLE = 'OCTOBER SUBSCRIBER ITEMS AND BLOG POSTS!'; +const LAST_ANNOUNCEMENT_TITLE = 'HABITOWEEN! AND LAST CHANCE FOR OCTOBER AND FALL FESTIVAL ITEMS'; const worldDmg = { // @TODO bailey: false, }; @@ -31,43 +31,30 @@ api.getNews = {

${res.t('newStuff')}

-

10/24/2019 - ${LAST_ANNOUNCEMENT_TITLE}

+

10/31/2019 - ${LAST_ANNOUNCEMENT_TITLE}


-
-

October Subscriber Items Revealed!

-

The October Subscriber Item has been revealed: the Cryptic Flame Item Set! You only - have until October 31 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!

-

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.

+

Happy Habitoween!

+

It's the last day of the Fall Festival, and all the NPCs are looking monstrous. Plus, we have lots of fun things in store...

+
+

Jack O' Lantern Pets and Mounts!

+

The Flourishing Fields are full of cute carved pumpkins - and it looks like one has followed you home! What kind of pumpkin? It all depends on how many Habitoweens you've celebrated with us. Each Habitoween, you'll get a new and exciting pumpkin variety!

+
by Lemoness and Beffymaroo
+

Candy for Everyone!

+

It's a feast for your pets and mounts! In honor of the end of the Fall Festival, we've given everyone an assortment of candy. You can feed it to your pets in the Stable! Enjoy.

+
by SabreCat and Lemoness
+
+

Last Chance for Fall Festival Items, Witchy Familiars Pet Quest Bundle, and Cryptic Flame Set

+

This is your last chance to get all Fall Festival items before they vanish at the end of October 31st! This includes Limited-Edition Outfits, Seasonal Shop purchases, Seasonal Edition Skins and Hair Colors, and yes, even Glow-in-the-Dark, Spooky, and Shadow Hatching Potions. Grab them all while you still can!

+
by gawrone, jjgame83, AnnDeLune, ʂʈєƒąʃųƥągųʂ, Katy133, Lilith of Alfheim, Definitely not a villain, ShoGirlGeek. cataclysms, maxpendragon, Vikte, mariahm, crystalphoenix, AaronTheTwin, tricksy.fox, QuartzFox, Lemoness, Beffymaroo and SabreCat
+

It's also the last day to get the Witchy Familiars Pet Quest Bundle and receive the Rat, Spider, and Frog quests, all for only 7 Gems! That's a discount of 5 Gems from the price of purchasing them separately. Check it out in the Quest Shop before it crawls away!

+
by Lemoness and SabreCat
+
Art by Pandah, UncommonCriminal, Arcosine, starsystemic, RosemonkeyCT, Jon Arjinborn, and Breadstrings
+
Writing by Token, Arcosine, and Fluitare
+

Plus, today is the final day to subscribe and receive the Cryptic Flame set along with other rad subscriber perks!

+

Thanks so much for your supporting the site -- you're helping us keep Habitica alive. Happy Habitoween!

by Beffymaroo
-
-

Use Case Spotlight: Habitica Events!

-

This month's Use Case - Spotlight is about Using Habitica Events for Motivation! It features a number of - great suggestions submitted by Habiticans in the - Use Case Spotlights - Guild. We hope it helps any of you who might be looking for new ways to - incentivize yourselves.

-

Plus, we're collecting user submissions for the next spotlight! How do you gamify your - tasks? We’ll be featuring player-submitted examples in Use Case Spotlights on the - Habitica Blog next month, so post your suggestions in the Use Case Spotlight Guild now. - We look forward to learning more about how you use Habitica to improve your life and get - things done!

-
by shanaqui
-

Guild Spotlight: More New and Notable Guilds!

-

There's a new Guild Spotlight on the blog - that highlights yet another selection of the upcoming Guilds in Habitica dedicated to a - variety of topics! Check it out now to find some of Habitica's best new communities.

-
by shanaqui
-
`, }); diff --git a/website/server/models/user/hooks.js b/website/server/models/user/hooks.js index 43f1dc2b8e..3ce6d98fee 100644 --- a/website/server/models/user/hooks.js +++ b/website/server/models/user/hooks.js @@ -127,10 +127,13 @@ function _setUpNewUser (user) { const iterableFlags = user.flags.toObject(); user.items.quests.dustbunnies = 1; - user.markModified('items.quests'); - user.purchased.background.violet = true; user.preferences.background = 'violet'; + user.items.pets['JackOLantern-Base'] = 5; + user.items.currentPet = 'JackOLantern-Base'; + user.migration = '20191031_habitoween_ladder'; + + user.markModified('items'); if (user.registeredThrough === 'habitica-web') { taskTypes = ['habit', 'daily', 'todo', 'reward', 'tag'];