Merge branch 'Xaz16-fix-antidotes-from-revert' into develop

This commit is contained in:
Matteo Pagliazzi 2019-12-13 14:25:08 +01:00
commit b5182ed7d4
74 changed files with 14665 additions and 14465 deletions

View file

@ -15,7 +15,7 @@ describe('GET /user/toggle-pinned-item', () => {
.to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: t('cannotUnpinArmoirPotion'),
message: t('cannotUnpinItem'),
});
});

View file

@ -0,0 +1,49 @@
import {
generateUser,
} from '../../helpers/common.helper';
import getDebuffPotionItems from '../../../website/common/script/libs/getDebuffPotionItems';
import { TRANSFORMATION_DEBUFFS_LIST } from '../../../website/common/script/constants';
describe('getDebuffPotionItems', () => {
let user;
beforeEach(() => {
user = generateUser();
});
for (const key of Object.keys(TRANSFORMATION_DEBUFFS_LIST)) {
const debuff = TRANSFORMATION_DEBUFFS_LIST[key];
// Here we itterate whole object to dynamicaly create test suites as
// it described in dock of mocha
// https://mochajs.org/#dynamically-generating-tests
// That's why we have eslint-disable here
// eslint-disable-next-line no-loop-func
it(`Should return the ${debuff} on ${key} buff`, () => {
user.stats.buffs[key] = true;
const result = getDebuffPotionItems(user);
expect(result).to.be.an('array').that.deep
.includes({ path: `spells.special.${debuff}`, type: 'debuffPotion' });
});
}
it('Should return all debuff potions for all buffs', () => {
user.stats.buffs.seafoam = true;
user.stats.buffs.spookySparkles = true;
user.stats.buffs.snowball = true;
user.stats.buffs.shinySeed = true;
const result = getDebuffPotionItems(user);
expect(result).to.be.an('array').that.deep.include.members([
{ path: 'spells.special.sand', type: 'debuffPotion' },
{ path: 'spells.special.petalFreePotion', type: 'debuffPotion' },
{ path: 'spells.special.salt', type: 'debuffPotion' },
{ path: 'spells.special.opaquePotion', type: 'debuffPotion' },
]);
});
});

View file

@ -0,0 +1,53 @@
import {
generateUser,
} from '../../helpers/common.helper';
import setDebuffPotionItems from '../../../website/common/script/libs/setDebuffPotionItems';
describe('setDebuffPotionItems', () => {
let user;
beforeEach(() => {
user = generateUser();
});
it('Should push the debuff item to pinned items of user', () => {
user.stats.buffs.spookySparkles = true;
const previousPinnedItemsLength = user.pinnedItems.length;
const result = setDebuffPotionItems(user);
expect(result.pinnedItems.length).to.be.greaterThan(previousPinnedItemsLength);
});
it('Shouldn\'t create duplicate of already added debuff potion', () => {
user.stats.buffs.spookySparkles = true;
const firstSetResult = [...setDebuffPotionItems(user).pinnedItems];
const secondSetResult = [...setDebuffPotionItems(user).pinnedItems];
expect(firstSetResult).to.be.deep.equal(secondSetResult);
});
it('Should remove all debuff items from pinnedItems of the user if user have no buffs', () => {
user.stats.buffs.seafoam = true;
user.stats.buffs.spookySparkles = true;
user.stats.buffs.snowball = true;
user.stats.buffs.shinySeed = true;
const firstSetResult = [...setDebuffPotionItems(user).pinnedItems];
expect(firstSetResult).to.have.lengthOf(4);
user.stats.buffs.seafoam = false;
user.stats.buffs.spookySparkles = false;
user.stats.buffs.snowball = false;
user.stats.buffs.shinySeed = false;
const secondSetResult = [...setDebuffPotionItems(user).pinnedItems];
expect(secondSetResult).to.have.lengthOf(0);
});
});

View file

