2013-05-19 17:01:01 +00:00
_ = require ' lodash '
2013-12-11 16:30:07 +00:00
api = module . exports
2013-12-20 18:03:16 +00:00
moment = require ' moment '
2014-03-05 14:48:31 +00:00
i18n = require ' ./i18n.coffee '
2014-03-10 18:36:32 +00:00
t = (string, vars) ->
(lang) ->
vars ? = lang
i18n . t ( string , vars , lang )
2013-11-22 19:35:27 +00:00
# ##
2014-03-24 02:18:09 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gear ( Weapons , Armor , Head , Shield )
Item definitions: { index , text , notes , value , str , def , int , per , classes , type }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2013-11-22 19:35:27 +00:00
# ##
2014-01-10 04:33:01 +00:00
classes = [ ' warrior ' , ' rogue ' , ' healer ' , ' wizard ' ]
2014-04-16 23:42:21 +00:00
gearTypes = [ ' weapon ' , ' armor ' , ' head ' , ' shield ' , ' body ' , ' back ' , ' headAccessory ' ]
2014-01-10 04:33:01 +00:00
2014-01-07 01:10:36 +00:00
events =
winter: { start : ' 2013-12-31 ' , end : ' 2014-02-01 ' }
2014-01-31 02:19:30 +00:00
birthday: { start : ' 2013-01-30 ' , end : ' 2014-02-01 ' }
2014-03-21 20:02:29 +00:00
spring: { start : ' 2014-03-21 ' , end : ' 2014-05-01 ' }
2013-12-11 16:30:07 +00:00
2014-03-09 04:14:20 +00:00
mystery =
201402 : { start : ' 2014-02-22 ' , end : ' 2014-02-28 ' }
2014-03-25 05:36:14 +00:00
201403 : { start : ' 2014-03-24 ' , end : ' 2014-04-01 ' }
2014-04-24 23:42:36 +00:00
201404 : { start : ' 2014-04-24 ' , end : ' 2014-05-01 ' }
2014-04-16 23:45:23 +00:00
wondercon: { start : ' 2014-03-24 ' , end : ' 2014-04-01 ' } # not really, but the mechanic works
2014-03-09 04:14:20 +00:00
2013-11-30 21:55:25 +00:00
gear =
weapon:
2013-12-06 22:41:11 +00:00
base:
2014-03-05 14:48:31 +00:00
0 :
2014-03-10 18:36:32 +00:00
text: t ( ' weaponBase0Text ' ) , notes: t ( ' weaponBase0Notes ' ) , value : 0
2013-11-30 21:55:25 +00:00
warrior:
2014-03-10 18:36:32 +00:00
0 : text: t ( ' weaponWarrior0Text ' ) , notes: t ( ' weaponWarrior0Notes ' ) , value : 0
1 : text: t ( ' weaponWarrior1Text ' ) , notes: t ( ' weaponWarrior1Notes ' , { str: 3 } ) , str: 3 , value : 20
2 : text: t ( ' weaponWarrior2Text ' ) , notes: t ( ' weaponWarrior2Notes ' , { str: 6 } ) , str: 6 , value : 30
3 : text: t ( ' weaponWarrior3Text ' ) , notes: t ( ' weaponWarrior3Notes ' , { str: 9 } ) , str: 9 , value : 45
4 : text: t ( ' weaponWarrior4Text ' ) , notes: t ( ' weaponWarrior4Notes ' , { str: 12 } ) , str: 12 , value : 65
5 : text: t ( ' weaponWarrior5Text ' ) , notes: t ( ' weaponWarrior5Notes ' , { str: 15 } ) , str: 15 , value : 90
6 : text: t ( ' weaponWarrior6Text ' ) , notes: t ( ' weaponWarrior6Notes ' , { str: 18 } ) , str: 18 , value : 120 , last: true
2013-11-30 21:55:25 +00:00
rogue:
2013-12-15 19:39:03 +00:00
#Not using bows at the moment, but they would be easy to add back in to an advanced Armory feature, as Quest drops, etc.
#0: twoHanded: true, text: "Practice Bow", notes:'Training weapon. Confers no benefit.', value:0
#1: twoHanded: true, text: "Short Bow", notes:'Simple bow best at close ranges. Increases STR by 2.', str: 2, value:20
#2: twoHanded: true, text: "Long Bow", notes:'Bow with a strong draw for extra distance. Increases STR by 5.', str: 5, value:50
#3: twoHanded: true, text: "Recurve Bow", notes:'Built with advanced techniques. Increases STR by 8.', str: 8, value:80
#4: twoHanded: true, text: "Icicle Bow", notes:'Fires arrows of piercing cold. Increases STR by 12.', str: 12, value:120
#5: twoHanded: true, text: "Meteor Bow", notes:'Rains flame upon your foes. Increases STR by 16.', str: 16, value:160
#6: twoHanded: true, text: "Golden Bow", notes:'As swift as sunlight and as sharp as lightning. Increases STR by 20.', str: 20, value:200, last: true
2014-03-10 18:36:32 +00:00
0 : text: t ( ' weaponRogue0Text ' ) , notes: t ( ' weaponRogue0Notes ' ) , str: 0 , value: 0
1 : text: t ( ' weaponRogue1Text ' ) , notes: t ( ' weaponRogue1Notes ' , { str: 2 } ) , str: 2 , value: 20
2 : text: t ( ' weaponRogue2Text ' ) , notes: t ( ' weaponRogue2Notes ' , { str: 3 } ) , str: 3 , value: 35
3 : text: t ( ' weaponRogue3Text ' ) , notes: t ( ' weaponRogue3Notes ' , { str: 4 } ) , str: 4 , value: 50
4 : text: t ( ' weaponRogue4Text ' ) , notes: t ( ' weaponRogue4Notes ' , { str: 6 } ) , str: 6 , value: 70
5 : text: t ( ' weaponRogue5Text ' ) , notes: t ( ' weaponRogue5Notes ' , { str: 8 } ) , str: 8 , value: 90
6 : text: t ( ' weaponRogue6Text ' ) , notes: t ( ' weaponRogue6Notes ' , { str: 10 } ) , str: 10 , value: 120 , last: true
2013-12-05 06:53:15 +00:00
wizard:
2014-03-10 18:36:32 +00:00
0 : twoHanded: true , text: t ( ' weaponWizard0Text ' ) , notes: t ( ' weaponWizard0Notes ' ) , value : 0
1 : twoHanded: true , text: t ( ' weaponWizard1Text ' ) , notes: t ( ' weaponWizard1Notes ' , { int: 3 , per: 1 } ) , int: 3 , per: 1 , value : 30
2 : twoHanded: true , text: t ( ' weaponWizard2Text ' ) , notes: t ( ' weaponWizard2Notes ' , { int: 6 , per: 2 } ) , int: 6 , per: 2 , value : 50
3 : twoHanded: true , text: t ( ' weaponWizard3Text ' ) , notes: t ( ' weaponWizard3Notes ' , { int: 9 , per: 3 } ) , int: 9 , per: 3 , value : 80
4 : twoHanded: true , text: t ( ' weaponWizard4Text ' ) , notes: t ( ' weaponWizard4Notes ' , { int: 12 , per: 5 } ) , int : 12 , per: 5 , value : 120
5 : twoHanded: true , text: t ( ' weaponWizard5Text ' ) , notes: t ( ' weaponWizard5Notes ' , { int: 15 , per: 7 } ) , int: 15 , per: 7 , value : 160
6 : twoHanded: true , text: t ( ' weaponWizard6Text ' ) , notes: t ( ' weaponWizard6Notes ' , { int: 18 , per: 10 } ) , int: 18 , per: 10 , value : 200 , last: true
2013-11-30 21:55:25 +00:00
healer:
2014-03-10 18:36:32 +00:00
0 : text: t ( ' weaponHealer0Text ' ) , notes: t ( ' weaponHealer0Notes ' ) , value : 0
1 : text: t ( ' weaponHealer1Text ' ) , notes: t ( ' weaponHealer1Notes ' , { int: 2 } ) , int: 2 , value : 20
2 : text: t ( ' weaponHealer2Text ' ) , notes: t ( ' weaponHealer2Notes ' , { int: 3 } ) , int: 3 , value : 30
3 : text: t ( ' weaponHealer3Text ' ) , notes: t ( ' weaponHealer3Notes ' , { int: 5 } ) , int: 5 , value : 45
4 : text: t ( ' weaponHealer4Text ' ) , notes: t ( ' weaponHealer4Notes ' , { int: 7 } ) , int : 7 , value : 65
5 : text: t ( ' weaponHealer5Text ' ) , notes: t ( ' weaponHealer5Notes ' , { int: 9 } ) , int: 9 , value : 90
6 : text: t ( ' weaponHealer6Text ' ) , notes: t ( ' weaponHealer6Notes ' , { int: 11 } ) , int: 11 , value : 120 , last: true
2013-11-30 21:55:25 +00:00
special:
2014-03-06 06:49:32 +00:00
0 : text: ( -> i18n . t ( ' weaponSpecial0Text ' ) ) , notes: ( -> i18n . t ( ' weaponSpecial0Notes ' , { str: 20 } ) ) , str: 20 , value : 150 , canOwn: ( (u)-> + u . backer ? . tier >= 70 )
1 : text: ( -> i18n . t ( ' weaponSpecial1Text ' ) ) , notes: ( -> i18n . t ( ' weaponSpecial1Notes ' , { attrs: 6 } ) ) , str: 6 , per: 6 , con: 6 , int: 6 , value : 170 , canOwn: ( (u)-> + u . contributor ? . level >= 4 )
2014-03-08 15:57:07 +00:00
2 : text: ( -> i18n . t ( ' weaponSpecial2Text ' ) ) , notes: ( -> i18n . t ( ' weaponSpecial2Notes ' , { attrs: 25 } ) ) , str: 25 , per: 25 , value : 200 , canOwn: ( (u)-> ( + u . backer ? . tier >= 300 ) or u . items . gear . owned . weapon_special_2 ? )
2014-03-06 06:49:32 +00:00
3 : text: ( -> i18n . t ( ' weaponSpecial3Text ' ) ) , notes: ( -> i18n . t ( ' weaponSpecial3Notes ' , { attrs: 17 } ) ) , str: 17 , int: 17 , con: 17 , value : 200 , canOwn: ( (u)-> + u . backer ? . tier >= 300 )
critical: text: ( -> i18n . t ( ' weaponSpecialCriticalText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialCriticalNotes ' , { attrs: 40 } ) ) , str: 40 , per: 40 , value : 200 , canOwn: ( (u)-> ! ! u . contributor ? . critical )
2014-01-07 00:14:17 +00:00
# Winter event gear
2014-03-06 06:49:32 +00:00
yeti: event: events . winter , canOwn: ( (u)-> u . stats . class is ' warrior ' ) , text: ( -> i18n . t ( ' weaponSpecialYetiText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialYetiNotes ' , { str: 15 } ) ) , str: 15 , value : 90
ski: event: events . winter , canOwn: ( (u)-> u . stats . class is ' rogue ' ) , text: ( -> i18n . t ( ' weaponSpecialSkiText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSkiNotes ' , { str: 8 } ) ) , str: 8 , value: 90
candycane: event: events . winter , canOwn: ( (u)-> u . stats . class is ' wizard ' ) , twoHanded: true , text: ( -> i18n . t ( ' weaponSpecialCandycaneText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialCandycaneNotes ' , { int: 15 , per: 7 } ) ) , int: 15 , per: 7 , value : 160
snowflake: event: events . winter , canOwn: ( (u)-> u . stats . class is ' healer ' ) , text: ( -> i18n . t ( ' weaponSpecialSnowflakeText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSnowflakeNotes ' , { int: 9 } ) ) , int: 9 , value : 90
2014-03-21 20:12:05 +00:00
#Spring Fling
2014-03-29 19:20:06 +00:00
springRogue: event: events . spring , specialClass: ' rogue ' , text: ( -> i18n . t ( ' weaponSpecialSpringRogueText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSpringRogueNotes ' , { str: 8 } ) ) , value: 80 , str: 8
springWarrior: event: events . spring , specialClass: ' warrior ' , text: ( -> i18n . t ( ' weaponSpecialSpringWarriorText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSpringWarriorNotes ' , { str: 15 } ) ) , value: 90 , str: 15
springMage: event: events . spring , specialClass: ' wizard ' , twoHanded : true , text: ( -> i18n . t ( ' weaponSpecialSpringMageText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSpringMageNotes ' , { int: 15 , per: 7 } ) ) , value: 160 , int : 15 , per : 7
springHealer: event: events . spring , specialClass: ' healer ' , text: ( -> i18n . t ( ' weaponSpecialSpringHealerText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSpringHealerNotes ' , { int: 9 } ) ) , value: 90 , int: 9
2014-01-07 00:14:17 +00:00
2013-11-30 21:55:25 +00:00
armor:
2013-12-06 22:41:11 +00:00
base:
2014-03-10 18:36:32 +00:00
0 : text: t ( ' armorBase0Text ' ) , notes: t ( ' armorBase0Notes ' ) , value : 0
2013-12-06 22:41:11 +00:00
warrior:
2014-01-17 02:18:44 +00:00
#0: text: "Plain Clothing", notes:'Ordinary clothing. Confers no benefit.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' armorWarrior1Text ' ) , notes: t ( ' armorWarrior1Notes ' , { con: 3 } ) , con: 3 , value : 30
2 : text: t ( ' armorWarrior2Text ' ) , notes: t ( ' armorWarrior2Notes ' , { con: 5 } ) , con: 5 , value : 45
3 : text: t ( ' armorWarrior3Text ' ) , notes: t ( ' armorWarrior3Notes ' , { con: 7 } ) , con: 7 , value : 65
4 : text: t ( ' armorWarrior4Text ' ) , notes: t ( ' armorWarrior4Notes ' , { con: 9 } ) , con: 9 , value : 90
5 : text: t ( ' armorWarrior5Text ' ) , notes: t ( ' armorWarrior5Notes ' , { con: 11 } ) , con: 11 , value : 120 , last: true
2013-11-30 21:55:25 +00:00
rogue:
2014-01-17 02:18:44 +00:00
#0: text: "Plain Clothing", notes:'Ordinary clothing. Confers no benefit.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' armorRogue1Text ' ) , notes: t ( ' armorRogue1Notes ' , { per: 6 } ) , per: 6 , value : 30
2 : text: t ( ' armorRogue2Text ' ) , notes: t ( ' armorRogue2Notes ' , { per: 9 } ) , per: 9 , value : 45
3 : text: t ( ' armorRogue3Text ' ) , notes: t ( ' armorRogue3Notes ' , { per: 12 } ) , per: 12 , value : 65
4 : text: t ( ' armorRogue4Text ' ) , notes: t ( ' armorRogue4Notes ' , { per: 15 } ) , per: 15 , value : 90
5 : text: t ( ' armorRogue5Text ' ) , notes: t ( ' armorRogue5Notes ' , { per: 18 } ) , per: 18 , value : 120 , last: true
2013-12-05 06:53:15 +00:00
wizard:
2013-12-06 22:41:11 +00:00
#0: text: "Apprentice Garb", notes:'For students of magic. Confers no benefit.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' armorWizard1Text ' ) , notes: t ( ' armorWizard1Notes ' , { int: 2 } ) , int: 2 , value : 30
2 : text: t ( ' armorWizard2Text ' ) , notes: t ( ' armorWizard2Notes ' , { int: 4 } ) , int: 4 , value : 45
3 : text: t ( ' armorWizard3Text ' ) , notes: t ( ' armorWizard3Notes ' , { int: 6 } ) , int: 6 , value : 65
4 : text: t ( ' armorWizard4Text ' ) , notes: t ( ' armorWizard4Notes ' , { int: 9 } ) , int: 9 , value : 90
5 : text: t ( ' armorWizard5Text ' ) , notes: t ( ' armorWizard5Notes ' , { int: 12 } ) , int: 12 , value : 120 , last: true
2013-11-30 21:55:25 +00:00
healer:
2013-12-06 22:41:11 +00:00
#0: text: "Novice Robe", notes:'For healers in training. Confers no benefit.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' armorHealer1Text ' ) , notes: t ( ' armorHealer1Notes ' , { con: 6 } ) , con: 6 , value : 30
2 : text: t ( ' armorHealer2Text ' ) , notes: t ( ' armorHealer2Notes ' , { con: 9 } ) , con: 9 , value : 45
3 : text: t ( ' armorHealer3Text ' ) , notes: t ( ' armorHealer3Notes ' , { con: 12 } ) , con: 12 , value : 65
4 : text: t ( ' armorHealer4Text ' ) , notes: t ( ' armorHealer4Notes ' , { con: 15 } ) , con: 15 , value : 90
5 : text: t ( ' armorHealer5Text ' ) , notes: t ( ' armorHealer5Notes ' , { con: 18 } ) , con: 18 , value : 120 , last: true
2013-11-30 21:55:25 +00:00
special:
2014-03-06 13:14:25 +00:00
0 : text: ( -> i18n . t ( ' armorSpecial0Text ' ) ) , notes: ( -> i18n . t ( ' armorSpecial0Notes ' , { con: 20 } ) ) , con: 20 , value : 150 , canOwn: ( (u)-> + u . backer ? . tier >= 45 )
1 : text: ( -> i18n . t ( ' armorSpecial1Text ' ) ) , notes: ( -> i18n . t ( ' armorSpecial1Notes ' , { attrs: 6 } ) ) , con: 6 , str: 6 , per: 6 , int: 6 , value : 170 , canOwn: ( (u)-> + u . contributor ? . level >= 2 )
2 : text: ( -> i18n . t ( ' armorSpecial2Text ' ) ) , notes: ( -> i18n . t ( ' armorSpecial2Notes ' , { attrs: 25 } ) ) , int: 25 , con: 25 , value : 200 , canOwn: ( (u)-> + u . backer ? . tier >= 300 )
2014-03-05 20:42:29 +00:00
#Winter event
2014-03-06 13:14:25 +00:00
yeti: event: events . winter , canOwn: ( (u)-> u . stats . class is ' warrior ' ) , text: ( -> i18n . t ( ' armorSpecialYetiText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialYetiNotes ' , { con: 9 } ) ) , con: 9 , value : 90
ski: event: events . winter , canOwn: ( (u)-> u . stats . class is ' rogue ' ) , text: ( -> i18n . t ( ' armorSpecialSkiText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialSkiText ' , { per: 15 } ) ) , per: 15 , value : 90
candycane: event: events . winter , canOwn: ( (u)-> u . stats . class is ' wizard ' ) , text: ( -> i18n . t ( ' armorSpecialCandycaneText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialCandycaneNotes ' , { int: 9 } ) ) , int: 9 , value : 90
snowflake: event: events . winter , canOwn: ( (u)-> u . stats . class is ' healer ' ) , text: ( -> i18n . t ( ' armorSpecialSnowflakeText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialSnowflakeNotes ' , { con: 15 } ) ) , con: 15 , value : 90
2014-03-05 20:42:29 +00:00
birthday: event: events . birthday , text: ( -> i18n . t ( ' armorSpecialBirthdayText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialBirthdayNotes ' ) ) , value: 0
2014-03-21 20:12:05 +00:00
# Spring Fling
2014-03-29 19:20:06 +00:00
springRogue: event: events . spring , specialClass: ' rogue ' , text: ( -> i18n . t ( ' armorSpecialSpringRogueText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialSpringRogueNotes ' , { per: 15 } ) ) , value: 90 , per: 15
springWarrior: event: events . spring , specialClass: ' warrior ' , text: ( -> i18n . t ( ' armorSpecialSpringWarriorText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialSpringWarriorNotes ' , { con: 9 } ) ) , value: 90 , con: 9
springMage: event: events . spring , specialClass: ' wizard ' , text: ( -> i18n . t ( ' armorSpecialSpringMageText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialSpringMageNotes ' , { int: 9 } ) ) , value: 90 , int: 9
springHealer: event: events . spring , specialClass: ' healer ' , text: ( -> i18n . t ( ' armorSpecialSpringHealerText ' ) ) , notes: ( -> i18n . t ( ' armorSpecialSpringHealerNotes ' , { con: 15 } ) ) , value: 90 , con: 15
2014-03-09 04:14:20 +00:00
mystery:
2014-03-09 09:49:46 +00:00
201402 : text: ( -> i18n . t ( ' armorMystery201402Text ' ) ) , notes: ( -> i18n . t ( ' armorMystery201402Notes ' ) ) , mystery : mystery [ ' 201402 ' ] , value: 10
2014-03-29 19:20:06 +00:00
201403 : text: ( -> i18n . t ( ' armorMystery201403Text ' ) ) , notes: ( -> i18n . t ( ' armorMystery201403Notes ' ) ) , mystery : mystery [ ' 201403 ' ] , value: 10
2014-01-07 00:14:17 +00:00
2013-11-30 21:55:25 +00:00
head:
2013-12-06 22:41:11 +00:00
base:
2014-03-10 18:36:32 +00:00
0 : text: t ( ' headBase0Text ' ) , notes: t ( ' headBase0Notes ' ) , value : 0
2013-12-06 22:41:11 +00:00
warrior:
#0: text: "No Helm", notes:'No headgear.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' headWarrior1Text ' ) , notes: t ( ' headWarrior1Notes ' , { str: 2 } ) , str: 2 , value : 15
2 : text: t ( ' headWarrior2Text ' ) , notes: t ( ' headWarrior2Notes ' , { str: 4 } ) , str: 4 , value : 25
3 : text: t ( ' headWarrior3Text ' ) , notes: t ( ' headWarrior3Notes ' , { str: 6 } ) , str: 6 , value : 40
4 : text: t ( ' headWarrior4Text ' ) , notes: t ( ' headWarrior4Notes ' , { str: 9 } ) , str: 9 , value : 60
5 : text: t ( ' headWarrior5Text ' ) , notes: t ( ' headWarrior5Notes ' , { str: 12 } ) , str: 12 , value : 80 , last: true
2013-11-30 21:55:25 +00:00
rogue:
2013-12-06 22:41:11 +00:00
#0: text: "No Hood", notes:'No headgear.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' headRogue1Text ' ) , notes: t ( ' headRogue1Notes ' , { per: 2 } ) , per: 2 , value : 15
2 : text: t ( ' headRogue2Text ' ) , notes: t ( ' headRogue2Notes ' , { per: 4 } ) , per: 4 , value : 25
3 : text: t ( ' headRogue3Text ' ) , notes: t ( ' headRogue3Notes ' , { per: 6 } ) , per: 6 , value : 40
4 : text: t ( ' headRogue4Text ' ) , notes: t ( ' headRogue4Notes ' , { per: 9 } ) , per: 9 , value : 60
5 : text: t ( ' headRogue5Text ' ) , notes: t ( ' headRogue5Notes ' , { per: 12 } ) , per: 12 , value : 80 , last: true
2013-12-05 06:53:15 +00:00
wizard:
2013-12-06 22:41:11 +00:00
#0: text: "No Hat", notes:'No headgear.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' headWizard1Text ' ) , notes: t ( ' headWizard1Notes ' , { per: 2 } ) , per: 2 , value : 15
2 : text: t ( ' headWizard2Text ' ) , notes: t ( ' headWizard2Notes ' , { per: 3 } ) , per: 3 , value : 25
3 : text: t ( ' headWizard3Text ' ) , notes: t ( ' headWizard3Notes ' , { per: 5 } ) , per: 5 , value : 40
4 : text: t ( ' headWizard4Text ' ) , notes: t ( ' headWizard4Notes ' , { per: 7 } ) , per: 7 , value : 60
5 : text: t ( ' headWizard5Text ' ) , notes: t ( ' headWizard5Notes ' , { per: 10 } ) , per: 10 , value : 80 , last: true
2013-11-30 21:55:25 +00:00
healer:
2013-12-06 22:41:11 +00:00
#0: text: "No Circlet", notes:'No headgear.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' headHealer1Text ' ) , notes: t ( ' headHealer1Notes ' , { int: 2 } ) , int: 2 , value : 15
2 : text: t ( ' headHealer2Text ' ) , notes: t ( ' headHealer2Notes ' , { int: 3 } ) , int: 3 , value : 25
3 : text: t ( ' headHealer3Text ' ) , notes: t ( ' headHealer3Notes ' , { int: 5 } ) , int: 5 , value : 40
4 : text: t ( ' headHealer4Text ' ) , notes: t ( ' headHealer4Notes ' , { int: 7 } ) , int: 7 , value : 60
5 : text: t ( ' headHealer5Text ' ) , notes: t ( ' headHealer5Notes ' , { int: 9 } ) , int: 9 , value : 80 , last: true
2013-11-30 21:55:25 +00:00
special:
2014-03-06 14:37:53 +00:00
0 : text: ( -> i18n . t ( ' headSpecial0Text ' ) ) , notes: ( -> i18n . t ( ' headSpecial0Notes ' , { int: 20 } ) ) , int: 20 , value : 150 , canOwn: ( (u)-> + u . backer ? . tier >= 45 )
1 : text: ( -> i18n . t ( ' headSpecial1Text ' ) ) , notes: ( -> i18n . t ( ' headSpecial1Notes ' , { attrs: 6 } ) ) , con: 6 , str: 6 , per: 6 , int: 6 , value : 170 , canOwn: ( (u)-> + u . contributor ? . level >= 3 )
2 : text: ( -> i18n . t ( ' headSpecial2Text ' ) ) , notes: ( -> i18n . t ( ' headSpecial2Notes ' , { attrs: 25 } ) ) , int: 25 , str: 25 , value : 200 , canOwn: ( (u)-> + u . backer ? . tier >= 300 )
2014-01-07 00:14:17 +00:00
#Winter event
2014-03-06 14:37:53 +00:00
nye: event: events . winter , text: ( -> i18n . t ( ' headSpecialNyeText ' ) ) , notes: ( -> i18n . t ( ' headSpecialNyeNotes ' ) ) , value: 0
yeti: event: events . winter , canOwn: ( (u)-> u . stats . class is ' warrior ' ) , text: ( -> i18n . t ( ' headSpecialYetiText ' ) ) , notes: ( -> i18n . t ( ' headSpecialYetiNotes ' , { str: 9 } ) ) , str: 9 , value : 60
ski: event: events . winter , canOwn: ( (u)-> u . stats . class is ' rogue ' ) , text: ( -> i18n . t ( ' headSpecialSkiText ' ) ) , notes: ( -> i18n . t ( ' headSpecialSkiNotes ' , { per: 9 } ) ) , per: 9 , value : 60
candycane: event: events . winter , canOwn: ( (u)-> u . stats . class is ' wizard ' ) , text: ( -> i18n . t ( ' headSpecialCanycaneText ' ) ) , notes: ( -> i18n . t ( ' headSpecialCanycaneNotes ' , { per: 7 } ) ) , per: 7 , value : 60
snowflake: event: events . winter , canOwn: ( (u)-> u . stats . class is ' healer ' ) , text: ( -> i18n . t ( ' headSpecialSnowflakeText ' ) ) , notes: ( -> i18n . t ( ' headSpecialSnowflakeNotes ' , { int: 7 } ) ) , int: 7 , value : 60
2014-03-21 20:12:05 +00:00
# Spring Fling
2014-03-29 19:20:06 +00:00
springRogue: event: events . spring , specialClass: ' rogue ' , text: ( -> i18n . t ( ' headSpecialSpringRogueText ' ) ) , notes: ( -> i18n . t ( ' headSpecialSpringRogueNotes ' , { per: 9 } ) ) , value: 40 , per: 9
springWarrior: event: events . spring , specialClass: ' warrior ' , text: ( -> i18n . t ( ' headSpecialSpringWarriorText ' ) ) , notes: ( -> i18n . t ( ' headSpecialSpringWarriorNotes ' , { str: 9 } ) ) , value: 40 , str: 9
springMage: event: events . spring , specialClass: ' wizard ' , text: ( -> i18n . t ( ' headSpecialSpringMageText ' ) ) , notes: ( -> i18n . t ( ' headSpecialSpringMageNotes ' , { per: 7 } ) ) , value: 40 , per: 7
springHealer: event: events . spring , specialClass: ' healer ' , text: ( -> i18n . t ( ' headSpecialSpringHealerText ' ) ) , notes: ( -> i18n . t ( ' headSpecialSpringHealerNotes ' , { int: 7 } ) ) , value: 40 , int: 7
2014-03-09 04:14:20 +00:00
mystery:
2014-03-10 18:36:32 +00:00
201402 : text: t ( ' headMystery201402Text ' ) , notes: t ( ' headMystery201402Notes ' ) , mystery : mystery [ ' 201402 ' ] , value: 10
2014-03-09 04:14:20 +00:00
2013-11-30 21:55:25 +00:00
shield:
2013-12-06 22:41:11 +00:00
base:
2014-03-10 18:36:32 +00:00
0 : text: t ( ' shieldBase0Text ' ) , notes: t ( ' shieldBase0Notes ' ) , value : 0
2014-01-26 19:53:02 +00:00
#changed because this is what shows up for all classes, including those without shields
2013-12-06 22:41:11 +00:00
warrior:
#0: text: "No Shield", notes:'No shield.', value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' shieldWarrior1Text ' ) , notes: t ( ' shieldWarrior1Notes ' , { con: 2 } ) , con: 2 , value : 20
2 : text: t ( ' shieldWarrior2Text ' ) , notes: t ( ' shieldWarrior2Notes ' , { con: 3 } ) , con: 3 , value : 35
3 : text: t ( ' shieldWarrior3Text ' ) , notes: t ( ' shieldWarrior3Notes ' , { con: 5 } ) , con: 5 , value : 50
4 : text: t ( ' shieldWarrior4Text ' ) , notes: t ( ' shieldWarrior4Notes ' , { con: 7 } ) , con: 7 , value : 70
5 : text: t ( ' shieldWarrior5Text ' ) , notes: t ( ' shieldWarrior5Notes ' , { con: 9 } ) , con: 9 , value : 90 , last: true
2013-11-30 21:55:25 +00:00
rogue:
2014-03-10 18:36:32 +00:00
0 : text: t ( ' weaponRogue0Text ' ) , notes: t ( ' weaponRogue0Notes ' ) , str: 0 , value: 0
1 : text: t ( ' weaponRogue1Text ' ) , notes: t ( ' weaponRogue1Notes ' , { str: 2 } ) , str: 2 , value: 20
2 : text: t ( ' weaponRogue2Text ' ) , notes: t ( ' weaponRogue2Notes ' , { str: 3 } ) , str: 3 , value: 35
3 : text: t ( ' weaponRogue3Text ' ) , notes: t ( ' weaponRogue3Notes ' , { str: 4 } ) , str: 4 , value: 50
4 : text: t ( ' weaponRogue4Text ' ) , notes: t ( ' weaponRogue4Notes ' , { str: 6 } ) , str: 6 , value: 70
5 : text: t ( ' weaponRogue5Text ' ) , notes: t ( ' weaponRogue5Notes ' , { str: 8 } ) , str: 8 , value: 90
6 : text: t ( ' weaponRogue6Text ' ) , notes: t ( ' weaponRogue6Notes ' , { str: 10 } ) , str: 10 , value: 120 , last: true
2013-12-06 22:41:11 +00:00
wizard: { }
#0: text: "No Shield", notes:'No shield.', def: 0, value:0, last: true
2013-11-30 21:55:25 +00:00
healer:
2013-12-06 22:41:11 +00:00
#0: text: "No Shield", notes:'No shield.', def: 0, value:0
2014-03-10 18:36:32 +00:00
1 : text: t ( ' shieldHealer1Text ' ) , notes: t ( ' shieldHealer1Notes ' , { con: 2 } ) , con: 2 , value : 20
2 : text: t ( ' shieldHealer2Text ' ) , notes: t ( ' shieldHealer2Notes ' , { con: 4 } ) , con: 4 , value : 35
3 : text: t ( ' shieldHealer3Text ' ) , notes: t ( ' shieldHealer3Notes ' , { con: 6 } ) , con: 6 , value : 50
4 : text: t ( ' shieldHealer4Text ' ) , notes: t ( ' shieldHealer4Notes ' , { con: 9 } ) , con: 9 , value : 70
5 : text: t ( ' shieldHealer5Text ' ) , notes: t ( ' shieldHealer5Notes ' , { con: 12 } ) , con: 12 , value : 90 , last: true
2013-11-30 21:55:25 +00:00
special:
2014-03-06 16:03:02 +00:00
0 : text: ( -> i18n . t ( ' shieldSpecial0Text ' ) ) , notes: ( -> i18n . t ( ' shieldSpecial0Notes ' , { per: 20 } ) ) , per: 20 , value : 150 , canOwn: ( (u)-> + u . backer ? . tier >= 45 )
1 : text: ( -> i18n . t ( ' shieldSpecial1Text ' ) ) , notes: ( -> i18n . t ( ' shieldSpecial1Notes ' , { attrs: 6 } ) ) , con: 6 , str: 6 , per: 6 , int : 6 , value : 170 , canOwn: ( (u)-> + u . contributor ? . level >= 5 )
2014-01-07 00:14:17 +00:00
#Winter event
2014-03-06 16:03:02 +00:00
yeti: event: events . winter , canOwn: ( (u)-> u . stats . class is ' warrior ' ) , text: ( -> i18n . t ( ' shieldSpecialYetiText ' ) ) , notes: ( -> i18n . t ( ' shieldSpecialYetiNotes ' , { con: 7 } ) ) , con: 7 , value: 70
2014-03-08 15:08:17 +00:00
ski: event: events . winter , canOwn: ( (u)-> u . stats . class is ' rogue ' ) , text: ( -> i18n . t ( ' weaponSpecialSkiText ' ) ) , notes: ( -> i18n . t ( ' weaponSpecialSkiNotes ' , { str: 8 } ) ) , str: 8 , value: 90
2014-03-06 16:03:02 +00:00
snowflake: event: events . winter , canOwn: ( (u)-> u . stats . class is ' healer ' ) , text: ( -> i18n . t ( ' shieldSpecialSnowflakeText ' ) ) , notes: ( -> i18n . t ( ' shieldSpecialSnowflakeNotes ' , { con: 9 } ) ) , con: 9 , value: 70
2014-03-21 20:12:05 +00:00
#Spring Fling
2014-03-29 19:20:06 +00:00
springRogue: event: events . spring , specialClass: ' rogue ' , text: ( -> i18n . t ( ' shieldSpecialSpringRogueText ' ) ) , notes: ( -> i18n . t ( ' shieldSpecialSpringRogueNotes ' , { str: 8 } ) ) , value: 80 , str: 8
springWarrior: event: events . spring , specialClass: ' warrior ' , text: ( -> i18n . t ( ' shieldSpecialSpringWarriorText ' ) ) , notes: ( -> i18n . t ( ' shieldSpecialSpringWarriorNotes ' , { con: 7 } ) ) , value: 70 , con: 7
springHealer: event: events . spring , specialClass: ' healer ' , text: ( -> i18n . t ( ' shieldSpecialSpringHealerText ' ) ) , notes: ( -> i18n . t ( ' shieldSpecialSpringHealerNotes ' , { con: 9 } ) ) , value: 70 , con: 9
2014-01-07 00:14:17 +00:00
2014-02-23 04:40:50 +00:00
back:
base:
2014-03-06 16:03:02 +00:00
0 : text: ( -> i18n . t ( ' backBase0Text ' ) ) , notes: ( -> i18n . t ( ' backBase0Notes ' ) ) , value : 0
2014-03-09 04:14:20 +00:00
mystery:
2014-03-10 18:36:32 +00:00
201402 : text: t ( ' backMystery201402Text ' ) , notes: t ( ' backMystery201402Notes ' ) , mystery : mystery [ ' 201402 ' ] , value: 10
2014-04-24 23:42:36 +00:00
201404 : text: ' Twilight Butterfly Wings ' , notes: " Be a butterfly and flutter by! " , mystery : mystery [ ' 201404 ' ] , value: 10
2014-04-16 23:45:23 +00:00
special:
wondercon_red: text: ' Mighty Cape ' , notes: ' Swishes with strength and beauty. Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
wondercon_black: text: ' Sneaky Cape ' , notes: ' Spun of shadows and whispers. Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
body:
base:
0 : text: " No Body Accessory " , notes : ' No Body Accessory. ' , value : 0
special:
wondercon_red: text: ' Ruby Collar ' , notes: ' An attractive ruby collar! Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
wondercon_gold: text: ' Golden Collar ' , notes: ' An attractive gold collar! Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
wondercon_black: text: ' Ebony Collar ' , notes: ' An attractive ebony collar! Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
2014-02-23 04:40:50 +00:00
2014-03-21 20:12:05 +00:00
headAccessory:
base:
2014-03-29 19:20:06 +00:00
0 : text: ( -> i18n . t ( ' headAccessoryBase0Text ' ) ) , notes: ( -> i18n . t ( ' headAccessoryBase0Notes ' ) ) , value: 0 , last: true
2014-03-21 20:12:05 +00:00
special:
# Spring Event
2014-03-29 19:20:06 +00:00
springRogue: event: events . spring , specialClass: ' rogue ' , text: ( -> i18n . t ( ' headAccessorySpecialSpringRogueText ' ) ) , notes: ( -> i18n . t ( ' headAccessorySpecialSpringRogueNotes ' ) ) , value: 20
springWarrior: event: events . spring , specialClass: ' warrior ' , text: ( -> i18n . t ( ' headAccessorySpecialSpringWarriorText ' ) ) , notes: ( -> i18n . t ( ' headAccessorySpecialSpringWarriorNotes ' ) ) , value: 20
springMage: event: events . spring , specialClass: ' wizard ' , text: ( -> i18n . t ( ' headAccessorySpecialSpringMageText ' ) ) , notes: ( -> i18n . t ( ' headAccessorySpecialSpringMageNotes ' ) ) , value: 20
springHealer: event: events . spring , specialClass: ' healer ' , text: ( -> i18n . t ( ' headAccessorySpecialSpringHealerText ' ) ) , notes: ( -> i18n . t ( ' headAccessorySpecialSpringHealerNotes ' ) ) , value: 20
2014-04-16 23:45:23 +00:00
wondercon_red: text: ' Mighty Mask ' , notes: ' What a powerful face accessory! Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
wondercon_black: text: ' Sneaky Mask ' , notes: ' Your motives are definitely legitimate. Special edition convention armor. ' , value: 0 , mystery : mystery . wondercon
2014-03-25 05:36:14 +00:00
mystery:
2014-03-29 19:20:06 +00:00
201403 : text: ( -> i18n . t ( ' headAccessoryMistery201403Text ' ) ) , notes: ( -> i18n . t ( ' headAccessoryMistery201403Notes ' ) ) , mystery : mystery [ ' 201403 ' ] , value: 10
2014-04-24 23:42:36 +00:00
201404 : text: ' Twilight Butterfly Antennae ' , notes: " These antennae help the wearer sense dangerous distractions! " , mystery : mystery [ ' 201404 ' ] , value: 10
2014-03-21 20:12:05 +00:00
2013-11-22 19:35:27 +00:00
# ##
2014-03-24 02:18:09 +00:00
The gear is exported as a tree ( defined above ) , and a flat list ( eg , { weapon_healer_1: . . , shield_special_0: . . . } ) since
they are needed in different froms at different points in the app
2013-11-30 21:55:25 +00:00
# ##
2013-12-11 16:30:07 +00:00
api.gear =
2013-11-30 21:55:25 +00:00
tree: gear
flat: { }
2013-11-22 19:35:27 +00:00
2014-01-10 04:33:01 +00:00
_ . each gearTypes , (type) ->
2014-02-23 04:41:48 +00:00
_ . each classes . concat ( [ ' base ' , ' special ' , ' mystery ' ] ) , (klass) ->
2013-11-22 19:35:27 +00:00
# add "type" to each item, so we can reference that as "weapon" or "armor" in the html
2013-12-05 22:48:13 +00:00
_ . each gear [ type ] [ klass ] , (item, i) ->
key = " #{ type } _ #{ klass } _ #{ i } "
_ . defaults item , { type , key , klass , index: i , str : 0 , int : 0 , per : 0 , con : 0 }
2014-01-06 21:43:01 +00:00
if item . event
#? indicates null/undefined. true means they own currently, false means they once owned - and false is what we're
# after (they can buy back if they bought it during the event's timeframe)
_canOwn = item . canOwn or ( -> true )
item.canOwn = (u)->
2014-03-21 20:12:05 +00:00
_canOwn ( u ) and
( u . items . gear . owned [ key ] ? or ( moment ( ) . isAfter ( item . event . start ) and moment ( ) . isBefore ( item . event . end ) ) ) and
( if item . specialClass then ( u . stats . class is item . specialClass ) else true )
2014-01-06 21:43:01 +00:00
2014-03-09 23:23:22 +00:00
if item . mystery
item.canOwn = (u)-> u . items . gear . owned [ key ] ?
2013-12-11 16:30:07 +00:00
api . gear . flat [ key ] = item
2013-11-22 19:35:27 +00:00
# ##
2014-03-24 02:18:09 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Potion
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2013-11-22 19:35:27 +00:00
# ##
2014-03-10 18:36:32 +00:00
api.potion = type: ' potion ' , text: t ( ' potionText ' ) , notes: t ( ' potionNotes ' ) , value: 25 , key: ' potion '
2013-11-22 19:35:27 +00:00
2014-01-10 04:33:01 +00:00
# ##
2014-03-24 02:18:09 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Classes
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2014-01-10 04:33:01 +00:00
# ##
api.classes = classes
# ##
2014-03-24 02:18:09 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gear Types
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2014-01-10 04:33:01 +00:00
# ##
api.gearTypes = gearTypes
2013-11-22 19:35:27 +00:00
# ##
2014-03-24 02:18:09 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Spells
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Text , notes , and mana are obvious . The rest:
* { target } : one of [ task , self , party , user ] . This is very important , because if the cast ( ) function is expecting one
thing and receives another , it will cause errors . ` self ` is used for self buffs , multi - task debuffs , AOEs ( eg , meteor - shower ) ,
etc . Basically , use self for anything that ' s not [task, party, user] and is an instant-cast
* { cast } : the function that ' s run to perform the ability ' s action . This is pretty slick - because this is exported to the
web , this function can be performed on the client and on the server . ` user ` param is self ( needed for determining your
own stats for effectiveness of cast ) , and ` target ` param is one of [ task , party , user ] . In the case of ` self ` spells ,
you act on ` user ` instead of ` target ` . You can trust these are the correct objects , as long as the ` target ` attr of the
spell is correct . Take a look at habitrpg / src / models / user . js and habitrpg / src / models / task . js for what attributes are
available on each model . Note ` task . value ` is its " redness " . If party is passed in , it ' s an array of users,
so you ' ll want to iterate over them like: `_.each(target,function(member){...})`
Note , user . stats . mp is docked after automatically ( it ' s appended to functions automatically down below in an _.each)
2013-11-22 19:35:27 +00:00
# ##
2013-12-29 23:58:45 +00:00
#
diminishingReturns = (bonus, max, halfway=max/2) -> max * ( bonus / ( bonus + halfway ) )
2013-12-11 16:30:07 +00:00
api.spells =
2013-12-18 17:39:10 +00:00
2013-11-22 19:35:27 +00:00
wizard:
fireball:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWizardFireballText ' )
2013-11-22 19:35:27 +00:00
mana: 10
2013-12-21 22:05:04 +00:00
lvl: 11
2013-11-22 19:35:27 +00:00
target: ' task '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWizardFireballNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2013-12-29 23:58:45 +00:00
# I seriously have no idea what I'm doing here. I'm just mashing buttons until numbers seem right-ish. Anyone know math?
bonus = user . _statsComputed . int * user . fns . crit ( ' per ' )
target . value += diminishingReturns ( bonus * . 02 , 4 )
bonus *= Math . ceil ( ( if target . value < 0 then 1 else target . value + 1 ) * . 075 )
#console.log {bonus, expBonus:bonus,upBonus:bonus*.1}
user . stats . exp += diminishingReturns ( bonus , 75 )
user . party . quest . progress . up += diminishingReturns ( bonus * . 1 , 50 , 30 ) if user . party . quest . key
2013-12-18 17:39:10 +00:00
mpheal:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWizardMPHealText ' )
2013-12-18 17:39:10 +00:00
mana: 30
2013-12-21 22:05:04 +00:00
lvl: 12
2013-12-18 17:39:10 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWizardMPHealNotes ' ) ,
2013-12-18 17:39:10 +00:00
cast: (user, target)->
_ . each target , (member) ->
2013-12-21 17:56:05 +00:00
bonus = Math . ceil ( user . _statsComputed . int * . 1 )
2013-12-18 17:39:10 +00:00
bonus = 25 if bonus > 25 #prevent ability to replenish own mp infinitely
member . stats . mp += bonus
earth:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWizardEarthText ' )
2013-11-22 19:35:27 +00:00
mana: 35
2013-12-21 22:05:04 +00:00
lvl: 13
2013-11-22 19:35:27 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWizardEarthNotes ' ) ,
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
_ . each target , (member) ->
2013-12-18 17:05:24 +00:00
member . stats . buffs . int ? = 0
2013-12-21 17:56:05 +00:00
member . stats . buffs . int += Math . ceil ( user . _statsComputed . int * . 05 )
2013-12-18 17:39:10 +00:00
frost:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWizardFrostText ' ) ,
2013-12-18 17:39:10 +00:00
mana: 40
2013-12-21 22:05:04 +00:00
lvl: 14
2013-12-18 17:39:10 +00:00
target: ' self '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWizardFrostNotes ' ) ,
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2013-12-18 17:39:10 +00:00
user.stats.buffs.streaks = true
2013-11-22 19:35:27 +00:00
warrior:
smash:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWarriorSmashText ' )
2013-11-22 19:35:27 +00:00
mana: 10
2013-12-21 22:05:04 +00:00
lvl: 11
2013-11-22 19:35:27 +00:00
target: ' task '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWarriorSmashNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2014-05-01 02:38:26 +00:00
target . value += 2.5 * ( user . _statsComputed . str / ( user . _statsComputed . str + 50 ) ) * user . fns . crit ( ' con ' )
2013-12-26 03:36:26 +00:00
user . party . quest . progress . up += Math . ceil ( user . _statsComputed . str * . 2 ) if user . party . quest . key
2013-11-22 19:35:27 +00:00
defensiveStance:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWarriorDefensiveStanceText ' )
2013-11-22 19:35:27 +00:00
mana: 25
2013-12-21 22:05:04 +00:00
lvl: 12
2013-11-22 19:35:27 +00:00
target: ' self '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWarriorDefensiveStanceNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2013-12-18 17:05:24 +00:00
user . stats . buffs . con ? = 0
2013-12-21 17:56:05 +00:00
user . stats . buffs . con += Math . ceil ( user . _statsComputed . con * . 05 )
2013-11-22 19:35:27 +00:00
valorousPresence:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWarriorValorousPresenceText ' )
2013-11-22 19:35:27 +00:00
mana: 20
2013-12-21 22:05:04 +00:00
lvl: 13
2013-11-22 19:35:27 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWarriorValorousPresenceNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
_ . each target , (member) ->
2013-12-18 17:05:24 +00:00
member . stats . buffs . str ? = 0
2013-12-21 17:56:05 +00:00
member . stats . buffs . str += Math . ceil ( user . _statsComputed . str * . 05 )
2013-11-22 19:35:27 +00:00
intimidate:
2014-03-10 18:36:32 +00:00
text: t ( ' spellWarriorIntimidateText ' )
2013-11-22 19:35:27 +00:00
mana: 15
2013-12-21 22:05:04 +00:00
lvl: 14
2013-11-22 19:35:27 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellWarriorIntimidateNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
_ . each target , (member) ->
2013-12-18 17:05:24 +00:00
member . stats . buffs . con ? = 0
2014-03-24 02:18:09 +00:00
member . stats . buffs . con += Math . ceil ( user . _statsComputed . con * . 03 )
2013-11-22 19:35:27 +00:00
rogue:
pickPocket:
2014-03-10 18:36:32 +00:00
text: t ( ' spellRoguePickPocketText ' )
2013-11-22 19:35:27 +00:00
mana: 10
2013-12-21 22:05:04 +00:00
lvl: 11
2013-11-22 19:35:27 +00:00
target: ' task '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellRoguePickPocketNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2014-02-02 08:24:28 +00:00
bonus = ( if target . value < 0 then 1 else target . value + 2 ) + ( user . _statsComputed . per * 0.5 )
user . stats . gp += 25 * ( bonus / ( bonus + 75 ) )
2013-11-22 19:35:27 +00:00
backStab:
2014-03-10 18:36:32 +00:00
text: t ( ' spellRogueBackStabText ' )
2013-11-22 19:35:27 +00:00
mana: 15
2013-12-21 22:05:04 +00:00
lvl: 12
2013-11-22 19:35:27 +00:00
target: ' task '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellRogueBackStabNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2014-05-01 02:38:26 +00:00
_crit = user . fns . crit ( ' str ' , . 3 )
2013-12-18 17:05:24 +00:00
target . value += _crit * . 03
2014-03-24 02:18:09 +00:00
bonus = ( if target . value < 0 then 1 else target . value + 1 ) * _crit
2013-12-18 17:05:24 +00:00
user . stats . exp += bonus
user . stats . gp += bonus
2013-12-26 03:36:26 +00:00
# user.party.quest.progress.up += bonus if user.party.quest.key # remove hurting bosses for rogues, seems OP for now
2013-12-18 17:09:57 +00:00
toolsOfTrade:
2014-03-10 18:36:32 +00:00
text: t ( ' spellRogueToolsOfTradeText ' )
2013-12-18 17:09:57 +00:00
mana: 25
2013-12-21 22:05:04 +00:00
lvl: 13
2013-11-22 19:35:27 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellRogueToolsOfTradeNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
## lasts 24 hours ##
_ . each target , (member) ->
2013-12-18 17:05:24 +00:00
member . stats . buffs . per ? = 0
2013-12-21 17:56:05 +00:00
member . stats . buffs . per += Math . ceil ( user . _statsComputed . per * . 03 )
2013-12-20 01:17:37 +00:00
stealth:
2014-03-10 18:36:32 +00:00
text: t ( ' spellRogueStealthText ' )
2013-12-20 03:34:29 +00:00
mana: 45
2013-12-21 22:05:04 +00:00
lvl: 14
2013-12-20 01:17:37 +00:00
target: ' self '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellRogueStealthNotes ' )
2013-12-20 01:17:37 +00:00
cast: (user, target) ->
user . stats . buffs . stealth ? = 0
2014-02-06 00:28:30 +00:00
## scales to user's # of dailies; maxes out at 100% at 100 per ##
user . stats . buffs . stealth += Math . ceil ( user . dailys . length * user . _statsComputed . per / 100 )
2013-11-22 19:35:27 +00:00
healer:
heal:
2014-03-10 18:36:32 +00:00
text: t ( ' spellHealerHealText ' )
2013-11-22 19:35:27 +00:00
mana: 15
2013-12-21 22:05:04 +00:00
lvl: 11
2013-11-22 19:35:27 +00:00
target: ' self '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellHealerHealNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2013-12-21 17:56:05 +00:00
user . stats . hp += ( user . _statsComputed . con + user . _statsComputed . int + 5 ) * . 075
2013-12-16 19:54:46 +00:00
user.stats.hp = 50 if user . stats . hp > 50
2013-11-22 19:35:27 +00:00
brightness:
2014-03-10 18:36:32 +00:00
text: t ( ' spellHealerBrightnessText ' )
2013-11-22 19:35:27 +00:00
mana: 15
2013-12-21 22:05:04 +00:00
lvl: 12
2013-11-22 19:35:27 +00:00
target: ' self '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellHealerBrightnessNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
2013-12-05 17:32:14 +00:00
_ . each user . tasks , (target) ->
2013-12-16 19:54:46 +00:00
return if target . type is ' reward '
2014-02-01 19:18:09 +00:00
target . value += 1.5 * ( user . _statsComputed . int / ( user . _statsComputed . int + 40 ) )
2013-11-22 19:35:27 +00:00
protectAura:
2014-03-10 18:36:32 +00:00
text: t ( ' spellHealerProtectAuraText ' )
2013-11-22 19:35:27 +00:00
mana: 30
2013-12-21 22:05:04 +00:00
lvl: 13
2013-11-22 19:35:27 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellHealerProtectAuraNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
## lasts 24 hours ##
_ . each target , (member) ->
2013-12-18 17:05:24 +00:00
member . stats . buffs . con ? = 0
2013-12-21 17:56:05 +00:00
member . stats . buffs . con += Math . ceil ( user . _statsComputed . con * . 15 )
2013-11-22 19:35:27 +00:00
heallAll:
2014-03-10 18:36:32 +00:00
text: t ( ' spellHealerHealAllText ' )
2013-11-22 19:35:27 +00:00
mana: 25
2013-12-21 22:05:04 +00:00
lvl: 14
2013-11-22 19:35:27 +00:00
target: ' party '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellHealerHealAllNotes ' )
2013-11-22 19:35:27 +00:00
cast: (user, target) ->
_ . each target , (member) ->
2013-12-21 17:56:05 +00:00
member . stats . hp += ( user . _statsComputed . con + user . _statsComputed . int + 5 ) * . 04
2013-12-16 19:54:46 +00:00
member.stats.hp = 50 if member . stats . hp > 50
2013-11-07 21:11:35 +00:00
2013-12-20 17:21:24 +00:00
special:
snowball:
2014-03-10 18:36:32 +00:00
text: t ( ' spellSpecialSnowballText ' )
2013-12-20 17:21:24 +00:00
mana: 0
value: 1
target: ' user '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellSpecialSnowballNotes ' )
2013-12-20 17:21:24 +00:00
cast: (user, target) ->
target.stats.buffs.snowball = true
2013-12-21 02:55:01 +00:00
target . achievements . snowball ? = 0
target . achievements . snowball ++
2013-12-20 17:21:24 +00:00
user . items . special . snowball - -
2013-12-21 01:34:14 +00:00
salt:
2014-03-10 18:36:32 +00:00
text: t ( ' spellSpecialSaltText ' )
2013-12-21 01:34:14 +00:00
mana: 0
value: 5
target: ' self '
2014-03-10 18:36:32 +00:00
notes: t ( ' spellSpecialSaltNotes ' )
2013-12-21 01:34:14 +00:00
cast: (user, target) ->
user.stats.buffs.snowball = false
user . stats . gp -= 5
2013-11-22 19:35:27 +00:00
# Intercept all spells to reduce user.stats.mp after casting the spell
2013-12-11 16:30:07 +00:00
_ . each api . spells , (spellClass) ->
2013-12-20 19:42:31 +00:00
_ . each spellClass , (spell, key) ->
spell.key = key
2013-11-22 19:35:27 +00:00
_cast = spell . cast
spell.cast = (user, target) ->
#return if spell.target and spell.target != (if target.type then 'task' else 'user')
_cast ( user , target )
2013-12-17 23:43:10 +00:00
user . stats . mp -= spell . mana
2013-11-22 19:35:27 +00:00
2013-12-20 17:21:24 +00:00
api.special = api . spells . special
2013-11-22 19:35:27 +00:00
# ##
2014-03-24 02:18:09 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Drops
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2013-11-22 19:35:27 +00:00
# ##
2013-05-19 17:01:01 +00:00
2014-02-09 00:56:07 +00:00
api.dropEggs =
# value & other defaults set below
2014-03-10 18:36:32 +00:00
Wolf: text: t ( ' dropEggWolfText ' ) , adjective: t ( ' dropEggWolfAdjective ' )
TigerCub: text: t ( ' dropEggTigerCubText ' ) , mountText: t ( ' dropEggTigerCubMountText ' ) , adjective: t ( ' dropEggTigerCubAdjective ' )
PandaCub: text: t ( ' dropEggPandaCubText ' ) , mountText: t ( ' dropEggPandaCubMountText ' ) , adjective: t ( ' dropEggPandaCubAdjective ' )
LionCub: text: t ( ' dropEggLionCubText ' ) , mountText: t ( ' dropEggLionCubMountText ' ) , adjective: t ( ' dropEggLionCubAdjective ' )
Fox: text: t ( ' dropEggFoxText ' ) , adjective: t ( ' dropEggFoxAdjective ' )
FlyingPig: text: t ( ' dropEggFlyingPigText ' ) , adjective: t ( ' dropEggFlyingPigAdjective ' )
Dragon: text: t ( ' dropEggDragonText ' ) , adjective: t ( ' dropEggDragonAdjective ' )
Cactus: text: t ( ' dropEggCactusText ' ) , adjective: t ( ' dropEggCactusAdjective ' )
BearCub: text: t ( ' dropEggBearCubText ' ) , mountText: t ( ' dropEggBearCubMountText ' ) , adjective: t ( ' dropEggBearCubAdjective ' )
2014-02-09 00:56:07 +00:00
_ . each api . dropEggs , (egg,key) ->
_ . defaults egg ,
canBuy : true
value: 3
key: key
2014-03-10 18:36:32 +00:00
notes: t ( ' eggNotes ' , { eggText: egg . text , eggAdjective: egg . adjective } )
2014-02-09 00:56:07 +00:00
mountText: egg . text
api.questEggs =
# value & other defaults set below
2014-03-08 18:44:24 +00:00
Gryphon: text: ( -> i18n . t ( ' questEggGryphonText ' ) ) , adjective: ( -> i18n . t ( ' questEggGryphonAdjective ' ) ) , canBuy: false
Hedgehog: text: ( -> i18n . t ( ' questEggHedgehogText ' ) ) , adjective: ( -> i18n . t ( ' questEggHedgehogAdjective ' ) ) , canBuy: false
2014-03-29 19:20:06 +00:00
Deer: text: ( -> i18n . t ( ' questEggDeerText ' ) ) , adjective: ( -> i18n . t ( ' questEggDeerAdjective ' ) ) , canBuy: false
Egg: text: ( -> i18n . t ( ' questEggEggText ' ) ) , adjective: ( -> i18n . t ( ' questEggEggAdjective ' ) ) , canBuy: false
2014-02-09 00:56:07 +00:00
_ . each api . questEggs , (egg,key) ->
_ . defaults egg ,
canBuy : false
value: 3
key: key
2014-03-10 18:36:32 +00:00
notes: t ( ' eggNotes ' , { eggText: egg . text , eggAdjective: egg . adjective } )
2014-02-09 00:56:07 +00:00
mountText: egg . text
2014-02-09 04:14:50 +00:00
api.eggs = _ . assign ( _ . cloneDeep ( api . dropEggs ) , api . questEggs )
2013-12-11 16:30:07 +00:00
api.specialPets =
2014-03-24 02:18:09 +00:00
' Wolf-Veteran ' : true
' Wolf-Cerberus ' : true
' Dragon-Hydra ' : true
' Turkey-Base ' : true
' BearCub-Polar ' : true
2013-12-02 02:24:20 +00:00
2014-02-09 00:56:07 +00:00
api.specialMounts =
2014-03-24 02:18:09 +00:00
' BearCub-Polar ' : true
' LionCub-Ethereal ' : true
2014-02-09 00:56:07 +00:00
2013-12-11 16:30:07 +00:00
api.hatchingPotions =
2014-03-10 18:36:32 +00:00
Base: value: 2 , text: t ( ' hatchingPotionBase ' )
White: value: 2 , text: t ( ' hatchingPotionWhite ' )
Desert: value: 2 , text: t ( ' hatchingPotionDesert ' )
Red: value: 3 , text: t ( ' hatchingPotionRed ' )
Shade: value: 3 , text: t ( ' hatchingPotionShade ' )
Skeleton: value: 3 , text: t ( ' hatchingPotionSkeleton ' )
Zombie: value: 4 , text: t ( ' hatchingPotionZombie ' )
CottonCandyPink: value: 4 , text: t ( ' hatchingPotionCottonCandyPink ' )
CottonCandyBlue: value: 4 , text: t ( ' hatchingPotionCottonCandyBlue ' )
Golden: value: 5 , text: t ( ' hatchingPotionGolden ' )
2013-12-20 19:42:31 +00:00
_ . each api . hatchingPotions , (pot,key) ->
2014-03-10 18:36:32 +00:00
_ . defaults pot , { key , value: 2 , notes: t ( ' hatchingPotionNotes ' , { potText: pot . text } ) }
2013-11-11 03:38:06 +00:00
2014-02-09 00:56:07 +00:00
api.pets = _ . transform api . dropEggs , (m, egg) ->
_ . defaults m , _ . transform api . hatchingPotions , (m2, pot) ->
m2 [ egg . key + " - " + pot . key ] = true
api.questPets = _ . transform api . questEggs , (m, egg) ->
2014-01-02 23:30:14 +00:00
_ . defaults m , _ . transform api . hatchingPotions , (m2, pot) ->
m2 [ egg . key + " - " + pot . key ] = true
2013-12-11 16:30:07 +00:00
api.food =
2014-03-10 18:36:32 +00:00
Meat: text: t ( ' foodMeat ' ) , target: ' Base ' , article: ' '
Milk: text: t ( ' foodMilk ' ) , target: ' White ' , article: ' '
Potatoe: text: t ( ' foodPotatoe ' ) , target: ' Desert ' , article: ' a '
Strawberry: text: t ( ' foodStrawberry ' ) , target: ' Red ' , article: ' a '
Chocolate: text: t ( ' foodChocolate ' ) , target: ' Shade ' , article: ' '
Fish: text: t ( ' foodFish ' ) , target: ' Skeleton ' , article: ' a '
RottenMeat: text: t ( ' foodRottenMeat ' ) , target: ' Zombie ' , article: ' '
CottonCandyPink: text: t ( ' foodCottonCandyPink ' ) , target: ' CottonCandyPink ' , article: ' '
CottonCandyBlue: text: t ( ' foodCottonCandyBlue ' ) , target: ' CottonCandyBlue ' , article: ' '
2013-11-22 19:35:27 +00:00
# FIXME what to do with these extra items? Should we add "targets" (plural) for food instead of singular, so we don't have awkward extras?
2014-03-24 02:18:09 +00:00
#Cheese: text: 'Cheese', target: 'Golden'
#Watermelon: text: 'Watermelon', target: 'Golden'
#SeaWeed: text: 'SeaWeed', target: 'Golden'
2014-01-31 02:19:30 +00:00
2014-03-10 18:36:32 +00:00
Cake_Skeleton: canBuy: false , text: t ( ' foodCakeSkeleton ' ) , target: ' Skeleton ' , article: ' '
Cake_Base: canBuy: false , text: t ( ' foodCakeBase ' ) , target: ' Base ' , article: ' '
Cake_CottonCandyBlue: canBuy: false , text: t ( ' foodCakeCottonCandyBlue ' ) , target: ' CottonCandyBlue ' , article: ' '
Cake_CottonCandyPink: canBuy: false , text: t ( ' foodCakeCottonCandyPink ' ) , target: ' CottonCandyPink ' , article: ' '
Cake_Shade: canBuy: false , text: t ( ' foodCakeShade ' ) , target: ' Shade ' , article: ' '
Cake_White: canBuy: false , text: t ( ' foodCakeWhite ' ) , target: ' White ' , article: ' '
Cake_Golden: canBuy: false , text: t ( ' foodCakeGolden ' ) , target: ' Golden ' , article: ' '
Cake_Zombie: canBuy: false , text: t ( ' foodCakeZombie ' ) , target: ' Zombie ' , article: ' '
Cake_Desert: canBuy: false , text: t ( ' foodCakeDesert ' ) , target: ' Desert ' , article: ' '
Cake_Red: canBuy: false , text: t ( ' foodCakeRed ' ) , target: ' Red ' , article: ' '
2014-01-31 02:19:30 +00:00
2014-01-31 02:31:36 +00:00
# Tests hack, put honey last so the faux random picks it up in unit tests
2014-03-10 18:36:32 +00:00
Honey: text: t ( ' foodHoney ' ) , target: ' Golden ' , article: ' '
2014-01-31 02:31:36 +00:00
2014-03-10 18:36:32 +00:00
Saddle: text: t ( ' foodSaddleText ' ) , value: 5 , notes: t ( ' foodSaddleNotes ' )
2013-12-20 19:42:31 +00:00
_ . each api . food , (food,key) ->
2014-03-10 18:36:32 +00:00
_ . defaults food , { value: 1 , key , notes: t ( ' foodNotes ' ) , canBuy : true }
2013-12-20 19:42:31 +00:00
api.quests =
2013-12-24 17:24:45 +00:00
evilsanta:
2014-02-01 15:39:21 +00:00
canBuy : false
2014-03-10 18:36:32 +00:00
text: t ( ' questEvilSantaText ' ) # title of the quest (eg, Deep into Vice's Layer)
notes: t ( ' questEvilSantaNotes ' )
completion: t ( ' questEvilSantaCompletion ' )
2013-12-24 17:24:45 +00:00
value: 4 # Gem cost to buy, GP sell-back
2013-12-20 19:42:31 +00:00
#mechanic: enum['perfectDailies', ...]
2013-12-24 17:24:45 +00:00
boss:
2014-03-10 18:36:32 +00:00
name: t ( ' questEvilSantaBoss ' ) # name of the boss himself (eg, Vice)
2013-12-25 06:29:38 +00:00
hp: 300
2013-12-20 19:42:31 +00:00
str: 1 # Multiplier of users' missed dailies
drop:
2014-01-21 21:12:58 +00:00
items: [
2014-03-10 18:36:32 +00:00
{ type: ' mounts ' , key: ' BearCub-Polar ' , text: t ( ' questEvilSantaDropBearCubPolarMount ' ) }
2014-01-21 21:12:58 +00:00
]
2013-12-20 19:42:31 +00:00
gp: 20
exp: 100 # Exp bonus from defeating the boss
2013-12-24 17:24:45 +00:00
evilsanta2:
2014-02-01 15:39:21 +00:00
canBuy : false
2014-03-10 18:36:32 +00:00
text: t ( ' questEvilSanta2Text ' )
notes: t ( ' questEvilSanta2Notes ' )
completion: t ( ' questEvilSanta2Completion ' )
2013-12-24 17:24:45 +00:00
value: 4
previous: ' evilsanta '
collect:
2014-03-10 18:36:32 +00:00
tracks: text: t ( ' questEvilSanta2CollectTracks ' ) , count: 20
branches: text: t ( ' questEvilSanta2CollectBranches ' ) , count: 10
2014-01-21 21:12:58 +00:00
drop:
items: [
2014-03-10 18:36:32 +00:00
{ type: ' pets ' , key: ' BearCub-Polar ' , text: t ( ' questEvilSanta2DropBearCubPolarPet ' ) }
2014-01-21 21:12:58 +00:00
]
gp: 20
exp: 100
2013-12-24 17:24:45 +00:00
2014-01-21 22:11:03 +00:00
gryphon:
2014-03-10 18:36:32 +00:00
text: t ( ' questGryphonText ' )
notes: t ( ' questGryphonNotes ' )
completion: t ( ' questGryphonCompletion ' )
2014-01-21 22:11:03 +00:00
value: 4 # Gem cost to buy, GP sell-back
boss:
2014-03-10 18:36:32 +00:00
name: t ( ' questGryphonBoss ' ) # name of the boss himself (eg, Vice)
2014-01-21 22:11:03 +00:00
hp: 300
str: 1.5 # Multiplier of users' missed dailies
drop:
items: [
2014-03-09 21:20:38 +00:00
{ type: ' eggs ' , key: ' Gryphon ' , text: ( -> i18n . t ( ' questGryphonDropGryphonEgg ' ) ) }
{ type: ' eggs ' , key: ' Gryphon ' , text: ( -> i18n . t ( ' questGryphonDropGryphonEgg ' ) ) }
{ type: ' eggs ' , key: ' Gryphon ' , text: ( -> i18n . t ( ' questGryphonDropGryphonEgg ' ) ) }
2014-01-21 22:11:03 +00:00
]
gp: 25
exp: 125
2014-02-18 04:01:33 +00:00
hedgehog:
2014-03-10 18:36:32 +00:00
text: t ( ' questHedgehogText ' )
notes: t ( ' questHedgehogNotes ' )
completion: t ( ' questHedgehogCompletion ' )
2014-02-18 04:01:33 +00:00
value: 4 # Gem cost to buy, GP sell-back
boss:
2014-03-10 18:36:32 +00:00
name: t ( ' questHedgehogBoss ' ) # name of the boss himself (eg, Vice)
2014-02-18 04:01:33 +00:00
hp: 400
str: 1.25 # Multiplier of users' missed dailies
drop:
items: [
2014-03-29 19:20:06 +00:00
{ type: ' eggs ' , key: ' Hedgehog ' , text: ( -> i18n . t ( ' questHedgehogDropHedgehodEgg ' ) ) }
{ type: ' eggs ' , key: ' Hedgehog ' , text: ( -> i18n . t ( ' questHedgehogDropHedgehodEgg ' ) ) }
{ type: ' eggs ' , key: ' Hedgehog ' , text: ( -> i18n . t ( ' questHedgehogDropHedgehodEgg ' ) ) }
2014-02-18 04:01:33 +00:00
]
gp: 30
exp: 125
2014-01-21 22:11:03 +00:00
2014-03-21 22:01:49 +00:00
ghost_stag:
2014-03-29 19:20:06 +00:00
text: t ( ' questGhostStagText ' )
notes: t ( ' questGhostStagNotes ' )
completion: t ( ' questGhostStagCompletion ' )
2014-03-21 22:01:49 +00:00
value: 4
boss:
2014-03-29 19:20:06 +00:00
name: t ( ' questGhostStagBoss ' )
2014-03-21 22:01:49 +00:00
hp: 1200
str: 2.5
drop:
items: [
2014-03-29 19:20:06 +00:00
{ type: ' eggs ' , key: ' Deer ' , text: ( -> i18n . t ( ' questGhostStagDropDeerEgg ' ) ) }
{ type: ' eggs ' , key: ' Deer ' , text: ( -> i18n . t ( ' questGhostStagDropDeerEgg ' ) ) }
{ type: ' eggs ' , key: ' Deer ' , text: ( -> i18n . t ( ' questGhostStagDropDeerEgg ' ) ) }
2014-03-21 22:01:49 +00:00
]
gp: 80
exp: 800
2014-01-22 01:42:10 +00:00
vice1:
2014-03-10 18:36:32 +00:00
text: t ( ' questVice1Text ' )
notes: t ( ' questVice1Notes ' )
2014-01-22 01:42:10 +00:00
value: 4
lvl: 30
boss:
2014-03-10 18:36:32 +00:00
name: t ( ' questVice1Boss ' )
2014-01-22 01:42:10 +00:00
hp: 750
str: 1.5
drop:
items: [
2014-03-10 18:36:32 +00:00
{ type: ' quests ' , key: " vice2 " , text: t ( ' questVice1DropVice2Quest ' ) }
2014-01-22 01:42:10 +00:00
]
gp: 20
exp: 100
vice2:
2014-03-10 18:36:32 +00:00
text: t ( ' questVice2Text ' )
notes: t ( ' questVice2Notes ' )
2014-01-22 01:42:10 +00:00
value: 4
lvl: 35
previous: ' vice1 '
collect:
2014-03-10 18:36:32 +00:00
lightCrystal: text: t ( ' questVice2CollectLightCrystal ' ) , count: 45
2014-01-22 01:42:10 +00:00
drop:
items: [
2014-03-10 18:36:32 +00:00
{ type: ' quests ' , key: ' vice3 ' , text: t ( ' questVice2DropVice3Quest ' ) }
2014-01-22 01:42:10 +00:00
]
gp: 20
exp: 75
vice3:
2014-03-10 18:36:32 +00:00
text: t ( ' questVice3Text ' )
notes: t ( ' questVice3Notes ' )
completion: t ( ' questVice3Completion ' )
2014-01-22 01:42:10 +00:00
previous: ' vice2 '
value: 4
lvl: 40
boss:
2014-03-10 18:36:32 +00:00
name: t ( ' questVice3Boss ' )
2014-01-22 01:42:10 +00:00
hp: 1500
str: 3
drop:
items: [
2014-03-10 18:36:32 +00:00
{ type: ' gear ' , key: " weapon_special_2 " , text: t ( ' questVice3DropWeaponSpecial2 ' ) }
{ type: ' eggs ' , key: ' Dragon ' , text: t ( ' questVice3DropDragonEgg ' ) }
{ type: ' eggs ' , key: ' Dragon ' , text: t ( ' questVice3DropDragonEgg ' ) }
{ type: ' hatchingPotions ' , key: ' Shade ' , text: t ( ' questVice3DropShadeHatchingPotion ' ) }
{ type: ' hatchingPotions ' , key: ' Shade ' , text: t ( ' questVice3DropShadeHatchingPotion ' ) }
2014-01-22 01:42:10 +00:00
]
gp: 100
exp: 1000
2014-04-07 03:29:34 +00:00
egg:
text: " Egg Hunt "
2014-04-25 00:08:13 +00:00
notes: " Overnight, strange plain eggs have appeared everywhere: in Matt ' s stables, behind the counter at the Tavern, and even among the pet eggs at the Marketplace! What a nuisance! \" Nobody knows where they came from, or what they might hatch into, \" says <strong>Megan</strong>, \" but we can ' t just leave them laying around! Work hard and search hard to help me gather up these mysterious eggs. Maybe if you collect enough, there will be some extras left over for you... \" "
completion: " You did it! In gratitude, <strong>Megan</strong> gives you ten of the eggs. \" I don ' t think they hatch, exactly, \" she says, \" and they certainly won ' t grow into mounts. But that doesn ' t mean you can ' t dye them beautiful colors! \" "
2014-04-07 03:29:34 +00:00
value: 1
2014-05-01 04:28:54 +00:00
canBuy: false
2014-04-07 03:29:34 +00:00
collect:
plainEgg: text: ' Plain Egg ' , count: 100
drop:
items: [
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
{ type: ' eggs ' , key: ' Egg ' , text: " Plain Egg " }
]
gp: 0
exp: 0
2013-12-20 19:42:31 +00:00
_ . each api . quests , (v,key) ->
2014-02-01 15:39:21 +00:00
_ . defaults v , { key , canBuy : true }
2013-05-19 17:01:01 +00:00
2013-12-11 16:30:07 +00:00
repeat = { m : true , t : true , w : true , th : true , f : true , s : true , su : true }
api.userDefaults =
habits: [
2014-03-10 18:36:32 +00:00
{ type: ' habit ' , text: t ( ' defaultHabit1Text ' ) , notes: t ( ' defaultHabit1Notes ' ) , value: 0 , up: true , down: false , attribute: ' per ' }
{ type: ' habit ' , text: t ( ' defaultHabit2Text ' ) , notes: t ( ' defaultHabit2Notes ' ) , value: 0 , up: false , down: true , attribute: ' con ' }
{ type: ' habit ' , text: t ( ' defaultHabit3Text ' ) , notes: t ( ' defaultHabit3Notes ' ) , value: 0 , up: true , down: true , attribute: ' str ' }
2013-12-11 16:30:07 +00:00
]
dailys: [
2014-03-10 18:36:32 +00:00
{ type: ' daily ' , text: t ( ' defaultDaily1Text ' ) , notes: t ( ' defaultDaily1Notes ' ) , value: 0 , completed: false , repeat: repeat , attribute: ' per ' }
{ type: ' daily ' , text: t ( ' defaultDaily2Text ' ) , notes: t ( ' defaultDaily2Notes ' ) , value: 3 , completed: false , repeat: repeat , attribute: ' str ' }
{ type: ' daily ' , text: t ( ' defaultDaily3Text ' ) , notes: t ( ' defaultDaily3Notes ' ) , value: - 10 , completed: false , repeat: repeat , attribute: ' int ' }
2013-12-11 16:30:07 +00:00
]
todos: [
2014-03-10 18:36:32 +00:00
{ type: ' todo ' , text: t ( ' defaultTodo1Text ' ) , notes: t ( ' defaultTodo1Notes ' ) , value: - 3 , completed: false , attribute: ' per ' }
2013-12-11 16:30:07 +00:00
]
rewards: [
2014-03-10 18:36:32 +00:00
{ type: ' reward ' , text: t ( ' defaultReward1Text ' ) , notes: t ( ' defaultReward1Notes ' ) , value: 20 }
{ type: ' reward ' , text: t ( ' defaultReward2Text ' ) , notes: t ( ' defaultReward2Notes ' ) , value: 10 }
2013-12-11 16:30:07 +00:00
]
tags: [
2014-03-10 18:36:32 +00:00
{ name: t ( ' defaultTag1 ' ) }
{ name: t ( ' defaultTag2 ' ) }
{ name: t ( ' defaultTag3 ' ) }
2014-03-24 02:18:09 +00:00
]