Merge pull request #4919 from TheHollidayInn/spells-level-with-exp

Added sync on mage fireball spell and rogue backstab skill and give correct mp reduction notification for ethereal surge
This commit is contained in:
Alys
2015-04-04 00:29:41 +10:00
2 changed files with 13 additions and 6 deletions
+12 -6
View File
@@ -3,7 +3,7 @@ api = module.exports
moment = require 'moment'
i18n = require './i18n.coffee'
t = (string, vars) ->
func = (lang) ->
func = (lang) ->
vars ?= {a: 'a'}
i18n.t(string, vars, lang)
func.i18nLangFunc = true #Trick to recognize this type of function
@@ -55,7 +55,7 @@ _.each api.mystery, (v,k)->v.key = k
gear =
weapon:
base:
0:
0:
text: t('weaponBase0Text'), notes: t('weaponBase0Notes'), value:0
warrior:
0: text: t('weaponWarrior0Text'), notes: t('weaponWarrior0Notes'), value:1
@@ -397,7 +397,7 @@ gear =
spring2015Warrior: event: events.spring2015, specialClass: 'warrior', text: t('headAccessorySpecialSpring2015WarriorText'), notes: t('headAccessorySpecialSpring2015WarriorNotes'), value: 20
spring2015Mage: event: events.spring2015, specialClass: 'wizard', text: t('headAccessorySpecialSpring2015MageText'), notes: t('headAccessorySpecialSpring2015MageNotes'), value: 20
spring2015Healer: event: events.spring2015, specialClass: 'healer', text: t('headAccessorySpecialSpring2015HealerText'), notes: t('headAccessorySpecialSpring2015HealerNotes'), value: 20
mystery:
201403: text: t('headAccessoryMystery201403Text'), notes: t('headAccessoryMystery201403Notes'), mystery:'201403', value: 0
201404: text: t('headAccessoryMystery201404Text'), notes: t('headAccessoryMystery201404Notes'), mystery:'201404', value: 0
@@ -524,6 +524,9 @@ api.spells =
#console.log {bonus, expBonus:bonus,upBonus:bonus*.1}
user.stats.exp += diminishingReturns(bonus,75)
user.party.quest.progress.up += diminishingReturns(bonus*.1,50,30)
#Sync the user stats to see if we level the user
req = { language: user.preferences.language }
user.fns.updateStats( user.stats , req )
mpheal:
text: t('spellWizardMPHealText')
@@ -620,6 +623,9 @@ api.spells =
user.stats.exp += bonus
user.stats.gp += bonus
# user.party.quest.progress.up += bonus if user.party.quest.key # remove hurting bosses for rogues, seems OP for now
#Sync the user stats to see if we level the user
req = { language: user.preferences.language }
user.fns.updateStats( user.stats , req )
toolsOfTrade:
text: t('spellRogueToolsOfTradeText')
mana: 25
@@ -805,7 +811,7 @@ api.spells =
target.markModified? 'items.special.valentineReceived'
user.stats.gp -= 10
# Intercept all spells to reduce user.stats.mp after casting the spell
_.each api.spells, (spellClass) ->
_.each spellClass, (spell, key) ->
@@ -1102,7 +1108,7 @@ api.quests =
gp: 25
exp: 125
unlock: t('questGryphonUnlockText')
hedgehog:
text: t('questHedgehogText')
notes: t('questHedgehogNotes')
@@ -1602,7 +1608,7 @@ api.quests =
gp: 31
exp: 200
unlock: t('questRockUnlockText')
bunny:
text: t('questBunnyText')
notes: t('questBunnyNotes')