@ -6,7 +6,7 @@
}
.promo_armoire_backgrounds_201912 {
background-image: url('~@/assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -928px 0px;
background-position: 0px -752px;
width: 423px;
height: 147px;
}
@ -18,13 +18,13 @@
}
.promo_delightful_dinos {
background-image: url('~@/assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: 0px -752px;
background-position: -424px -752px;
width: 423px;
height: 147px;
}
.promo_ember_thunderstorm_potions {
background-image: url('~@/assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -424px -752px;
background-position: -928px 0px;
width: 423px;
height: 147px;
}

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,72 +1,72 @@
.weapon_warrior_3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -1361px;
background-position: -1802px -997px;
width: 90px;
height: 90px;
}
.weapon_warrior_4 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -1270px;
background-position: -1893px -997px;
width: 90px;
height: 90px;
}
.weapon_warrior_5 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -1452px;
background-position: -1802px -1088px;
width: 90px;
height: 90px;
}
.weapon_warrior_6 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -1452px;
background-position: -1893px -1088px;
width: 90px;
height: 90px;
}
.weapon_wizard_0 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -1543px;
background-position: -1802px -1179px;
width: 90px;
height: 90px;
}
.weapon_wizard_1 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -1543px;
background-position: -1893px -1179px;
width: 90px;
height: 90px;
}
.weapon_wizard_2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -997px;
background-position: -1802px -1270px;
width: 90px;
height: 90px;
}
.weapon_wizard_3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -1088px;
background-position: -1893px -1270px;
width: 90px;
height: 90px;
}
.weapon_wizard_4 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -1088px;
background-position: -1802px -1361px;
width: 90px;
height: 90px;
}
.weapon_wizard_5 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -1179px;
background-position: -1893px -1361px;
width: 90px;
height: 90px;
}
.weapon_wizard_6 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -1270px;
background-position: -1802px -1452px;
width: 90px;
height: 90px;
}
.Pet_Currency_Gem {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1921px -444px;
background-position: -1627px -1298px;
width: 68px;
height: 68px;
}
@ -114,13 +114,13 @@
}
.avatar_floral_warrior {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -897px;
background-position: -1802px -797px;
width: 99px;
height: 99px;
}
.avatar_floral_wizard {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -797px;
background-position: -1802px -897px;
width: 99px;
height: 99px;
}
@ -132,175 +132,175 @@
}
.ghost {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -997px;
background-position: -1893px -1452px;
width: 90px;
height: 90px;
}
.inventory_present {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -608px;
background-position: -1627px -746px;
width: 68px;
height: 68px;
}
.inventory_present_01 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1902px -797px;
background-position: -1921px -444px;
width: 68px;
height: 68px;
}
.inventory_present_02 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1902px -897px;
background-position: -1902px -697px;
width: 68px;
height: 68px;
}
.inventory_present_03 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -470px;
background-position: -1902px -797px;
width: 68px;
height: 68px;
}
.inventory_present_04 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -539px;
background-position: -1902px -897px;
width: 68px;
height: 68px;
}
.inventory_present_05 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -539px;
background-position: -1627px -470px;
width: 68px;
height: 68px;
}
.inventory_present_06 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -884px;
background-position: -1696px -470px;
width: 68px;
height: 68px;
}
.inventory_present_07 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -884px;
background-position: -1627px -539px;
width: 68px;
height: 68px;
}
.inventory_present_08 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -953px;
background-position: -1696px -539px;
width: 68px;
height: 68px;
}
.inventory_present_09 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -1367px;
background-position: -1627px -608px;
width: 68px;
height: 68px;
}
.inventory_present_10 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1902px -697px;
background-position: -1696px -608px;
width: 68px;
height: 68px;
}
.inventory_present_11 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -470px;
background-position: -1627px -677px;
width: 68px;
height: 68px;
}
.inventory_present_12 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -608px;
background-position: -1696px -677px;
width: 68px;
height: 68px;
}
.inventory_special_birthday {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -746px;
background-position: -1696px -746px;
width: 68px;
height: 68px;
}
.inventory_special_congrats {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -746px;
background-position: -1627px -815px;
width: 68px;
height: 68px;
}
.inventory_special_fortify {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -815px;
background-position: -1696px -815px;
width: 68px;
height: 68px;
}
.inventory_special_getwell {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -953px;
background-position: -1627px -884px;
width: 68px;
height: 68px;
}
.inventory_special_goodluck {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -1367px;
background-position: -1696px -884px;
width: 68px;
height: 68px;
}
.inventory_special_greeting {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -1298px;
background-position: -1627px -953px;
width: 68px;
height: 68px;
}
.inventory_special_nye {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -1298px;
background-position: -1696px -953px;
width: 68px;
height: 68px;
}
.inventory_special_opaquePotion {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -1229px;
background-position: -1627px -1022px;
width: 68px;
height: 68px;
}
.inventory_special_seafoam {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -1229px;
background-position: -1696px -1022px;
width: 68px;
height: 68px;
}
.inventory_special_shinySeed {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -1160px;
background-position: -1627px -1091px;
width: 68px;
height: 68px;
}
.inventory_special_snowball {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -1160px;
background-position: -1696px -1091px;
width: 68px;
height: 68px;
}
.inventory_special_spookySparkles {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -1091px;
background-position: -1627px -1160px;
width: 68px;
height: 68px;
}
.inventory_special_thankyou {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -1091px;
background-position: -1696px -1160px;
width: 68px;
height: 68px;
}
.inventory_special_trinket {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -1022px;
background-position: -1627px -1229px;
width: 68px;
height: 68px;
}
.inventory_special_valentine {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -1022px;
background-position: -1696px -1229px;
width: 68px;
height: 68px;
}
@ -312,31 +312,31 @@
}
.pet_key {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -815px;
background-position: -1696px -1298px;
width: 68px;
height: 68px;
}
.rebirth_orb {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1696px -677px;
background-position: -1627px -1367px;
width: 68px;
height: 68px;
}
.seafoam_star {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1893px -1179px;
background-position: -1802px -1543px;
width: 90px;
height: 90px;
}
.shop_armoire {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1627px -677px;
background-position: -1696px -1367px;
width: 68px;
height: 68px;
}
.snowman {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -1361px;
background-position: -1893px -1543px;
width: 90px;
height: 90px;
}
@ -354,79 +354,79 @@
}
.notif_inventory_present_01 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -229px;
background-position: -1953px -142px;
width: 28px;
height: 28px;
}
.notif_inventory_present_02 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -200px;
background-position: -1953px -171px;
width: 28px;
height: 28px;
}
.notif_inventory_present_03 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -171px;
background-position: -1953px -200px;
width: 28px;
height: 28px;
}
.notif_inventory_present_04 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -142px;
background-position: -1953px -229px;
width: 28px;
height: 28px;
}
.notif_inventory_present_05 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1931px -766px;
background-position: -1953px -258px;
width: 28px;
height: 28px;
}
.notif_inventory_present_06 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1902px -766px;
background-position: -1953px -293px;
width: 28px;
height: 28px;
}
.notif_inventory_present_07 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -409px;
background-position: -1953px -322px;
width: 28px;
height: 28px;
}
.notif_inventory_present_08 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -380px;
background-position: -1953px -351px;
width: 28px;
height: 28px;
}
.notif_inventory_present_09 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -351px;
background-position: -1953px -380px;
width: 28px;
height: 28px;
}
.notif_inventory_present_10 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -322px;
background-position: -1953px -409px;
width: 28px;
height: 28px;
}
.notif_inventory_present_11 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -258px;
background-position: -1902px -766px;
width: 28px;
height: 28px;
}
.notif_inventory_present_12 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1953px -293px;
background-position: -1931px -766px;
width: 28px;
height: 28px;
}
.notif_inventory_special_birthday {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1971px -797px;
background-position: -1971px -724px;
width: 20px;
height: 24px;
}
@ -462,7 +462,7 @@
}
.notif_inventory_special_thankyou {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1971px -724px;
background-position: -1971px -797px;
width: 20px;
height: 24px;
}
@ -516,7 +516,7 @@
}
.quest_amber {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1187px -660px;
background-position: -307px 0px;
width: 219px;
height: 219px;
}
@ -528,7 +528,7 @@
}
.quest_atom1 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1335px -1315px;
background-position: -1084px -1315px;
width: 250px;
height: 150px;
}
@ -546,13 +546,13 @@
}
.quest_axolotl {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -660px -655px;
background-position: 0px -435px;
width: 219px;
height: 219px;
}
.quest_badger {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: 0px -875px;
background-position: -220px -435px;
width: 219px;
height: 219px;
}
@ -570,7 +570,7 @@
}
.quest_bronze {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -880px -875px;
background-position: -440px -435px;
width: 219px;
height: 219px;
}
@ -582,13 +582,13 @@
}
.quest_butterfly {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1187px -440px;
background-position: -747px 0px;
width: 219px;
height: 219px;
}
.quest_cheetah {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: 0px -1095px;
background-position: -747px -220px;
width: 219px;
height: 219px;
}
@ -600,7 +600,7 @@
}
.quest_dilatory {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1407px -220px;
background-position: -220px -655px;
width: 219px;
height: 219px;
}
@ -612,31 +612,31 @@
}
.quest_dilatoryDistress2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -293px;
background-position: -1802px -142px;
width: 150px;
height: 150px;
}
.quest_dilatoryDistress3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1407px -440px;
background-position: -440px -655px;
width: 219px;
height: 219px;
}
.quest_dilatory_derby {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -880px -1095px;
background-position: 0px -655px;
width: 219px;
height: 219px;
}
.quest_dolphin {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1407px -660px;
background-position: -660px -655px;
width: 219px;
height: 219px;
}
.quest_dustbunnies {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -660px -1095px;
background-position: -967px 0px;
width: 219px;
height: 219px;
}
@ -654,19 +654,19 @@
}
.quest_evilsanta2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1407px 0px;
background-position: -967px -220px;
width: 219px;
height: 219px;
}
.quest_falcon {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1100px -1095px;
background-position: -967px -440px;
width: 219px;
height: 219px;
}
.quest_ferret {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -440px -875px;
background-position: 0px -875px;
width: 219px;
height: 219px;
}
@ -678,19 +678,19 @@
}
.quest_ghost_stag {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -440px -1095px;
background-position: -220px -875px;
width: 219px;
height: 219px;
}
.quest_goldenknight1 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -220px -1095px;
background-position: -440px -875px;
width: 219px;
height: 219px;
}
.quest_goldenknight2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1084px -1315px;
background-position: -1335px -1315px;
width: 250px;
height: 150px;
}
@ -702,19 +702,19 @@
}
.quest_gryphon {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -867px -1315px;
background-position: -650px -1315px;
width: 216px;
height: 177px;
}
.quest_guineapig {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1187px -220px;
background-position: -660px -875px;
width: 219px;
height: 219px;
}
.quest_harpy {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1187px 0px;
background-position: -880px -875px;
width: 219px;
height: 219px;
}
@ -726,67 +726,67 @@
}
.quest_hippo {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -660px -875px;
background-position: -1187px 0px;
width: 219px;
height: 219px;
}
.quest_horse {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -307px 0px;
background-position: -1187px -220px;
width: 219px;
height: 219px;
}
.quest_kangaroo {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -220px -875px;
background-position: -1187px -440px;
width: 219px;
height: 219px;
}
.quest_kraken {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -650px -1315px;
background-position: -867px -1315px;
width: 216px;
height: 177px;
}
.quest_lostMasterclasser1 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -967px -440px;
background-position: -1187px -660px;
width: 219px;
height: 219px;
}
.quest_lostMasterclasser2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -967px -220px;
background-position: 0px -1095px;
width: 219px;
height: 219px;
}
.quest_lostMasterclasser3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -967px 0px;
background-position: -220px -1095px;
width: 219px;
height: 219px;
}
.quest_mayhemMistiflying1 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -1802px -142px;
background-position: -1802px -293px;
width: 150px;
height: 150px;
}
.quest_mayhemMistiflying2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -440px -655px;
background-position: -440px -1095px;
width: 219px;
height: 219px;
}
.quest_mayhemMistiflying3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -220px -655px;
background-position: -660px -1095px;
width: 219px;
height: 219px;
}
.quest_monkey {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: 0px -655px;
background-position: -880px -1095px;
width: 219px;
height: 219px;
}
@ -798,31 +798,31 @@
}
.quest_moon2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -747px -220px;
background-position: -1100px -1095px;
width: 219px;
height: 219px;
}
.quest_moon3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -747px 0px;
background-position: -1407px 0px;
width: 219px;
height: 219px;
}
.quest_moonstone1 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -440px -435px;
background-position: -1407px -220px;
width: 219px;
height: 219px;
}
.quest_moonstone2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: -220px -435px;
background-position: -1407px -440px;
width: 219px;
height: 219px;
}
.quest_moonstone3 {
background-image: url('~@/assets/images/sprites/spritesmith-main-12.png');
background-position: 0px -435px;
background-position: -1407px -660px;
width: 219px;
height: 219px;
}

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

