Merge branch 'develop' into api-v3

This commit is contained in:
Matteo Pagliazzi
2016-02-14 13:03:29 +01:00
419 changed files with 20121 additions and 18129 deletions
-62
View File
@@ -1,62 +0,0 @@
export let defaultAppearancePreferences = {
background: {},
hair: {
bangs: {
0: true,
1: true,
2: true,
3: true,
},
base: {
0: true,
1: true,
3: true,
},
beard: {
0: true,
},
color: {
white: true,
brown: true,
blond: true,
red: true,
black: true,
},
flower: {
0: true,
1: true,
2: true,
3: true,
4: true,
5: true,
6: true,
},
mustache: {
0: true,
},
},
shirt: {
black: true,
blue: true,
green: true,
pink: true,
white: true,
yellow: true,
},
size: {
slim: true,
broad: true,
},
skin: {
/* eslint-disable quote-props */
'ddc994': true,
'f5a76e': true,
'ea8349': true,
'c06534': true,
'98461a': true,
'915533': true,
'c3e1dc': true,
'6bd049': true,
/* eslint-enable quote-props */
},
};
@@ -0,0 +1,309 @@
import {forOwn} from 'lodash';
let t = require('../translation.js');
/* eslint-disable camelcase */
let backgrounds = {
backgrounds062014: {
beach: {
text: t('backgroundBeachText'),
notes: t('backgroundBeachNotes'),
},
fairy_ring: {
text: t('backgroundFairyRingText'),
notes: t('backgroundFairyRingNotes'),
},
forest: {
text: t('backgroundForestText'),
notes: t('backgroundForestNotes'),
},
},
backgrounds072014: {
open_waters: {
text: t('backgroundOpenWatersText'),
notes: t('backgroundOpenWatersNotes'),
},
coral_reef: {
text: t('backgroundCoralReefText'),
notes: t('backgroundCoralReefNotes'),
},
seafarer_ship: {
text: t('backgroundSeafarerShipText'),
notes: t('backgroundSeafarerShipNotes'),
},
},
backgrounds082014: {
volcano: {
text: t('backgroundVolcanoText'),
notes: t('backgroundVolcanoNotes'),
},
clouds: {
text: t('backgroundCloudsText'),
notes: t('backgroundCloudsNotes'),
},
dusty_canyons: {
text: t('backgroundDustyCanyonsText'),
notes: t('backgroundDustyCanyonsNotes'),
},
},
backgrounds092014: {
thunderstorm: {
text: t('backgroundThunderstormText'),
notes: t('backgroundThunderstormNotes'),
},
autumn_forest: {
text: t('backgroundAutumnForestText'),
notes: t('backgroundAutumnForestNotes'),
},
harvest_fields: {
text: t('backgroundHarvestFieldsText'),
notes: t('backgroundHarvestFieldsNotes'),
},
},
backgrounds102014: {
graveyard: {
text: t('backgroundGraveyardText'),
notes: t('backgroundGraveyardNotes'),
},
haunted_house: {
text: t('backgroundHauntedHouseText'),
notes: t('backgroundHauntedHouseNotes'),
},
pumpkin_patch: {
text: t('backgroundPumpkinPatchText'),
notes: t('backgroundPumpkinPatchNotes'),
},
},
backgrounds112014: {
harvest_feast: {
text: t('backgroundHarvestFeastText'),
notes: t('backgroundHarvestFeastNotes'),
},
sunset_meadow: {
text: t('backgroundSunsetMeadowText'),
notes: t('backgroundSunsetMeadowNotes'),
},
starry_skies: {
text: t('backgroundStarrySkiesText'),
notes: t('backgroundStarrySkiesNotes'),
},
},
backgrounds122014: {
iceberg: {
text: t('backgroundIcebergText'),
notes: t('backgroundIcebergNotes'),
},
twinkly_lights: {
text: t('backgroundTwinklyLightsText'),
notes: t('backgroundTwinklyLightsNotes'),
},
south_pole: {
text: t('backgroundSouthPoleText'),
notes: t('backgroundSouthPoleNotes'),
},
},
backgrounds012015: {
ice_cave: {
text: t('backgroundIceCaveText'),
notes: t('backgroundIceCaveNotes'),
},
frigid_peak: {
text: t('backgroundFrigidPeakText'),
notes: t('backgroundFrigidPeakNotes'),
},
snowy_pines: {
text: t('backgroundSnowyPinesText'),
notes: t('backgroundSnowyPinesNotes'),
},
},
backgrounds022015: {
blacksmithy: {
text: t('backgroundBlacksmithyText'),
notes: t('backgroundBlacksmithyNotes'),
},
crystal_cave: {
text: t('backgroundCrystalCaveText'),
notes: t('backgroundCrystalCaveNotes'),
},
distant_castle: {
text: t('backgroundDistantCastleText'),
notes: t('backgroundDistantCastleNotes'),
},
},
backgrounds032015: {
spring_rain: {
text: t('backgroundSpringRainText'),
notes: t('backgroundSpringRainNotes'),
},
stained_glass: {
text: t('backgroundStainedGlassText'),
notes: t('backgroundStainedGlassNotes'),
},
rolling_hills: {
text: t('backgroundRollingHillsText'),
notes: t('backgroundRollingHillsNotes'),
},
},
backgrounds042015: {
cherry_trees: {
text: t('backgroundCherryTreesText'),
notes: t('backgroundCherryTreesNotes'),
},
floral_meadow: {
text: t('backgroundFloralMeadowText'),
notes: t('backgroundFloralMeadowNotes'),
},
gumdrop_land: {
text: t('backgroundGumdropLandText'),
notes: t('backgroundGumdropLandNotes'),
},
},
backgrounds052015: {
marble_temple: {
text: t('backgroundMarbleTempleText'),
notes: t('backgroundMarbleTempleNotes'),
},
mountain_lake: {
text: t('backgroundMountainLakeText'),
notes: t('backgroundMountainLakeNotes'),
},
pagodas: {
text: t('backgroundPagodasText'),
notes: t('backgroundPagodasNotes'),
},
},
backgrounds062015: {
drifting_raft: {
text: t('backgroundDriftingRaftText'),
notes: t('backgroundDriftingRaftNotes'),
},
shimmery_bubbles: {
text: t('backgroundShimmeryBubblesText'),
notes: t('backgroundShimmeryBubblesNotes'),
},
island_waterfalls: {
text: t('backgroundIslandWaterfallsText'),
notes: t('backgroundIslandWaterfallsNotes'),
},
},
backgrounds072015: {
dilatory_ruins: {
text: t('backgroundDilatoryRuinsText'),
notes: t('backgroundDilatoryRuinsNotes'),
},
giant_wave: {
text: t('backgroundGiantWaveText'),
notes: t('backgroundGiantWaveNotes'),
},
sunken_ship: {
text: t('backgroundSunkenShipText'),
notes: t('backgroundSunkenShipNotes'),
},
},
backgrounds082015: {
pyramids: {
text: t('backgroundPyramidsText'),
notes: t('backgroundPyramidsNotes'),
},
sunset_savannah: {
text: t('backgroundSunsetSavannahText'),
notes: t('backgroundSunsetSavannahNotes'),
},
twinkly_party_lights: {
text: t('backgroundTwinklyPartyLightsText'),
notes: t('backgroundTwinklyPartyLightsNotes'),
},
},
backgrounds092015: {
market: {
text: t('backgroundMarketText'),
notes: t('backgroundMarketNotes'),
},
stable: {
text: t('backgroundStableText'),
notes: t('backgroundStableNotes'),
},
tavern: {
text: t('backgroundTavernText'),
notes: t('backgroundTavernNotes'),
},
},
backgrounds102015: {
harvest_moon: {
text: t('backgroundHarvestMoonText'),
notes: t('backgroundHarvestMoonNotes'),
},
slimy_swamp: {
text: t('backgroundSlimySwampText'),
notes: t('backgroundSlimySwampNotes'),
},
swarming_darkness: {
text: t('backgroundSwarmingDarknessText'),
notes: t('backgroundSwarmingDarknessNotes'),
},
},
backgrounds112015: {
floating_islands: {
text: t('backgroundFloatingIslandsText'),
notes: t('backgroundFloatingIslandsNotes'),
},
night_dunes: {
text: t('backgroundNightDunesText'),
notes: t('backgroundNightDunesNotes'),
},
sunset_oasis: {
text: t('backgroundSunsetOasisText'),
notes: t('backgroundSunsetOasisNotes'),
},
},
backgrounds122015: {
alpine_slopes: {
text: t('backgroundAlpineSlopesText'),
notes: t('backgroundAlpineSlopesNotes'),
},
snowy_sunrise: {
text: t('backgroundSnowySunriseText'),
notes: t('backgroundSnowySunriseNotes'),
},
winter_town: {
text: t('backgroundWinterTownText'),
notes: t('backgroundWinterTownNotes'),
},
},
backgrounds012016: {
frozen_lake: {
text: t('backgroundFrozenLakeText'),
notes: t('backgroundFrozenLakeNotes'),
},
snowman_army: {
text: t('backgroundSnowmanArmyText'),
notes: t('backgroundSnowmanArmyNotes'),
},
winter_night: {
text: t('backgroundWinterNightText'),
notes: t('backgroundWinterNightNotes'),
},
},
backgrounds022016: {
bamboo_forest: {
text: t('backgroundBambooForestText'),
notes: t('backgroundBambooForestNotes'),
},
cozy_library: {
text: t('backgroundCozyLibraryText'),
notes: t('backgroundCozyLibraryNotes'),
},
grand_staircase: {
text: t('backgroundGrandStaircaseText'),
notes: t('backgroundGrandStaircaseNotes'),
},
},
};
/* eslint-enable quote-props */
forOwn(backgrounds, function prefillBackgroundSet (value) {
forOwn(value, function prefillBackground (bgObject) {
bgObject.price = 7;
});
});
export default backgrounds;
@@ -0,0 +1,8 @@
import prefill from '../prefill.js';
export default prefill({
0: {},
1: {},
2: {},
3: {},
});
@@ -0,0 +1,19 @@
import prefill from '../prefill.js';
import sets from '../sets.js';
export default prefill({
0: {},
1: {},
2: {price: 2, set: sets.baseHair1},
3: {},
4: {price: 2, set: sets.baseHair1},
5: {price: 2, set: sets.baseHair1},
6: {price: 2, set: sets.baseHair1},
7: {price: 2, set: sets.baseHair1},
8: {price: 2, set: sets.baseHair1},
9: {price: 2, set: sets.baseHair2},
10: {price: 2, set: sets.baseHair2},
11: {price: 2, set: sets.baseHair2},
12: {price: 2, set: sets.baseHair2},
13: {price: 2, set: sets.baseHair2},
14: {price: 2, set: sets.baseHair2},
});
@@ -0,0 +1,9 @@
import sets from '../sets.js';
import prefill from '../prefill.js';
export default prefill({
0: {},
1: {price: 2, set: sets.facialHair},
2: {price: 2, set: sets.facialHair},
3: {price: 2, set: sets.facialHair},
});
@@ -0,0 +1,50 @@
import sets from '../sets.js';
import prefill from '../prefill.js';
export default prefill({
white: {},
brown: {},
blond: {},
red: {},
black: {},
candycane: {price: 2, set: sets.winterHairColors},
frost: {price: 2, set: sets.winterHairColors},
winternight: {price: 2, set: sets.winterHairColors},
holly: {price: 2, set: sets.winterHairColors},
pblue: {price: 2, set: sets.pastelHairColors},
pgreen: {price: 2, set: sets.pastelHairColors},
porange: {price: 2, set: sets.pastelHairColors},
ppink: {price: 2, set: sets.pastelHairColors},
ppurple: {price: 2, set: sets.pastelHairColors},
pyellow: {price: 2, set: sets.pastelHairColors},
rainbow: {price: 2, set: sets.rainbowHairColors},
yellow: {price: 2, set: sets.rainbowHairColors},
green: {price: 2, set: sets.rainbowHairColors},
purple: {price: 2, set: sets.rainbowHairColors},
blue: {price: 2, set: sets.rainbowHairColors},
TRUred: {price: 2, set: sets.rainbowHairColors},
pblue2: {price: 2, set: sets.shimmerHairColors},
pgreen2: {price: 2, set: sets.shimmerHairColors},
porange2: {price: 2, set: sets.shimmerHairColors},
ppink2: {price: 2, set: sets.shimmerHairColors},
ppurple2: {price: 2, set: sets.shimmerHairColors},
pyellow2: {price: 2, set: sets.shimmerHairColors},
candycorn: {price: 2, set: sets.hauntedHairColors},
ghostwhite: {price: 2, set: sets.hauntedHairColors},
halloween: {price: 2, set: sets.hauntedHairColors},
midnight: {price: 2, set: sets.hauntedHairColors},
pumpkin: {price: 2, set: sets.hauntedHairColors},
zombie: {price: 2, set: sets.hauntedHairColors},
aurora: {price: 2, set: sets.winteryHairColors},
festive: {price: 2, set: sets.winteryHairColors},
hollygreen: {price: 2, set: sets.winteryHairColors},
peppermint: {price: 2, set: sets.winteryHairColors},
snowy: {price: 2, set: sets.winteryHairColors},
winterstar: {price: 2, set: sets.winteryHairColors},
});
@@ -0,0 +1,11 @@
import prefill from '../prefill.js';
export default prefill({
0: {},
1: {},
2: {},
3: {},
4: {},
5: {},
6: {},
});
@@ -0,0 +1,15 @@
import bangs from './bangs.js';
import base from './base.js';
import beard from './beard.js';
import color from './color.js';
import flower from './flower.js';
import mustache from './mustache.js';
export default {
color,
base,
bangs,
flower,
beard,
mustache,
};
@@ -0,0 +1,8 @@
import sets from '../sets.js';
import prefill from '../prefill.js';
export default prefill({
0: {},
1: {price: 2, set: sets.facialHair},
2: {price: 2, set: sets.facialHair},
});
+31
View File
@@ -0,0 +1,31 @@
import hair from './hair';
import shirts from './shirt.js';
import skins from './skin.js';
import sizes from './size.js';
import backgrounds from './backgrounds.js';
import {forOwn, clone} from 'lodash';
let reorderedBgs = {};
forOwn(backgrounds, function restructureBackgroundSet (value, key) {
forOwn(value, function restructureBackground (bgObject, bgKey) {
let bg = clone(bgObject);
bg.set = {
text: key,
key,
setPrice: 15,
};
reorderedBgs[bgKey] = bg;
});
});
let appearances = {
hair,
shirt: shirts,
size: sizes,
skin: skins,
background: reorderedBgs,
};
module.exports = appearances;
@@ -0,0 +1,11 @@
import {forOwn} from 'lodash';
export default function prefillAppearances (obj) {
forOwn(obj, function prefillAppearance (value, key) {
value.key = key;
if (!value.price) {
value.price = 0;
}
});
return obj;
}
+21
View File
@@ -0,0 +1,21 @@
import t from '../translation';
import prefill from './prefill.js';
export default prefill({
baseHair1: {setPrice: 5, text: t('hairSet1')},
baseHair2: {setPrice: 5, text: t('hairSet2')},
facialHair: {setPrice: 5, text: t('bodyFacialHair')},
specialShirts: {setPrice: 5, text: t('specialShirts')},
winterHairColors: {setPrice: 5, availableUntil: '2016-01-01'},
pastelHairColors: {setPrice: 5, availableUntil: '2016-01-01'},
rainbowHairColors: {setPrice: 5, text: t('rainbowColors')},
shimmerHairColors: {setPrice: 5, availableUntil: '2016-01-01', text: t('shimmerColors')},
hauntedHairColors: {setPrice: 5, availableUntil: '2016-01-01', text: t('hauntedColors')},
winteryHairColors: {setPrice: 5, availableFrom: '2015-12-18', availableUntil: '2016-02-02', text: t('winteryColors')},
rainbowSkins: {setPrice: 5, text: t('rainbowSkins')},
animalSkins: {setPrice: 5, text: t('animalSkins')},
pastelSkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('pastelSkins')},
spookySkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('spookySkins')},
supernaturalSkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('supernaturalSkins')},
splashySkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('splashySkins')},
});
+23
View File
@@ -0,0 +1,23 @@
import sets from './sets.js';
import prefill from './prefill.js';
export default prefill({
black: {},
blue: {},
green: {},
pink: {},
white: {},
yellow: {},
convict: {price: 2, set: sets.specialShirts},
cross: {price: 2, set: sets.specialShirts},
fire: {price: 2, set: sets.specialShirts},
horizon: {price: 2, set: sets.specialShirts},
ocean: {price: 2, set: sets.specialShirts},
purple: {price: 2, set: sets.specialShirts},
rainbow: {price: 2, set: sets.specialShirts},
redblue: {price: 2, set: sets.specialShirts},
thunder: {price: 2, set: sets.specialShirts},
tropical: {price: 2, set: sets.specialShirts},
zombie: {price: 2, set: sets.specialShirts},
});
+6
View File
@@ -0,0 +1,6 @@
import prefill from './prefill.js';
export default prefill({
slim: {},
broad: {},
});
+68
View File
@@ -0,0 +1,68 @@
import prefill from './prefill.js';
import sets from './sets.js';
export default prefill({
/* eslint-disable quote-props */
'ddc994': {},
'f5a76e': {},
'ea8349': {},
'c06534': {},
'98461a': {},
'915533': {},
'c3e1dc': {},
'6bd049': {},
'eb052b': {price: 2, set: sets.rainbowSkins},
'f69922': {price: 2, set: sets.rainbowSkins},
'f5d70f': {price: 2, set: sets.rainbowSkins},
'0ff591': {price: 2, set: sets.rainbowSkins},
'2b43f6': {price: 2, set: sets.rainbowSkins},
'd7a9f7': {price: 2, set: sets.rainbowSkins},
'800ed0': {price: 2, set: sets.rainbowSkins},
'rainbow': {price: 2, set: sets.rainbowSkins},
'bear': {price: 2, set: sets.animalSkins},
'cactus': {price: 2, set: sets.animalSkins},
'fox': {price: 2, set: sets.animalSkins},
'lion': {price: 2, set: sets.animalSkins},
'panda': {price: 2, set: sets.animalSkins},
'pig': {price: 2, set: sets.animalSkins},
'tiger': {price: 2, set: sets.animalSkins},
'wolf': {price: 2, set: sets.animalSkins},
'pastelPink': {price: 2, set: sets.pastelSkins},
'pastelOrange': {price: 2, set: sets.pastelSkins},
'pastelYellow': {price: 2, set: sets.pastelSkins},
'pastelGreen': {price: 2, set: sets.pastelSkins},
'pastelBlue': {price: 2, set: sets.pastelSkins},
'pastelPurple': {price: 2, set: sets.pastelSkins},
'pastelRainbowChevron': {price: 2, set: sets.pastelSkins},
'pastelRainbowDiagonal': {price: 2, set: sets.pastelSkins},
'monster': {price: 2, set: sets.spookySkins},
'pumpkin': {price: 2, set: sets.spookySkins},
'skeleton': {price: 2, set: sets.spookySkins},
'zombie': {price: 2, set: sets.spookySkins},
'ghost': {price: 2, set: sets.spookySkins},
'shadow': {price: 2, set: sets.spookySkins},
'candycorn': {price: 2, set: sets.supernaturalSkins},
'ogre': {price: 2, set: sets.supernaturalSkins},
'pumpkin2': {price: 2, set: sets.supernaturalSkins},
'reptile': {price: 2, set: sets.supernaturalSkins},
'shadow2': {price: 2, set: sets.supernaturalSkins},
'skeleton2': {price: 2, set: sets.supernaturalSkins},
'transparent': {price: 2, set: sets.supernaturalSkins},
'zombie2': {price: 2, set: sets.supernaturalSkins},
'clownfish': {price: 2, set: sets.splashySkins},
'deepocean': {price: 2, set: sets.splashySkins},
'merblue': {price: 2, set: sets.splashySkins},
'mergold': {price: 2, set: sets.splashySkins},
'mergreen': {price: 2, set: sets.splashySkins},
'merruby': {price: 2, set: sets.splashySkins},
'shark': {price: 2, set: sets.splashySkins},
'tropicalwater': {price: 2, set: sets.splashySkins},
/* eslint-enable quote-props */
});
+1 -1
View File
@@ -13,7 +13,7 @@ export const CLASSES = [
export const EVENTS = {
winter: { start: '2013-12-31', end: '2014-02-01' },
birthday: { start: '2013-01-30', end: '2014-02-01' },
birthday: { start: '2016-01-29', end: '2016-02-02' },
spring: { start: '2014-03-21', end: '2014-05-01' },
summer: { start: '2014-06-20', end: '2014-08-01' },
fall: { start: '2014-09-21', end: '2014-11-01' },
@@ -94,6 +94,22 @@ let armor = {
set: 'dragonTamer',
canOwn: ownsItem('armor_armoire_dragonTamerArmor'),
},
barristerRobes: {
text: t('armorArmoireBarristerRobesText'),
notes: t('armorArmoireBarristerRobesNotes', { con: 10 }),
value: 100,
con: 10,
set: 'barrister',
canOwn: ownsItem('armor_armoire_barristerRobes'),
},
jesterCostume: {
text: t('armorArmoireJesterCostumeText'),
notes: t('armorArmoireJesterCostumeNotes', { int: 15 }),
value: 100,
int: 15,
set: 'jester',
canOwn: ownsItem('armor_armoire_jesterCostume'),
},
};
let eyewear = {
@@ -266,6 +282,22 @@ let head = {
set: 'dragonTamer',
canOwn: ownsItem('head_armoire_dragonTamerHelm'),
},
barristerWig: {
text: t('headArmoireBarristerWigText'),
notes: t('headArmoireBarristerWigNotes', { str: 10 }),
value: 100,
str: 10,
set: 'barrister',
canOwn: ownsItem('head_armoire_barristerWig'),
},
jesterCap: {
text: t('headArmoireJesterCapText'),
notes: t('headArmoireJesterCapNotes', { per: 15 }),
value: 100,
per: 15,
set: 'jester',
canOwn: ownsItem('head_armoire_jesterCap'),
},
};
let shield = {
@@ -406,6 +438,23 @@ let weapon = {
str: 15,
canOwn: ownsItem('weapon_armoire_glowingSpear'),
},
barristerGavel: {
text: t('weaponArmoireBarristerGavelText'),
notes: t('weaponArmoireBarristerGavelNotes', { attrs: 5 }),
value: 100,
str: 5,
con: 5,
set: 'barrister',
canOwn: ownsItem('weapon_armoire_barristerGavel'),
},
jesterBaton: {
text: t('weaponArmoireJesterBatonText'),
notes: t('weaponArmoireJesterBatonNotes', { attrs: 8 }),
value: 100,
int: 8,
per: 8,
canOwn: ownsItem('weapon_armoire_jesterBaton'),
},
};
let armoireSet = {
@@ -262,6 +262,12 @@ let head = {
mystery: '201512',
value: 0,
},
201601: {
text: t('headMystery201601Text'),
notes: t('headMystery201601Notes'),
mystery: '201601',
value: 0,
},
301404: {
text: t('headMystery301404Text'),
notes: t('headMystery301404Notes'),
@@ -316,6 +322,12 @@ let headAccessory = {
};
let shield = {
201601: {
text: t('shieldMystery201601Text'),
notes: t('shieldMystery201601Notes'),
mystery: '201601',
value: 0,
},
301405: {
text: t('shieldMystery301405Text'),
notes: t('shieldMystery301405Notes'),
@@ -25,9 +25,6 @@ let armor = {
notes: t('armorSpecialYetiNotes', { con: 9 }),
con: 9,
value: 90,
canBuy: () => {
return true;
},
},
ski: {
event: EVENTS.winter,
@@ -36,9 +33,6 @@ let armor = {
notes: t('armorSpecialSkiNotes', { per: 15 }),
per: 15,
value: 90,
canBuy: () => {
return true;
},
},
candycane: {
event: EVENTS.winter,
@@ -47,9 +41,6 @@ let armor = {
notes: t('armorSpecialCandycaneNotes', { int: 9 }),
int: 9,
value: 90,
canBuy: () => {
return true;
},
},
snowflake: {
event: EVENTS.winter,
@@ -58,9 +49,6 @@ let armor = {
notes: t('armorSpecialSnowflakeNotes', { con: 15 }),
con: 15,
value: 90,
canBuy: () => {
return true;
},
},
birthday: {
event: EVENTS.birthday,
@@ -138,9 +126,6 @@ let armor = {
notes: t('armorSpecialFallRogueNotes', { per: 15 }),
value: 90,
per: 15,
canBuy: () => {
return true;
},
},
fallWarrior: {
event: EVENTS.fall,
@@ -149,9 +134,6 @@ let armor = {
notes: t('armorSpecialFallWarriorNotes', { con: 9 }),
value: 90,
con: 9,
canBuy: () => {
return true;
},
},
fallMage: {
event: EVENTS.fall,
@@ -160,9 +142,6 @@ let armor = {
notes: t('armorSpecialFallMageNotes', { int: 9 }),
value: 90,
int: 9,
canBuy: () => {
return true;
},
},
fallHealer: {
event: EVENTS.fall,
@@ -171,9 +150,6 @@ let armor = {
notes: t('armorSpecialFallHealerNotes', { con: 15 }),
value: 90,
con: 15,
canBuy: () => {
return true;
},
},
winter2015Rogue: {
event: EVENTS.winter2015,
@@ -182,9 +158,6 @@ let armor = {
notes: t('armorSpecialWinter2015RogueNotes', { per: 15 }),
value: 90,
per: 15,
canBuy: () => {
return true;
},
},
winter2015Warrior: {
event: EVENTS.winter2015,
@@ -193,9 +166,6 @@ let armor = {
notes: t('armorSpecialWinter2015WarriorNotes', { con: 9 }),
value: 90,
con: 9,
canBuy: () => {
return true;
},
},
winter2015Mage: {
event: EVENTS.winter2015,
@@ -204,9 +174,6 @@ let armor = {
notes: t('armorSpecialWinter2015MageNotes', { int: 9 }),
value: 90,
int: 9,
canBuy: () => {
return true;
},
},
winter2015Healer: {
event: EVENTS.winter2015,
@@ -215,9 +182,6 @@ let armor = {
notes: t('armorSpecialWinter2015HealerNotes', { con: 15 }),
value: 90,
con: 15,
canBuy: () => {
return true;
},
},
birthday2015: {
text: t('armorSpecialBirthday2015Text'),
@@ -359,6 +323,12 @@ let armor = {
value: 90,
con: 15,
},
birthday2016: {
text: t('armorSpecialBirthday2016Text'),
notes: t('armorSpecialBirthday2016Notes'),
value: 0,
canOwn: ownsItem('armor_special_birthday2016'),
},
};
let back = {
+106 -306
View File
@@ -19,7 +19,9 @@ import {
import mysterySets from './mystery-sets';
import gear from './gear';
import { defaultAppearancePreferences } from './appearance';
import appearances from './appearance';
import backgrounds from './appearance/backgrounds.js'
api.mystery = mysterySets;
@@ -660,7 +662,42 @@ api.spells = {
}
return user.stats.gp -= 10;
}
}
},
birthday: {
text: t('birthdayCard'),
mana: 0,
value: 10,
immediateUse: true,
silent: true,
target: 'user',
notes: t('birthdayCardNotes'),
cast: function(user, target) {
var base;
if (user === target) {
if ((base = user.achievements).birthday == null) {
base.birthday = 0;
}
user.achievements.birthday++;
} else {
_.each([user, target], function(t) {
var base1;
if ((base1 = t.achievements).birthday == null) {
base1.birthday = 0;
}
return t.achievements.birthday++;
});
}
if (!target.items.special.birthdayReceived) {
target.items.special.birthdayReceived = [];
}
target.items.special.birthdayReceived.push(user.profile.name);
target.flags.cardReceived = true;
if (typeof target.markModified === "function") {
target.markModified('items.special.birthdayReceived');
}
return user.stats.gp -= 10;
}
},
}
};
@@ -682,7 +719,12 @@ api.cardTypes = {
valentine: {
key: 'valentine',
messageOptions: 4
}
},
birthday: {
key: 'birthday',
messageOptions: 1,
yearRound: true,
},
};
_.each(api.spells, function(spellClass) {
@@ -939,6 +981,13 @@ api.questEggs = {
return u.achievements.quests && (u.achievements.quests.sabretooth != null) > 0;
})
},
Monkey: {
text: t('questEggMonkeyText'),
adjective: t('questEggMonkeyAdjective'),
canBuy: (function(u) {
return u.achievements.quests && (u.achievements.quests.monkey != null) > 0;
})
},
};
_.each(api.questEggs, function(egg, key) {
@@ -1137,93 +1186,93 @@ api.questMounts = _.transform(api.questEggs, function(m, egg) {
api.food = {
Meat: {
text: t('foodMeat'),
target: 'Base',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Base',
article: ''
},
Milk: {
text: t('foodMilk'),
target: 'White',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'White',
article: ''
},
Potatoe: {
text: t('foodPotatoe'),
target: 'Desert',
article: 'a ',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Desert',
article: 'a '
},
Strawberry: {
text: t('foodStrawberry'),
target: 'Red',
article: 'a ',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Red',
article: 'a '
},
Chocolate: {
text: t('foodChocolate'),
target: 'Shade',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Shade',
article: ''
},
Fish: {
text: t('foodFish'),
target: 'Skeleton',
article: 'a ',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Skeleton',
article: 'a '
},
RottenMeat: {
text: t('foodRottenMeat'),
target: 'Zombie',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Zombie',
article: ''
},
CottonCandyPink: {
text: t('foodCottonCandyPink'),
target: 'CottonCandyPink',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'CottonCandyPink',
article: ''
},
CottonCandyBlue: {
text: t('foodCottonCandyBlue'),
target: 'CottonCandyBlue',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'CottonCandyBlue',
article: ''
},
Honey: {
text: t('foodHoney'),
target: 'Golden',
article: '',
canBuy: (function() {
return true;
}),
canDrop: true,
target: 'Golden',
article: ''
},
Saddle: {
canBuy: (function() {
@@ -3020,6 +3069,38 @@ api.quests = {
unlock: t('questSabretoothUnlockText')
}
},
monkey: {
text: t('questMonkeyText'),
notes: t('questMonkeyNotes'),
completion: t('questMonkeyCompletion'),
value: 4,
category: 'pet',
boss: {
name: t('questMonkeyBoss'),
hp: 400,
str: 1.5
},
drop: {
items: [
{
type: 'eggs',
key: 'Monkey',
text: t('questMonkeyDropMonkeyEgg')
}, {
type: 'eggs',
key: 'Monkey',
text: t('questMonkeyDropMonkeyEgg')
}, {
type: 'eggs',
key: 'Monkey',
text: t('questMonkeyDropMonkeyEgg')
}
],
gp: 31,
exp: 200,
unlock: t('questMonkeyUnlockText')
}
},
};
_.each(api.quests, function(v, key) {
@@ -3049,290 +3130,9 @@ api.questsByLevel = _.sortBy(api.quests, function(quest) {
return quest.lvl || 0;
});
api.defaultAppearancePreferences = defaultAppearancePreferences;
api.appearances = appearances;
api.backgrounds = {
backgrounds062014: {
beach: {
text: t('backgroundBeachText'),
notes: t('backgroundBeachNotes')
},
fairy_ring: {
text: t('backgroundFairyRingText'),
notes: t('backgroundFairyRingNotes')
},
forest: {
text: t('backgroundForestText'),
notes: t('backgroundForestNotes')
}
},
backgrounds072014: {
open_waters: {
text: t('backgroundOpenWatersText'),
notes: t('backgroundOpenWatersNotes')
},
coral_reef: {
text: t('backgroundCoralReefText'),
notes: t('backgroundCoralReefNotes')
},
seafarer_ship: {
text: t('backgroundSeafarerShipText'),
notes: t('backgroundSeafarerShipNotes')
}
},
backgrounds082014: {
volcano: {
text: t('backgroundVolcanoText'),
notes: t('backgroundVolcanoNotes')
},
clouds: {
text: t('backgroundCloudsText'),
notes: t('backgroundCloudsNotes')
},
dusty_canyons: {
text: t('backgroundDustyCanyonsText'),
notes: t('backgroundDustyCanyonsNotes')
}
},
backgrounds092014: {
thunderstorm: {
text: t('backgroundThunderstormText'),
notes: t('backgroundThunderstormNotes')
},
autumn_forest: {
text: t('backgroundAutumnForestText'),
notes: t('backgroundAutumnForestNotes')
},
harvest_fields: {
text: t('backgroundHarvestFieldsText'),
notes: t('backgroundHarvestFieldsNotes')
}
},
backgrounds102014: {
graveyard: {
text: t('backgroundGraveyardText'),
notes: t('backgroundGraveyardNotes')
},
haunted_house: {
text: t('backgroundHauntedHouseText'),
notes: t('backgroundHauntedHouseNotes')
},
pumpkin_patch: {
text: t('backgroundPumpkinPatchText'),
notes: t('backgroundPumpkinPatchNotes')
}
},
backgrounds112014: {
harvest_feast: {
text: t('backgroundHarvestFeastText'),
notes: t('backgroundHarvestFeastNotes')
},
sunset_meadow: {
text: t('backgroundSunsetMeadowText'),
notes: t('backgroundSunsetMeadowNotes')
},
starry_skies: {
text: t('backgroundStarrySkiesText'),
notes: t('backgroundStarrySkiesNotes')
}
},
backgrounds122014: {
iceberg: {
text: t('backgroundIcebergText'),
notes: t('backgroundIcebergNotes')
},
twinkly_lights: {
text: t('backgroundTwinklyLightsText'),
notes: t('backgroundTwinklyLightsNotes')
},
south_pole: {
text: t('backgroundSouthPoleText'),
notes: t('backgroundSouthPoleNotes')
}
},
backgrounds012015: {
ice_cave: {
text: t('backgroundIceCaveText'),
notes: t('backgroundIceCaveNotes')
},
frigid_peak: {
text: t('backgroundFrigidPeakText'),
notes: t('backgroundFrigidPeakNotes')
},
snowy_pines: {
text: t('backgroundSnowyPinesText'),
notes: t('backgroundSnowyPinesNotes')
}
},
backgrounds022015: {
blacksmithy: {
text: t('backgroundBlacksmithyText'),
notes: t('backgroundBlacksmithyNotes')
},
crystal_cave: {
text: t('backgroundCrystalCaveText'),
notes: t('backgroundCrystalCaveNotes')
},
distant_castle: {
text: t('backgroundDistantCastleText'),
notes: t('backgroundDistantCastleNotes')
}
},
backgrounds032015: {
spring_rain: {
text: t('backgroundSpringRainText'),
notes: t('backgroundSpringRainNotes')
},
stained_glass: {
text: t('backgroundStainedGlassText'),
notes: t('backgroundStainedGlassNotes')
},
rolling_hills: {
text: t('backgroundRollingHillsText'),
notes: t('backgroundRollingHillsNotes')
}
},
backgrounds042015: {
cherry_trees: {
text: t('backgroundCherryTreesText'),
notes: t('backgroundCherryTreesNotes')
},
floral_meadow: {
text: t('backgroundFloralMeadowText'),
notes: t('backgroundFloralMeadowNotes')
},
gumdrop_land: {
text: t('backgroundGumdropLandText'),
notes: t('backgroundGumdropLandNotes')
}
},
backgrounds052015: {
marble_temple: {
text: t('backgroundMarbleTempleText'),
notes: t('backgroundMarbleTempleNotes')
},
mountain_lake: {
text: t('backgroundMountainLakeText'),
notes: t('backgroundMountainLakeNotes')
},
pagodas: {
text: t('backgroundPagodasText'),
notes: t('backgroundPagodasNotes')
}
},
backgrounds062015: {
drifting_raft: {
text: t('backgroundDriftingRaftText'),
notes: t('backgroundDriftingRaftNotes')
},
shimmery_bubbles: {
text: t('backgroundShimmeryBubblesText'),
notes: t('backgroundShimmeryBubblesNotes')
},
island_waterfalls: {
text: t('backgroundIslandWaterfallsText'),
notes: t('backgroundIslandWaterfallsNotes')
}
},
backgrounds072015: {
dilatory_ruins: {
text: t('backgroundDilatoryRuinsText'),
notes: t('backgroundDilatoryRuinsNotes')
},
giant_wave: {
text: t('backgroundGiantWaveText'),
notes: t('backgroundGiantWaveNotes')
},
sunken_ship: {
text: t('backgroundSunkenShipText'),
notes: t('backgroundSunkenShipNotes')
}
},
backgrounds082015: {
pyramids: {
text: t('backgroundPyramidsText'),
notes: t('backgroundPyramidsNotes')
},
sunset_savannah: {
text: t('backgroundSunsetSavannahText'),
notes: t('backgroundSunsetSavannahNotes')
},
twinkly_party_lights: {
text: t('backgroundTwinklyPartyLightsText'),
notes: t('backgroundTwinklyPartyLightsNotes')
}
},
backgrounds092015: {
market: {
text: t('backgroundMarketText'),
notes: t('backgroundMarketNotes')
},
stable: {
text: t('backgroundStableText'),
notes: t('backgroundStableNotes')
},
tavern: {
text: t('backgroundTavernText'),
notes: t('backgroundTavernNotes')
}
},
backgrounds102015: {
harvest_moon: {
text: t('backgroundHarvestMoonText'),
notes: t('backgroundHarvestMoonNotes')
},
slimy_swamp: {
text: t('backgroundSlimySwampText'),
notes: t('backgroundSlimySwampNotes')
},
swarming_darkness: {
text: t('backgroundSwarmingDarknessText'),
notes: t('backgroundSwarmingDarknessNotes')
}
},
backgrounds112015: {
floating_islands: {
text: t('backgroundFloatingIslandsText'),
notes: t('backgroundFloatingIslandsNotes')
},
night_dunes: {
text: t('backgroundNightDunesText'),
notes: t('backgroundNightDunesNotes')
},
sunset_oasis: {
text: t('backgroundSunsetOasisText'),
notes: t('backgroundSunsetOasisNotes')
}
},
backgrounds122015: {
alpine_slopes: {
text: t('backgroundAlpineSlopesText'),
notes: t('backgroundAlpineSlopesNotes')
},
snowy_sunrise: {
text: t('backgroundSnowySunriseText'),
notes: t('backgroundSnowySunriseNotes')
},
winter_town: {
text: t('backgroundWinterTownText'),
notes: t('backgroundWinterTownNotes')
}
},
backgrounds012016: {
frozen_lake: {
text: t('backgroundFrozenLakeText'),
notes: t('backgroundFrozenLakeNotes')
},
snowman_army: {
text: t('backgroundSnowmanArmyText'),
notes: t('backgroundSnowmanArmyNotes')
},
winter_night: {
text: t('backgroundWinterNightText'),
notes: t('backgroundWinterNightNotes')
}
},
};
api.backgrounds = backgrounds;
api.subscriptionBlocks = {
basic_earned: {
+4
View File
@@ -94,6 +94,10 @@ let mysterySets = {
start: '2015-12-23',
end: '2016-01-02',
},
201601: {
start: '2016-01-26',
end: '2016-02-02',
},
301404: {
start: '3014-03-24',
end: '3014-04-02',
+25 -3
View File
@@ -2415,6 +2415,10 @@ api.wrap = function(user, main) {
};
plan = (ref = user.purchased) != null ? ref.plan : void 0;
if (plan != null ? plan.customerId : void 0) {
if (typeof plan.dateUpdated === "undefined") {
// partial compensation for bug in subscription creation - https://github.com/HabitRPG/habitrpg/issues/6682
plan.dateUpdated = new Date();
}
if (moment(plan.dateUpdated).format('MMYYYY') !== moment().format('MMYYYY')) {
plan.gemsBought = 0;
plan.dateUpdated = new Date();
@@ -2471,12 +2475,25 @@ api.wrap = function(user, main) {
}
multiDaysCountAsOneDay = true;
todoTally = 0;
user.todos.forEach(function(task) {
// Delete completed todos older than 30 days (90 for Subscribers)
var completedTodosCutoff = moment(now);
if (user.purchased && user.purchased.plan && user.purchased.plan.customerId) {
completedTodosCutoff = completedTodosCutoff.subtract(90, 'days');
} else {
completedTodosCutoff = completedTodosCutoff.subtract(30, 'days');
}
user.todos = user.todos.filter(function(task) {
var absVal, completed, delta, id;
if (!task) {
return;
return false;
}
id = task.id, completed = task.completed;
if (completed && moment(task.dateCompleted).isBefore(completedTodosCutoff)) {
return false; // delete the todo because it's completed and has been kept for 30/90 days
}
delta = user.ops.score({
params: {
id: task.id,
@@ -2490,8 +2507,13 @@ api.wrap = function(user, main) {
}
});
absVal = completed ? Math.abs(task.value) : task.value;
return todoTally += absVal;
todoTally += absVal;
return true; // keep the todo
});
if (typeof user.markModified === "function") {
user.markModified('todos');
}
dailyChecked = 0;
dailyDueUnchecked = 0;
if ((base = user.party.quest.progress).down == null) {
+1 -1
View File
@@ -145,7 +145,7 @@
return function(input){
var html = md.toHtml(input);
html = html.replace(' href',' target="_self" href');
html = html.replace(' href',' target="_blank" href');
return html;
};