Merge pull request #425 from SabreCat/nye

New Year's event features
This commit is contained in:
Sabe Jones 2014-12-30 22:17:23 -06:00
commit 8fabcc4ffd
32 changed files with 46 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -346,6 +346,8 @@
"headSpecialFallHealerText": "Head Bandages",
"headSpecialFallHealerNotes": "Highly sanitary and very fashionable. Increases Intelligence by <%= int %>. Limited Edition 2014 Autumn Gear.",
"headSpecialNye2014Text": "Silly Party Hat",
"headSpecialNye2014Notes": "You've received a Silly Party Hat! Wear it with pride while ringing in the New Year! Confers no benefit.",
"headSpecialWinter2015RogueText": "Icicle Drake Mask",
"headSpecialWinter2015RogueNotes": "You are truly, definitely, absolutely a genuine Icicle Drake. You are not infiltrating the Icicle Drake hives. You have no interest at all in the hoards of riches rumored to lie in their frigid tunnels. Rawr. Increases Perception by <%= per %>. Limited Edition 2015 Winter Gear.",
"headSpecialWinter2015WarriorText": "Gingerbread Helm",

View file

@ -21,5 +21,15 @@
"candycaneSet": "Candy Cane (Mage)",
"skiSet": "Ski-sassin (Rogue)",
"snowflakeSet": "Snowflake (Healer)",
"yetiSet": "Yeti Tamer (Warrior)"
"yetiSet": "Yeti Tamer (Warrior)",
"nyeCard": "New Year's Card",
"nyeCardNotes": "Send a New Year's card to a friend.",
"seasonalItems": "Seasonal Items",
"auldAcquaintance": "Auld Acquaintance",
"auldAcquaintanceText": "Happy New Year! Sent or received <%= cards %> New Year's cards.",
"newYear0": "Happy New Year! May you slay many a bad Habit.",
"newYear1": "Happy New Year! May you reap many Rewards.",
"newYear2": "Happy New Year! May you earn many a Perfect Day.",
"newYear3": "Happy New Year! May your To-Do list stay short and sweet.",
"newYear4": "Happy New Year! May you not get attacked by a raging Hippogriff."
}

View file

@ -260,7 +260,8 @@ gear =
winter2015Rogue: event: events.winter2015, specialClass: 'rogue', text: t('headSpecialWinter2015RogueText'), notes: t('headSpecialWinter2015RogueNotes', {per: 9}),value: 60,per: 9
winter2015Warrior: event: events.winter2015, specialClass: 'warrior', text: t('headSpecialWinter2015WarriorText'), notes: t('headSpecialWinter2015WarriorNotes', {str: 9}),value: 60,str: 9
winter2015Mage: event: events.winter2015, specialClass: 'wizard', text: t('headSpecialWinter2015MageText'), notes: t('headSpecialWinter2015MageNotes', {per: 7}),value: 60,per: 7
winter2015Healer: event: events.winter2015, specialClass: 'healer', text: t('headSpecialWinter2015HealerText'), notes: t('headSpecialWinter2015HealerNotes', {int: 7}), value: 60, int: 7
winter2015Healer: event: events.winter2015, specialClass: 'healer', text: t('headSpecialWinter2015HealerText'), notes: t('headSpecialWinter2015HealerNotes', {int: 7}), value: 60, int: 7
nye2014: text: t('headSpecialNye2014Text'), notes: t('headSpecialNye2014Notes'), value: 0
# Other
gaymerx: event: events.gaymerx, text: t('headSpecialGaymerxText'), notes: t('headSpecialGaymerxNotes'), value: 0
mystery:
@ -649,7 +650,7 @@ api.spells =
snowball:
text: t('spellSpecialSnowballAuraText')
mana: 0
value: 1
value: 15
target: 'user'
notes: t('spellSpecialSnowballAuraNotes')
cast: (user, target) ->
@ -690,6 +691,24 @@ api.spells =
user.stats.buffs.spookDust = false
user.stats.gp -= 5
nye:
text: t('nyeCard')
mana: 0
value: 10
target: 'user'
notes: t('nyeCardNotes')
cast: (user, target) ->
if user == target
user.achievements.nye ?= 0
user.achievements.nye++
else
_.each [user,target], (t)->
t.achievements.nye ?= 0
t.achievements.nye++
(target.items.special.nyeReceived ?= []).push user.profile.name
target.markModified? 'items.special.nyeReceived'
user.stats.gp -= 10
# Intercept all spells to reduce user.stats.mp after casting the spell
_.each api.spells, (spellClass) ->
_.each spellClass, (spell, key) ->

View file

@ -688,15 +688,16 @@ api.wrap = (user, main=true) ->
user.items.food[food.key]--
cb? {code:200, message}, userPets[pet]
#FIXME stupid method of special-handling spookDust, since it can be purchased with gold and the system only accomodates gem-purchasable holiday spells
buySpookDust: (req,cb) ->
item = content.special.spookDust
buySpecialSpell: (req,cb) ->
{key} = req.params
item = content.special[key]
return cb?({code:401, message: i18n.t('messageNotEnoughGold', req.language)}) if user.stats.gp < item.value
user.stats.gp -= item.value
user.items.special.spookDust ?= 0
user.items.special.spookDust++
user.items.special[key] ?= 0
user.items.special[key]++
user.markModified? 'items.special'
cb? null, _.pick(user,$w 'items stats')
message = i18n.t('messageBought', {itemText: item.text(req.language)}, req.language)
cb? {code:200,message}, _.pick(user,$w 'items stats')
# buy is for using Gold, purchase is for Gems (I know, I know...)
purchase: (req, cb, ga) ->
@ -931,6 +932,11 @@ api.wrap = (user, main=true) ->
#cb? {code:200, message:"#{item.text} inside!"}, user.items.gear.owned
cb? null, user.items.gear.owned
readNYE: (req,cb) ->
user.items.special.nyeReceived.shift()
user.markModified? 'items.special.nyeReceived'
cb? null, 'items.special'
# ------
# Score
# ------