Merge pull request #413 from SabreCat/seasonal

Winter Wonderland 2015 Cont'd
This commit is contained in:
Sabe Jones
2014-12-25 17:48:12 -06:00
26 changed files with 2190 additions and 2091 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+42 -9
View File
@@ -9911,6 +9911,11 @@ api.mystery = {
end: '2014-12-02',
text: 'Feast and Fun Set'
},
201412: {
start: '2014-12-25',
end: '2015-01-02',
text: 'Penguin Set'
},
301404: {
start: '3014-03-24',
end: '3014-04-02',
@@ -10966,6 +10971,12 @@ gear = {
mystery: '201410',
value: 0
},
201411: {
text: t('armorMystery201412Text'),
notes: t('armorMystery201412Notes'),
mystery: '201412',
value: 0
},
301404: {
text: t('armorMystery301404Text'),
notes: t('armorMystery301404Notes'),
@@ -11445,6 +11456,12 @@ gear = {
mystery: '201411',
value: 0
},
201412: {
text: t('headMystery201412Text'),
notes: t('headMystery201412Notes'),
mystery: '201412',
value: 0
},
301404: {
text: t('headMystery301404Text'),
notes: t('headMystery301404Notes'),
@@ -15257,7 +15274,7 @@ api.wrap = function(user, main) {
return typeof cb === "function" ? cb(null, _.pick(user, $w('items stats'))) : void 0;
},
purchase: function(req, cb, ga) {
var convCap, convRate, item, key, type, _ref, _ref1, _ref2, _ref3;
var convCap, convRate, item, key, price, type, _ref, _ref1, _ref2, _ref3;
_ref = req.params, type = _ref.type, key = _ref.key;
if (type === 'gems' && key === 'gem') {
_ref1 = api.planGemLimits, convRate = _ref1.convRate, convCap = _ref1.convCap;
@@ -15288,30 +15305,46 @@ api.wrap = function(user, main) {
message: "+1 Gems"
}, _.pick(user, $w('stats balance'))) : void 0;
}
if (type !== 'eggs' && type !== 'hatchingPotions' && type !== 'food' && type !== 'quests' && type !== 'special') {
if (type !== 'eggs' && type !== 'hatchingPotions' && type !== 'food' && type !== 'quests' && type !== 'gear') {
return typeof cb === "function" ? cb({
code: 404,
message: ":type must be in [hatchingPotions,eggs,food,quests,special]"
message: ":type must be in [eggs,hatchingPotions,food,quests,gear]"
}, req) : void 0;
}
item = content[type][key];
if (type === 'gear') {
item = content.gear.flat[key];
if (user.items.gear.owned[key]) {
return typeof cb === "function" ? cb({
code: 401,
message: i18n.t('alreadyHave', req.language)
}) : void 0;
}
price = (item.twoHanded ? 2 : 1) / 4;
} else {
item = content[type][key];
price = item.value / 4;
}
if (!item) {
return typeof cb === "function" ? cb({
code: 404,
message: ":key not found for Content." + type
}, req) : void 0;
}
if (user.balance < (item.value / 4)) {
if (user.balance < price) {
return typeof cb === "function" ? cb({
code: 401,
message: i18n.t('notEnoughGems', req.language)
}) : void 0;
}
if (!(user.items[type][key] > 0)) {
user.items[type][key] = 0;
user.balance -= price;
if (type === 'gear') {
user.items.gear.owned[key] = true;
} else {
if (!(user.items[type][key] > 0)) {
user.items[type][key] = 0;
}
user.items[type][key]++;
}
user.items[type][key]++;
user.balance -= item.value / 4;
if (typeof cb === "function") {
cb(null, _.pick(user, $w('items balance')));
}
+69 -57
View File
@@ -1644,25 +1644,25 @@
}
.hair_mustache_1_holly {
background-image: url(spritesmith0.png);
background-position: -706px -296px;
background-position: -1303px -728px;
width: 90px;
height: 90px;
}
.customize-option.hair_mustache_1_holly {
background-image: url(spritesmith0.png);
background-position: -731px -311px;
background-position: -1328px -743px;
width: 60px;
height: 60px;
}
.hair_mustache_1_hollygreen {
background-image: url(spritesmith0.png);
background-position: -1303px -819px;
background-position: -706px -296px;
width: 90px;
height: 90px;
}
.customize-option.hair_mustache_1_hollygreen {
background-image: url(spritesmith0.png);
background-position: -1328px -834px;
background-position: -731px -311px;
width: 60px;
height: 60px;
}
@@ -3264,323 +3264,335 @@
}
.hair_bangs_3_ghostwhite {
background-image: url(spritesmith0.png);
background-position: -1303px -728px;
background-position: -182px -1593px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_ghostwhite {
background-image: url(spritesmith0.png);
background-position: -1328px -743px;
background-position: -207px -1608px;
width: 60px;
height: 60px;
}
.hair_bangs_3_green {
background-image: url(spritesmith0.png);
background-position: -91px -592px;
background-position: -1303px -819px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_green {
background-image: url(spritesmith0.png);
background-position: -116px -607px;
background-position: -1328px -834px;
width: 60px;
height: 60px;
}
.hair_bangs_3_halloween {
background-image: url(spritesmith0.png);
background-position: 0px -592px;
background-position: -91px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_halloween {
background-image: url(spritesmith0.png);
background-position: -25px -607px;
background-position: -116px -607px;
width: 60px;
height: 60px;
}
.hair_bangs_3_holly {
background-image: url(spritesmith0.png);
background-position: -565px -444px;
background-position: 0px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_holly {
background-image: url(spritesmith0.png);
background-position: -590px -459px;
background-position: -25px -607px;
width: 60px;
height: 60px;
}
.hair_bangs_3_hollygreen {
background-image: url(spritesmith0.png);
background-position: -706px -478px;
background-position: -565px -444px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_hollygreen {
background-image: url(spritesmith0.png);
background-position: -731px -493px;
background-position: -590px -459px;
width: 60px;
height: 60px;
}
.hair_bangs_3_midnight {
background-image: url(spritesmith0.png);
background-position: -706px -387px;
background-position: -706px -478px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_midnight {
background-image: url(spritesmith0.png);
background-position: -731px -402px;
background-position: -731px -493px;
width: 60px;
height: 60px;
}
.hair_bangs_3_pblue {
background-image: url(spritesmith0.png);
background-position: -848px -364px;
background-position: -706px -387px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_pblue {
background-image: url(spritesmith0.png);
background-position: -873px -379px;
background-position: -731px -402px;
width: 60px;
height: 60px;
}
.hair_bangs_3_peppermint {
background-image: url(spritesmith0.png);
background-position: -848px -273px;
background-position: -848px -364px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_peppermint {
background-image: url(spritesmith0.png);
background-position: -873px -288px;
background-position: -873px -379px;
width: 60px;
height: 60px;
}
.hair_bangs_3_pgreen {
background-image: url(spritesmith0.png);
background-position: -848px -182px;
background-position: -848px -273px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_pgreen {
background-image: url(spritesmith0.png);
background-position: -873px -197px;
background-position: -873px -288px;
width: 60px;
height: 60px;
}
.hair_bangs_3_porange {
background-image: url(spritesmith0.png);
background-position: -848px -91px;
background-position: -848px -182px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_porange {
background-image: url(spritesmith0.png);
background-position: -873px -106px;
background-position: -873px -197px;
width: 60px;
height: 60px;
}
.hair_bangs_3_ppink {
background-image: url(spritesmith0.png);
background-position: -848px 0px;
background-position: -848px -91px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_ppink {
background-image: url(spritesmith0.png);
background-position: -873px -15px;
background-position: -873px -106px;
width: 60px;
height: 60px;
}
.hair_bangs_3_ppurple {
background-image: url(spritesmith0.png);
background-position: -728px -683px;
background-position: -848px 0px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_ppurple {
background-image: url(spritesmith0.png);
background-position: -753px -698px;
background-position: -873px -15px;
width: 60px;
height: 60px;
}
.hair_bangs_3_pumpkin {
background-image: url(spritesmith0.png);
background-position: -637px -683px;
background-position: -728px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_pumpkin {
background-image: url(spritesmith0.png);
background-position: -662px -698px;
background-position: -753px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_purple {
background-image: url(spritesmith0.png);
background-position: -546px -683px;
background-position: -637px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_purple {
background-image: url(spritesmith0.png);
background-position: -571px -698px;
background-position: -662px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_pyellow {
background-image: url(spritesmith0.png);
background-position: -455px -683px;
background-position: -546px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_pyellow {
background-image: url(spritesmith0.png);
background-position: -480px -698px;
background-position: -571px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_rainbow {
background-image: url(spritesmith0.png);
background-position: -364px -683px;
background-position: -455px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_rainbow {
background-image: url(spritesmith0.png);
background-position: -389px -698px;
background-position: -480px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_red {
background-image: url(spritesmith0.png);
background-position: -273px -683px;
background-position: -364px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_red {
background-image: url(spritesmith0.png);
background-position: -298px -698px;
background-position: -389px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_snowy {
background-image: url(spritesmith0.png);
background-position: -182px -683px;
background-position: -273px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_snowy {
background-image: url(spritesmith0.png);
background-position: -207px -698px;
background-position: -298px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_white {
background-image: url(spritesmith0.png);
background-position: -91px -683px;
background-position: -182px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_white {
background-image: url(spritesmith0.png);
background-position: -116px -698px;
background-position: -207px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_winternight {
background-image: url(spritesmith0.png);
background-position: 0px -683px;
background-position: -91px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_winternight {
background-image: url(spritesmith0.png);
background-position: -25px -698px;
background-position: -116px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_winterstar {
background-image: url(spritesmith0.png);
background-position: -728px -592px;
background-position: 0px -683px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_winterstar {
background-image: url(spritesmith0.png);
background-position: -753px -607px;
background-position: -25px -698px;
width: 60px;
height: 60px;
}
.hair_bangs_3_yellow {
background-image: url(spritesmith0.png);
background-position: -637px -592px;
background-position: -728px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_yellow {
background-image: url(spritesmith0.png);
background-position: -662px -607px;
background-position: -753px -607px;
width: 60px;
height: 60px;
}
.hair_bangs_3_zombie {
background-image: url(spritesmith0.png);
background-position: -546px -592px;
background-position: -637px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_bangs_3_zombie {
background-image: url(spritesmith0.png);
background-position: -571px -607px;
background-position: -662px -607px;
width: 60px;
height: 60px;
}
.hair_base_1_TRUred {
background-image: url(spritesmith0.png);
background-position: -455px -592px;
background-position: -546px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_1_TRUred {
background-image: url(spritesmith0.png);
background-position: -480px -607px;
background-position: -571px -607px;
width: 60px;
height: 60px;
}
.hair_base_1_aurora {
background-image: url(spritesmith0.png);
background-position: -364px -592px;
background-position: -455px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_1_aurora {
background-image: url(spritesmith0.png);
background-position: -389px -607px;
background-position: -480px -607px;
width: 60px;
height: 60px;
}
.hair_base_1_black {
background-image: url(spritesmith0.png);
background-position: -273px -592px;
background-position: -364px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_1_black {
background-image: url(spritesmith0.png);
background-position: -298px -607px;
background-position: -389px -607px;
width: 60px;
height: 60px;
}
.hair_base_1_blond {
background-image: url(spritesmith0.png);
background-position: -182px -592px;
background-position: -273px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_1_blond {
background-image: url(spritesmith0.png);
background-position: -298px -607px;
width: 60px;
height: 60px;
}
.hair_base_1_blue {
background-image: url(spritesmith0.png);
background-position: -182px -592px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_1_blue {
background-image: url(spritesmith0.png);
background-position: -207px -607px;
width: 60px;
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 187 KiB

+669 -657
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 90 KiB

+372 -378
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 169 KiB

+335 -329
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 KiB

After

Width:  |  Height:  |  Size: 361 KiB

+333 -327
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 287 KiB

+330 -324
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

+12
View File
@@ -1,4 +1,6 @@
{
"weapon": "weapon",
"weaponBase0Text": "No Weapon",
"weaponBase0Notes": "No Weapon.",
@@ -123,6 +125,8 @@
"weaponMystery301404Text": "Steampunk Cane",
"weaponMystery301404Notes": "Excellent for taking a turn about town. March 3015 Subscriber Item. Confers no benefit.",
"armor": "armor",
"armorBase0Text": "Plain Clothing",
"armorBase0Notes": "Ordinary clothing. Confers no benefit.",
@@ -243,9 +247,13 @@
"armorMystery201409Notes": "A leaf-covered vest that camouflages the wearer. Confers no benefit. September 2014 Subscriber Item.",
"armorMystery201410Text": "Goblin Gear",
"armorMystery201410Notes": "Scaly, slimy, and strong! Confers no benefit. October 2014 Subscriber Item.",
"armorMystery201412Text": "Penguin Suit",
"armorMystery201412Notes": "You're a penguin! Confers no benefit. December 2014 Subscriber Item.",
"armorMystery301404Text": "Steampunk Suit",
"armorMystery301404Notes": "Dapper and dashing, wot! Confers no benefit. February 3015 Subscriber Item.",
"headgear": "headgear",
"headBase0Text": "No Helm",
"headBase0Notes": "No headgear.",
@@ -362,11 +370,15 @@
"headMystery201408Notes": "This blazing crown gives its wearer great strength of will. Confers no benefit. August 2014 Subscriber Item.",
"headMystery201411Text": "Steel Helm of Sporting",
"headMystery201411Notes": "This is the traditional helmet worn in the beloved Habitican sport of Balance Ball, which consists of covering yourself with heavy protective gear and then committing to a healthy work-life balance..... WHILE PURSUED BY HIPPOGRIFFS. Confers no benefit. November 2014 Subscriber Item.",
"headMystery201412Text": "Penguin Hat",
"headMystery201412Notes": "Who's a penguin? Confers no benefit. December 2014 Subscriber Item.",
"headMystery301404Text": "Fancy Top Hat",
"headMystery301404Notes": "A fancy top hat for the finest of gentlefolk! January 3015 Subscriber Item. Confers no benefit.",
"headMystery301405Text": "Basic Top Hat",
"headMystery301405Notes": "A basic top hat, just begging to be paired with some fancy head accessories. Confers no benefit. May 3015 Subscriber Item.",
"offhand": "off-hand item",
"shieldBase0Text": "No Off-Hand Equipment",
"shieldBase0Notes": "No shield or second weapon.",
+1
View File
@@ -35,6 +35,7 @@
"neverMind": "Never mind",
"buyMoreGems": "Buy More Gems",
"notEnoughGems": "Not enough Gems",
"alreadyHave": "Whoops! You already have this item. No need to buy it again!",
"delete": "Delete",
"gems": "Gems",
"moreInfo": "More Info",
+8 -2
View File
@@ -16,5 +16,11 @@
"jackolantern": "Jack-O-Lantern",
"seasonalShop": "Seasonal Shop",
"seasonalShopClosedTitle": "<%= linkStart %>Siena Leslie<%= linkEnd %>",
"seasonalShopClosedText": "The Seasonal Shop is currently closed!! I don't know where the Seasonal Sorceress is now, but I bet she'll be back during the next <%= linkStart %>Grand Gala<%= linkEnd %>!"
}
"seasonalShopTitle": "<%= linkStart %>Seasonal Sorceress<%= linkEnd %>",
"seasonalShopClosedText": "The Seasonal Shop is currently closed!! I don't know where the Seasonal Sorceress is now, but I bet she'll be back during the next <%= linkStart %>Grand Gala<%= linkEnd %>!",
"seasonalShopText": "Welcome to the Seasonal Shop! From now until January 31st, we're stocking lots of seasonal edition winter goodies. After that, these items won't be back for another year, so get them while they're hot!! Or, er, cold.",
"candycaneSet": "Candy Cane (Mage)",
"skiSet": "Ski-sassin (Rogue)",
"snowflakeSet": "Snowflake (Healer)",
"yetiSet": "Yeti Tamer (Warrior)"
}
+3
View File
@@ -39,6 +39,7 @@ api.mystery =
201409: {start:'2014-09-24',end:'2014-10-02', text:'Autumn Strider Item Set'}
201410: {start:'2014-10-24',end:'2014-11-02', text:'Winged Goblin Set'}
201411: {start:'2014-11-24',end:'2014-12-02', text:'Feast and Fun Set'}
201412: {start:'2014-12-25',end:'2015-01-02', text:'Penguin Set'}
301404: {start:'3014-03-24',end:'3014-04-02', text:'Steampunk Standard Set'}
301405: {start:'3014-04-24',end:'3014-05-02', text:'Steampunk Accessories Set'}
wondercon: {start:'2014-03-24',end:'2014-04-01'} # not really, but the mechanic works
@@ -196,6 +197,7 @@ gear =
201408: text: t('armorMystery201408Text'), notes: t('armorMystery201408Notes'), mystery:'201408', value: 0
201409: text: t('armorMystery201409Text'), notes: t('armorMystery201409Notes'), mystery:'201409', value: 0
201410: text: t('armorMystery201410Text'), notes: t('armorMystery201410Notes'), mystery:'201410', value: 0
201411: text: t('armorMystery201412Text'), notes: t('armorMystery201412Notes'), mystery:'201412', value: 0
301404: text: t('armorMystery301404Text'), notes: t('armorMystery301404Notes'), mystery:'301404', value: 0
head:
@@ -268,6 +270,7 @@ gear =
201407: text: t('headMystery201407Text'), notes: t('headMystery201407Notes'), mystery:'201407', value: 0
201408: text: t('headMystery201408Text'), notes: t('headMystery201408Notes'), mystery:'201408', value: 0
201411: text: t('headMystery201411Text'), notes: t('headMystery201411Notes'), mystery:'201411', value: 0
201412: text: t('headMystery201412Text'), notes: t('headMystery201412Notes'), mystery:'201412', value: 0
301404: text: t('headMystery301404Text'), notes: t('headMystery301404Notes'), mystery:'301404', value: 0
301405: text: t('headMystery301405Text'), notes: t('headMystery301405Notes'), mystery:'301405', value: 0
+15 -7
View File
@@ -690,7 +690,7 @@ api.wrap = (user, main=true) ->
user.markModified? 'items.special'
cb? null, _.pick(user,$w 'items stats')
# buy is for gear, purchase is for gem-purchaseables (i know, I know...)
# buy is for using Gold, purchase is for Gems (I know, I know...)
purchase: (req, cb, ga) ->
{type,key} = req.params
@@ -705,13 +705,21 @@ api.wrap = (user, main=true) ->
user.stats.gp -= convRate
return cb? {code:200,message:"+1 Gems"}, _.pick(user,$w 'stats balance')
return cb?({code:404,message:":type must be in [hatchingPotions,eggs,food,quests,special]"},req) unless type in ['eggs','hatchingPotions','food','quests','special']
item = content[type][key]
return cb?({code:404,message:":type must be in [eggs,hatchingPotions,food,quests,gear]"},req) unless type in ['eggs','hatchingPotions','food','quests','gear']
if type is 'gear'
item = content.gear.flat[key]
return cb?({code:401, message: i18n.t('alreadyHave', req.language)}) if user.items.gear.owned[key]
price = (if item.twoHanded then 2 else 1) / 4
else
item = content[type][key]
price = item.value / 4
return cb?({code:404,message:":key not found for Content.#{type}"},req) unless item
return cb?({code:401, message: i18n.t('notEnoughGems', req.language)}) if user.balance < (item.value / 4)
user.items[type][key] = 0 unless user.items[type][key] > 0
user.items[type][key]++
user.balance -= (item.value / 4)
return cb?({code:401, message: i18n.t('notEnoughGems', req.language)}) if user.balance < price
user.balance -= price
if type is 'gear' then user.items.gear.owned[key] = true
else
user.items[type][key] = 0 unless user.items[type][key] > 0
user.items[type][key]++
cb? null, _.pick(user,$w 'items balance')
ga?.event('purchase', key).send()