Merge branch 'release' into develop

This commit is contained in:
Sabe Jones 2020-11-03 14:57:00 -06:00
commit 8bad3d1184
78 changed files with 21302 additions and 21216 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "habitica",
"version": "4.167.2",
"version": "4.168.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
"version": "4.167.2",
"version": "4.168.0",
"main": "./website/server/index.js",
"dependencies": {
"@babel/core": "^7.12.3",

View file

@ -311,25 +311,8 @@ describe('cron middleware', () => {
});
});
it('does not enroll 50% of users', async () => {
sandbox.stub(Math, 'random').returns(0.6);
user.lastCron = moment(new Date()).subtract({ days: 2 });
await user.save();
req.headers['x-client'] = 'habitica-web';
await new Promise((resolve, reject) => {
cronMiddleware(req, res, async err => {
if (err) return reject(err);
user = await User.findById(user._id).exec();
expect(user._ABtests.dropCapNotif).to.be.equal('drop-cap-notif-not-enrolled');
return resolve();
});
});
});
it('enables the new notification for 25% of users', async () => {
sandbox.stub(Math, 'random').returns(0.25);
it('enables the new notification for 50% of users', async () => {
sandbox.stub(Math, 'random').returns(0.5);
user.lastCron = moment(new Date()).subtract({ days: 2 });
await user.save();
req.headers['x-client'] = 'habitica-web';
@ -345,8 +328,8 @@ describe('cron middleware', () => {
});
});
it('disables the new notification for 25% of users', async () => {
sandbox.stub(Math, 'random').returns(0.5);
it('disables the new notification for 50% of users', async () => {
sandbox.stub(Math, 'random').returns(0.51);
user.lastCron = moment(new Date()).subtract({ days: 2 });
await user.save();
req.headers['x-client'] = 'habitica-web';

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

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,21 @@
.Mount_Head_Sabretooth-Skeleton {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px 0px;
width: 135px;
height: 135px;
}
.Mount_Head_Sabretooth-White {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px 0px;
width: 135px;
height: 135px;
}
.Mount_Head_Sabretooth-Zombie {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px -136px;
width: 135px;
height: 135px;
}
.Mount_Head_SeaSerpent-Base {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -816px -530px;
@ -58,15 +76,33 @@
width: 105px;
height: 105px;
}
.Mount_Head_Seahorse-Base {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -257px -680px;
width: 105px;
height: 105px;
}
.Mount_Head_Seahorse-CottonCandyBlue {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -363px -680px;
width: 105px;
height: 105px;
}
.Mount_Head_Seahorse-CottonCandyPink {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -469px -680px;
width: 105px;
height: 105px;
}
.Mount_Head_Seahorse-Desert {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -529px -680px;
background-position: -575px -680px;
width: 105px;
height: 105px;
}
.Mount_Head_Seahorse-Golden {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -635px -680px;
background-position: -681px -680px;
width: 105px;
height: 105px;
}
@ -522,61 +558,61 @@
}
.Mount_Head_TRex-Base {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px 0px;
background-position: -136px -136px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-CottonCandyBlue {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px 0px;
background-position: -272px 0px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-CottonCandyPink {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px -136px;
background-position: -272px -136px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-Desert {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px -136px;
background-position: 0px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-Golden {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -272px 0px;
background-position: -136px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-Red {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -272px -136px;
background-position: -272px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-Shade {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px -272px;
background-position: -408px 0px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-Skeleton {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px -272px;
background-position: -408px -136px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-White {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -272px -272px;
background-position: -408px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_TRex-Zombie {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -408px 0px;
background-position: 0px -408px;
width: 135px;
height: 135px;
}
@ -792,7 +828,7 @@
}
.Mount_Head_TigerCub-StarryNight {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -408px -680px;
background-position: -136px -680px;
width: 120px;
height: 120px;
}
@ -1218,139 +1254,109 @@
}
.Mount_Head_Wolf-Amber {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -408px -136px;
background-position: -136px -408px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Aquatic {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -408px -272px;
background-position: -272px -408px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Aurora {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px -408px;
background-position: -408px -408px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Base {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px -408px;
background-position: -544px 0px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-BirchBark {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -272px -408px;
background-position: -544px -136px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Bronze {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -408px -408px;
background-position: -544px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Celestial {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -544px 0px;
background-position: -544px -408px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-CottonCandyBlue {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -544px -136px;
background-position: 0px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-CottonCandyPink {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -544px -272px;
background-position: -136px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Cupid {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -544px -408px;
background-position: -272px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Desert {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px -544px;
background-position: -408px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Ember {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px -544px;
background-position: -544px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Fairy {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -272px -544px;
background-position: -680px 0px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Floral {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -408px -544px;
background-position: -680px -136px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Fluorite {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -544px -544px;
background-position: -680px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Frost {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -680px 0px;
background-position: -680px -408px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Ghost {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -680px -136px;
background-position: -680px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Glass {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -680px -272px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Glow {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -680px -408px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Golden {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -680px -544px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Holly {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: 0px -680px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-IcySnow {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -136px -680px;
width: 135px;
height: 135px;
}
.Mount_Head_Wolf-Peppermint {
background-image: url('~@/assets/images/sprites/spritesmith-main-22.png');
background-position: -272px -680px;
width: 135px;
height: 135px;
}

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

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

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

After

Width:  |  Height:  |  Size: 545 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View file

@ -635,6 +635,14 @@
"backgroundSpookyScarecrowFieldText": "Spooky Scarecrow Field",
"backgroundSpookyScarecrowFieldNotes": "Prove you're more daring than a bird by braving a Spooky Scarecrow Field.",
"backgrounds112020": "SET 78: Released November 2020",
"backgroundMysticalObservatoryText": "Mystical Observatory",
"backgroundMysticalObservatoryNotes": "Read your destiny in the stars from a Mystical Observatory.",
"backgroundRestingInTheInnText": "Resting in the Inn",
"backgroundRestingInTheInnNotes": "Work from the comfort and safety of your room while Resting in the Inn.",
"backgroundRiverOfLavaText": "River of Lava",
"backgroundRiverOfLavaNotes": "Defy convection taking a stroll along a River of Lava.",
"timeTravelBackgrounds": "Steampunk Backgrounds",
"backgroundAirshipText": "Airship",
"backgroundAirshipNotes": "Become a sky sailor on board your very own Airship.",

View file

@ -516,6 +516,8 @@
"weaponArmoireGuardiansCrookNotes": "This shepherd's crook could come in handy next time you take your Pets for a stroll in the countryside... Increases Strength by <%= str %>. Enchanted Armoire: Guardian of the Grazers Set (Item 2 of 3).",
"weaponArmoireEnchantersStaffText": "Enchanter's Staff",
"weaponArmoireEnchantersStaffNotes": "The green stones on this staff are filled with the power of change that flows strong through the autumn wind. Increases Perception by <%= per %>. Enchanted Armoire: Autumn Enchanter Set (Item 3 of 4).",
"weaponArmoireClubOfClubsText": "Club of... Clubs",
"weaponArmoireClubOfClubsNotes": "This stylish club won't tip your hand too early about your intentions toward those sneaky old tasks. Increases Strength by <%= str %>. Enchanted Armoire: Jack of Clubs Set (Item 2 of 3).",
"armor": "armor",
"armorCapitalized": "Armor",
@ -1110,6 +1112,8 @@
"armorArmoireGuardiansGownNotes": "A lovely rustic gown, with surprisingly sturdy seams! Increases Intelligence by <%= int %>. Enchanted Armoire: Guardian of the Grazers Set (Item 3 of 3).",
"armorArmoireAutumnEnchantersCloakText": "Autumn Enchanter's Cloak",
"armorArmoireAutumnEnchantersCloakNotes": "A sorcerer as skilled as you needs to look as powerful as they feel. Increases Intelligence by 12. Enchanted Armoire: Autumn Enchanter Set (Item 2 of 4).",
"armorArmoireDoubletOfClubsText": "Doublet Of Clubs",
"armorArmoireDoubletOfClubsNotes": "Who knows what's in the cards, but you'll look stylish at any event in this doublet and cape! Increases Constitution by <%= con %>. Enchanted Armoire: Jack of Clubs Set (Item 3 of 3).",
"headgear": "helm",
"headgearCapitalized": "Headgear",
@ -1724,6 +1728,8 @@
"headArmoireGuardiansBonnetNotes": "Don this fetching bonnet to help you herd your tasks! Increases Constitution by <%= con %>. Enchanted Armoire: Guardian of the Grazers Set (Item 1 of 3).",
"headArmoireHornsOfAutumnText": "Horns of Autumn",
"headArmoireHornsOfAutumnNotes": "Draw the power of the season's brisk air and channel it through your magic! Increases Strength by <%= str %>. Enchanted Armoire: Autumn Enchanter Set (Item 1 of 4).",
"headArmoireCapOfClubsText": "Cap of Clubs",
"headArmoireCapOfClubsNotes": "Let everyone know about your latest achievements with this literal feather in your cap! Increases Intelligence by <%= int %>. Enchanted Armoire: Jack of Clubs Set (Item 1 of 3).",
"offhand": "off-hand item",
"offhandCapitalized": "Off-Hand Item",

View file

@ -405,6 +405,11 @@ const backgrounds = {
haunted_forest: { },
spooky_scarecrow_field: { },
},
backgrounds112020: {
mystical_observatory: { },
resting_in_the_inn: { },
river_of_lava: { },
},
timeTravelBackgrounds: {
airship: {
price: 1,

View file

@ -330,6 +330,10 @@ const armor = {
int: 12,
set: 'autumnEnchanter',
},
doubletOfClubs: {
con: 10,
set: 'jackOfClubs',
},
};
const body = {
@ -660,6 +664,10 @@ const head = {
str: 12,
set: 'autumnEnchanter',
},
capOfClubs: {
int: 10,
set: 'jackOfClubs',
},
};
const shield = {
@ -1131,6 +1139,10 @@ const weapon = {
per: 12,
set: 'autumnEnchanter',
},
clubOfClubs: {
str: 10,
set: 'jackOfClubs',
},
};
forEach({

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

View file

@ -464,12 +464,8 @@ async function scoreTask (user, task, direction, req, res) {
user,
});
const isEnrolledInDropCapTest = user._ABtests.dropCapNotif
&& user._ABtests.dropCapNotif !== 'drop-cap-notif-not-enrolled';
// Track when new users (first 7 days) score tasks
// or if they're enrolled in the Drop Cap A/B Test
if (moment().diff(user.auth.timestamps.created, 'days') < 7 || isEnrolledInDropCapTest) {
if (moment().diff(user.auth.timestamps.created, 'days') < 7) {
res.analytics.track('task score', {
uuid: user._id,
hitType: 'event',

View file

@ -534,13 +534,11 @@ schema.methods.enrollInDropCapABTest = function enrollInDropCapABTest (xClientHe
if (isWeb && !this._ABtests.dropCapNotif && !this.isSubscribed()) {
const testGroup = Math.random();
// Enroll 20% of users, splitting them 50/50
if (testGroup <= 0.25) {
// Enroll 100% of users, splitting them 50/50
if (testGroup <= 0.50) {
this._ABtests.dropCapNotif = 'drop-cap-notif-enabled';
} else if (testGroup <= 0.5) {
this._ABtests.dropCapNotif = 'drop-cap-notif-disabled';
} else {
this._ABtests.dropCapNotif = 'drop-cap-notif-not-enrolled';
this._ABtests.dropCapNotif = 'drop-cap-notif-disabled';
}
this.markModified('_ABtests');
}