I want to do something like this:
def speed if (51..74) === item.id #Spell# speed = subject.xstat.magicspeed + rand(5 + subject.xstat.magicspeed / 4) else if (a.. === item.id #Spellskill# speed = ((subject.agi + rand(5 + subject.agi / 4)) + (subject.xstat.magicspeed + rand(5 + subject.xstat.magicspeed / 4)) / 2) else if (c..d) === item.id #Bow# speed = subject.xstat.bowspeed + rand(5 + subject.xstat.bowspeed / 4) else if (e..f) === item.id #Spellbow# speed = ((subject.xstat.bowspeed + rand(5 + subject.xstat.bowspeed / 4)) + (subject.xstat.magicspeed + rand(5 + subject.xstat.magicspeed / 4)) / 2) else speed = subject.agi + rand(5 + subject.agi / 4) end speed += item.speed if item speed += subject.atk_speed if attack? speed endwhere there are multiple types of speeds. Heavy armor doesn't slow down your spells or projectile use, but it will slow down your attacks and spellskill (ice blade) moves.
I'm using http://crystalnoel42.wordpress.com/2013/07/05/crystal-engine-extra-stats/ for the xstats.
The following works for spell speed, however, I don't know how to work multiple conditions to say if the move is this then this and if it's that then that but if it's none of those then it's this.
def speed if (51..74) === item.id #Spell# speed = subject.xstat.msp + rand(5 + subject.xstat.msp / 4) else speed = subject.agi + rand(5 + subject.agi / 4) end speed += item.speed if item speed += subject.atk_speed if attack? speed += subject.xstat.actadd speed -= 1000 speed *= subject.xstat.actmulti speed *= 0.01 speed endMight someone help?
I wonder if the condition only works for skills and not items.
def speed if (51..74) === item.id #Spell# speed = subject.xstat.magicspeed + rand(5 + subject.xstat.magicspeed / 4) else if (a.. === item.id #Spellskill# speed = ((subject.agi + rand(5 + subject.agi / 4)) + (subject.xstat.magicspeed + rand(5 + subject.xstat.magicspeed / 4)) / 2) else if (c..d) === item.id #Bow# speed = subject.xstat.bowspeed + rand(5 + subject.xstat.bowspeed / 4) else if (e..f) === item.id #Spellbow# speed = ((subject.xstat.bowspeed + rand(5 + subject.xstat.bowspeed / 4)) + (subject.xstat.magicspeed + rand(5 + subject.xstat.magicspeed / 4)) / 2) else speed = subject.agi + rand(5 + subject.agi / 4) end speed += item.speed if item speed += subject.atk_speed if attack? speed endwhere there are multiple types of speeds. Heavy armor doesn't slow down your spells or projectile use, but it will slow down your attacks and spellskill (ice blade) moves.
I'm using http://crystalnoel42.wordpress.com/2013/07/05/crystal-engine-extra-stats/ for the xstats.
The following works for spell speed, however, I don't know how to work multiple conditions to say if the move is this then this and if it's that then that but if it's none of those then it's this.
def speed if (51..74) === item.id #Spell# speed = subject.xstat.msp + rand(5 + subject.xstat.msp / 4) else speed = subject.agi + rand(5 + subject.agi / 4) end speed += item.speed if item speed += subject.atk_speed if attack? speed += subject.xstat.actadd speed -= 1000 speed *= subject.xstat.actmulti speed *= 0.01 speed endMight someone help?
I wonder if the condition only works for skills and not items.