File diff suppressed because it is too large Load diff

View file

@ -12,25 +12,25 @@
}
.hair_bangs_4_pgreen {
background-image: url('~@/assets/images/sprites/spritesmith-main-3.png');
background-position: -91px 0px;
background-position: 0px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_4_pgreen {
background-image: url('~@/assets/images/sprites/spritesmith-main-3.png');
background-position: -116px -15px;
background-position: -25px -15px;
width: 60px;
height: 60px;
}
.hair_bangs_4_pgreen2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-3.png');
background-position: -728px -1092px;
background-position: -91px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_4_pgreen2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-3.png');
background-position: -753px -1107px;
background-position: -116px -15px;
width: 60px;
height: 60px;
}
@ -1512,13 +1512,13 @@
}
.hair_base_12_pumpkin {
background-image: url('~@/assets/images/sprites/spritesmith-main-3.png');
background-position: 0px 0px;
background-position: -728px -1092px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_12_pumpkin {
background-image: url('~@/assets/images/sprites/spritesmith-main-3.png');
background-position: -25px -15px;
background-position: -753px -1107px;
width: 60px;
height: 60px;
}

View file

@ -1,24 +1,24 @@
.hair_base_16_winternight {
background-image: url('~@/assets/images/sprites/spritesmith-main-4.png');
background-position: -91px 0px;
background-position: 0px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_16_winternight {
background-image: url('~@/assets/images/sprites/spritesmith-main-4.png');
background-position: -116px -0px;
background-position: -25px -0px;
width: 60px;
height: 60px;
}
.hair_base_16_winterstar {
background-image: url('~@/assets/images/sprites/spritesmith-main-4.png');
background-position: -728px -1092px;
background-position: -91px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_16_winterstar {
background-image: url('~@/assets/images/sprites/spritesmith-main-4.png');
background-position: -753px -1092px;
background-position: -116px -0px;
width: 60px;
height: 60px;
}
@ -1512,13 +1512,13 @@
}
.hair_base_20_brown {
background-image: url('~@/assets/images/sprites/spritesmith-main-4.png');
background-position: 0px 0px;
background-position: -728px -1092px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_20_brown {
background-image: url('~@/assets/images/sprites/spritesmith-main-4.png');
background-position: -25px -0px;
background-position: -753px -1092px;
width: 60px;
height: 60px;
}

View file

@ -12,25 +12,25 @@
}
.hair_base_6_hollygreen {
background-image: url('~@/assets/images/sprites/spritesmith-main-5.png');
background-position: -91px 0px;
background-position: 0px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_6_hollygreen {
background-image: url('~@/assets/images/sprites/spritesmith-main-5.png');
background-position: -116px -15px;
background-position: -25px -15px;
width: 60px;
height: 60px;
}
.hair_base_6_midnight {
background-image: url('~@/assets/images/sprites/spritesmith-main-5.png');
background-position: -728px -1092px;
background-position: -91px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_6_midnight {
background-image: url('~@/assets/images/sprites/spritesmith-main-5.png');
background-position: -753px -1107px;
background-position: -116px -15px;
width: 60px;
height: 60px;
}
@ -1968,13 +1968,13 @@
}
.hair_mustache_1_ppink2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-5.png');
background-position: 0px 0px;
background-position: -728px -1092px;
width: 90px;
height: 90px;
}
.customize-option.hair_mustache_1_ppink2 {
background-image: url('~@/assets/images/sprites/spritesmith-main-5.png');
background-position: -25px -15px;
background-position: -753px -1107px;
width: 60px;
height: 60px;
}

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: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 KiB

After

Width:  |  Height:  |  Size: 476 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 KiB

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 KiB

After

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View file

@ -335,7 +335,6 @@ import BuyQuestModal from '@/components/shops/quests/buyQuestModal.vue';
import notifications from '@/mixins/notifications';
import { shouldDo } from '@/../../common/script/cron';
import inAppRewards from '@/../../common/script/libs/inAppRewards';
import spells from '@/../../common/script/content/spells';
import taskDefaults from '@/../../common/script/libs/taskDefaults';
import {
@ -433,26 +432,6 @@ export default {
let watchRefresh = this.forceRefresh; // eslint-disable-line
const rewards = inAppRewards(this.user);
// Add season rewards if user is affected
// @TODO: Add buff conditional
const seasonalSkills = {
snowball: 'salt',
spookySparkles: 'opaquePotion',
shinySeed: 'petalFreePotion',
seafoam: 'sand',
};
for (const key in seasonalSkills) {
if (this.getUserBuffs(key)) {
const debuff = seasonalSkills[key];
const item = { ...spells.special[debuff] };
item.text = item.text();
item.notes = item.notes();
item.class = `shop_${key}`;
rewards.push(item);
}
}
return rewards;
},
hasRewardsList () {

View file

@ -76,7 +76,7 @@
"wrongItemType": "The item type \"<%= type %>\" is not valid.",
"wrongItemPath": "The item path \"<%= path %>\" is not valid.",
"unpinnedItem": "You unpinned <%= item %>! It will no longer display in your Rewards column.",
"cannotUnpinArmoirPotion": "The Health Potion and Enchanted Armoire cannot be unpinned.",
"cannotUnpinItem": "This item cannot be unpinned.",
"purchasedItem": "You bought <%= itemName %>",
"ian": "Ian",

View file

@ -24,3 +24,10 @@ export const SUPPORTED_SOCIAL_NETWORKS = [
export const GUILDS_PER_PAGE = 30; // number of guilds to return per page when using pagination
export const PARTY_LIMIT_MEMBERS = 30;
export const TRANSFORMATION_DEBUFFS_LIST = {
snowball: 'salt',
spookySparkles: 'opaquePotion',
shinySeed: 'petalFreePotion',
seafoam: 'sand',
};

View file

@ -2,6 +2,7 @@ import each from 'lodash/each';
import t from './translation';
import { NotAuthorized } from '../libs/errors';
import statsComputed from '../libs/statsComputed'; // eslint-disable-line import/no-cycle
import setDebuffPotionItems from '../libs/setDebuffPotionItems'; // eslint-disable-line import/no-cycle
import crit from '../fns/crit'; // eslint-disable-line import/no-cycle
import updateStats from '../fns/updateStats';
@ -287,6 +288,7 @@ spells.special = {
if (!target.achievements.snowball) target.achievements.snowball = 0;
target.achievements.snowball += 1;
user.items.special.snowball -= 1;
setDebuffPotionItems(user);
},
},
salt: {
@ -300,6 +302,7 @@ spells.special = {
cast (user) {
user.stats.buffs.snowball = false;
user.stats.gp -= 5;
setDebuffPotionItems(user);
},
},
spookySparkles: {
@ -318,6 +321,7 @@ spells.special = {
if (!target.achievements.spookySparkles) target.achievements.spookySparkles = 0;
target.achievements.spookySparkles += 1;
user.items.special.spookySparkles -= 1;
setDebuffPotionItems(user);
},
},
opaquePotion: {
@ -331,6 +335,7 @@ spells.special = {
cast (user) {
user.stats.buffs.spookySparkles = false;
user.stats.gp -= 5;
setDebuffPotionItems(user);
},
},
shinySeed: {
@ -349,6 +354,7 @@ spells.special = {
if (!target.achievements.shinySeed) target.achievements.shinySeed = 0;
target.achievements.shinySeed += 1;
user.items.special.shinySeed -= 1;
setDebuffPotionItems(user);
},
},
petalFreePotion: {
@ -362,6 +368,7 @@ spells.special = {
cast (user) {
user.stats.buffs.shinySeed = false;
user.stats.gp -= 5;
setDebuffPotionItems(user);
},
},
seafoam: {
@ -380,6 +387,7 @@ spells.special = {
if (!target.achievements.seafoam) target.achievements.seafoam = 0;
target.achievements.seafoam += 1;
user.items.special.seafoam -= 1;
setDebuffPotionItems(user);
},
},
sand: {
@ -393,6 +401,7 @@ spells.special = {
cast (user) {
user.stats.buffs.seafoam = false;
user.stats.gp -= 5;
setDebuffPotionItems(user);
},
},
nye: {

View file

@ -45,6 +45,10 @@ import updateStore from './libs/updateStore';
import inAppRewards from './libs/inAppRewards';
import setDebuffPotionItems from './libs/setDebuffPotionItems';
import getDebuffPotionItems from './libs/getDebuffPotionItems';
import uuid from './libs/uuid';
import taskDefaults from './libs/taskDefaults';
@ -158,6 +162,9 @@ api.shops = shops;
api.achievements = achievements;
api.randomVal = randomVal;
api.hasClass = hasClass;
api.setDebuffPotionItems = setDebuffPotionItems;
api.getDebuffPotionItems = getDebuffPotionItems;
api.fns = {
autoAllocate,

View file

@ -0,0 +1,21 @@
import { TRANSFORMATION_DEBUFFS_LIST } from '../constants';
export default function getDebuffPotionItems (user) {
const items = [];
const userBuffs = user.stats.buffs;
if (user) {
for (const key in TRANSFORMATION_DEBUFFS_LIST) {
if (userBuffs[key]) {
const debuff = TRANSFORMATION_DEBUFFS_LIST[key];
const item = {
path: `spells.special.${debuff}`,
type: 'debuffPotion',
};
items.push(item);
}
}
}
return items;
}

View file

@ -177,6 +177,25 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
pinType: 'seasonalSpell',
};
break;
case 'debuffPotion':
itemInfo = {
key: item.key,
mana: item.mana,
cast: item.cast,
immediateUse: item.immediateUse,
target: item.target,
text: item.text(language),
notes: item.notes(language),
value: item.value,
type: 'debuffPotion',
currency: 'gold',
locked: false,
purchaseType: 'debuffPotion',
class: `shop_${item.key}`,
path: `spells.special.${item.key}`,
pinType: 'debuffPotion',
};
break;
case 'seasonalQuest':
itemInfo = {
key: item.key,

View file

@ -0,0 +1,30 @@
import getDebuffPotionItems from './getDebuffPotionItems';
function clearDebuffPotion (user) {
return user.pinnedItems.filter(item => item.type !== 'debuffPotion');
}
export default function setDebuffPotionItems (user) {
user.pinnedItems = clearDebuffPotion(user);
const debuffPotionItems = getDebuffPotionItems(user);
if (debuffPotionItems.length) {
let isPresent = false;
const isUserHaveDebuffInPinnedItems = user.pinnedItems.find(pinnedItem => {
debuffPotionItems.forEach(debuffPotion => {
if (!isPresent) {
isPresent = debuffPotion.path === pinnedItem.path;
}
});
return isPresent;
});
if (!isUserHaveDebuffInPinnedItems) {
user.pinnedItems.push(...debuffPotionItems);
}
}
return user;
}

View file

@ -143,8 +143,9 @@ export function togglePinnedItem (user, { item, type, path }, req = {}) {
}
if (path === 'armoire' || path === 'potion') {
throw new BadRequest(i18n.t('cannotUnpinArmoirPotion', req.language));
if (path === 'armoire' || path === 'potion' || type === 'debuffPotion') {
// @TODO: take into considertation debuffPotion type in message
throw new BadRequest(i18n.t('cannotUnpinItem', req.language));
}
const isOfficialPinned = pathExistsInArray(officialPinnedItems, path) !== -1;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

View file

@ -506,6 +506,8 @@ export function cron (options = {}) {
user.stats.buffs = _.cloneDeep(CLEAR_BUFFS);
}
common.setDebuffPotionItems(user);
// Add 10 MP, or 10% of max MP if that'd be more.
// Perform this after Perfect Day for maximum benefit
// Adjust for fraction of dailies completed

View file

@ -11,7 +11,7 @@ import {
} from '../models/group';
import apiError from './apiError';
const partyMembersFields = 'profile.name stats achievements items.special notifications flags';
const partyMembersFields = 'profile.name stats achievements items.special notifications flags pinnedItems';
// Excluding notifications and flags from the list of public fields to return.
const partyMembersPublicFields = 'profile.name stats achievements items.special';
@ -68,6 +68,9 @@ async function castSelfSpell (req, user, spell, quantity = 1) {
for (let i = 0; i < quantity; i += 1) {
spell.cast(user, null, req);
}
common.setDebuffPotionItems(user);
await user.save();
}
@ -113,6 +116,8 @@ async function castUserSpell (res, req, party, partyMembers, targetId, user, spe
spell.cast(user, partyMembers, req);
}
common.setDebuffPotionItems(partyMembers);
if (partyMembers !== user) {
await Promise.all([
user.save(),