updated mage spells with @danielthebard's new content

This commit is contained in:
Tyler Renelle 2013-12-18 10:39:10 -07:00
parent 50914cd83e
commit 3d0364b8ad
3 changed files with 62 additions and 56 deletions

View file

@ -10021,52 +10021,52 @@ var global=self;/**
lvl: 6,
target: 'task',
notes: 'With a crack, flames burst from your staff, scorching a task. You deal much higher damage to the task and gain additional experience.',
cast: function(user, target) {
target.value += user._statsComputed.int * .02;
return user.stats.exp += Math.abs(target.value);
}
},
lightning: {
text: 'Lightning Strike',
mana: 15,
lvl: 7,
target: 'task',
notes: 'A bolt of lightning pierces through a task. There is a high chance of a critical hit.',
cast: function(user, target) {
target.value += user._statsComputed.int * .02 * crit(user, 'per');
return user.stats.exp += Math.abs(target.value);
}
},
frost: {
text: 'Chilling Frost',
mpheal: {
text: 'Ethereal Surge',
mana: 30,
lvl: 7,
target: 'party',
notes: "A flow of magical energy rushes from your hands and recharges your party. Your party recovers MP.",
cast: function(user, target) {
return _.each(target, function(member) {
var bonus;
bonus = Math.ceil(user._statsComputed.int * .2 + 5);
if (bonus > 25) {
bonus = 25;
}
return member.stats.mp += bonus;
});
}
},
earth: {
text: 'Earthquake',
mana: 35,
lvl: 8,
target: 'party',
notes: "Ice forms on the party's tasks, slowing them down and opening them up to more attacks. Your party gains a buff to experience.",
notes: "The ground below your party's tasks cracks and shakes with extreme intensity, slowing them down and opening them up to more attacks. Your party gains a buff to experience.",
cast: function(user, target) {
return _.each(target, function(member) {
var _base;
if ((_base = member.stats.buffs).int == null) {
_base.int = 0;
}
return member.stats.buffs.int += user._statsComputed.int * .2;
return member.stats.buffs.int = user._statsComputed.int * .2;
});
}
},
darkness: {
text: 'Shroud of Darkness',
mana: 30,
frost: {
text: 'Chilling Frost',
mana: 40,
lvl: 9,
target: 'party',
notes: "Unearthly shadows form and wisp around your party, concealing their presence. Under the shroud, your party can sneak up on tasks, dealing more critical hits.",
target: 'self',
notes: "Ice erupts from every surface, swallowing your tasks and freezing them in place. Your dailies' streaks won't reset at the end of the day.",
cast: function(user, target) {
return _.each(target, function(member) {
var _base;
if ((_base = member.stats.buffs).str == null) {
_base.str = 0;
}
return member.stats.buffs.str += user._statsComputed.int * .2;
});
return user.stats.buffs.streaks = true;
}
}
},
@ -11618,7 +11618,9 @@ var process=require("__browserify_process");(function() {
if (options.cron) {
calculateDelta();
subtractPoints();
task.streak = 0;
if (!user.stats.buffs.streaks) {
task.streak = 0;
}
} else {
calculateDelta();
addPoints();
@ -11926,7 +11928,8 @@ var process=require("__browserify_process");(function() {
int: 0,
per: 0,
con: 0,
stealth: 0
stealth: 0,
streaks: false
};
return;
}
@ -12012,7 +12015,8 @@ var process=require("__browserify_process");(function() {
int: 0,
per: 0,
con: 0,
stealth: 0
stealth: 0,
streaks: false
};
return user;
},

View file

@ -212,6 +212,7 @@ crit = (user, stat='per', chance=.03) ->
else 1
api.spells =
wizard:
fireball:
text: 'Burst of Flames'
@ -219,40 +220,41 @@ api.spells =
lvl: 6
target: 'task'
notes: 'With a crack, flames burst from your staff, scorching a task. You deal much higher damage to the task and gain additional experience.'
cast: (user, target) ->
target.value += user._statsComputed.int * .02
user.stats.exp += Math.abs(target.value)
lightning:
text: 'Lightning Strike'
mana: 15
lvl: 7
target: 'task'
notes: 'A bolt of lightning pierces through a task. There is a high chance of a critical hit.'
cast: (user, target) ->
target.value += user._statsComputed.int * .02 * crit(user, 'per')
user.stats.exp += Math.abs(target.value)
frost:
text: 'Chilling Frost'
mpheal:
text: 'Ethereal Surge'
mana: 30
lvl: 7
target: 'party'
notes: "A flow of magical energy rushes from your hands and recharges your party. Your party recovers MP.",
cast: (user, target)->
_.each target, (member) ->
bonus = Math.ceil(user._statsComputed.int * .2 + 5)
bonus = 25 if bonus > 25 #prevent ability to replenish own mp infinitely
member.stats.mp += bonus
earth:
text: 'Earthquake'
mana: 35
lvl: 8
target: 'party'
notes: "Ice forms on the party's tasks, slowing them down and opening them up to more attacks. Your party gains a buff to experience.",
notes: "The ground below your party's tasks cracks and shakes with extreme intensity, slowing them down and opening them up to more attacks. Your party gains a buff to experience.",
cast: (user, target) ->
## lasts for 24 hours ##
_.each target, (member) ->
member.stats.buffs.int ?= 0
member.stats.buffs.int += user._statsComputed.int * .2
darkness:
text: 'Shroud of Darkness'
mana: 30
member.stats.buffs.int = user._statsComputed.int * .2
frost:
text: 'Chilling Frost'
mana: 40
lvl: 9
target: 'party'
notes: "Unearthly shadows form and wisp around your party, concealing their presence. Under the shroud, your party can sneak up on tasks, dealing more critical hits.",
target: 'self'
notes: "Ice erupts from every surface, swallowing your tasks and freezing them in place. Your dailies' streaks won't reset at the end of the day."
cast: (user, target) ->
## lasts for 24 hours ##
_.each target, (member) ->
member.stats.buffs.str ?= 0
member.stats.buffs.str += user._statsComputed.int * .2
user.stats.buffs.streaks = true
warrior:
smash:

View file

@ -731,7 +731,7 @@ api.wrap = (user) ->
if options.cron
calculateDelta()
subtractPoints()
task.streak = 0
task.streak = 0 unless user.stats.buffs.streaks
else
calculateDelta()
addPoints() # obviously for delta>0, but also a trick to undo accidental checkboxes
@ -1015,7 +1015,7 @@ api.wrap = (user) ->
# User is resting at the inn. Used to be we un-checked each daily without performing calculation (see commits before fb29e35)
# but to prevent abusing the inn (http://goo.gl/GDb9x) we now do *not* calculate dailies, and simply set lastCron to today
if user.preferences.sleep is true
user.stats.buffs = {str:0,int:0,per:0,con:0,stealth:0}
user.stats.buffs = {str:0,int:0,per:0,con:0,stealth:0,streaks:false}
return
# Tally each task
@ -1067,7 +1067,7 @@ api.wrap = (user) ->
user.fns.preenUserHistory()
user.markModified? 'history'
user.markModified? 'dailys' # covers dailys.*.history
user.stats.buffs = {str:0,int:0,per:0,con:0,stealth:0}
user.stats.buffs = {str:0,int:0,per:0,con:0,stealth:0,streaks:false}
user
# Registered users with some history