Hey, I've been searching around and I cannot figure out how to change the formula that speed uses.
I know the formula is:
Game_Action.prototype.speed = function() {
var agi = this.subject().agi;
var speed = agi + Math.randomInt(Math.floor(5 + agi / 4));
if (this.item()) {
speed += this.item().speed;
}
if (this.isAttack()) {
speed += this.subject().attackSpeed();
}
return speed;
Basically I just want to know how to change it to combine the user's agility, magic attack, magic defense, and luck. I'll probably remove the random aspect of it but either way I'll deal with that later.
I tried altering the line:
var speed = agi + Math.randomInt(Math.floor(5 + agi / 4));
to
var speed = agi + mat + mdf + luk;
But, that didn't work.
So I don't know exactly how this line works:
var agi = this.subject().agi;
And, if it should be altered somehow. Any help would be appreciated.
I know the formula is:
Game_Action.prototype.speed = function() {
var agi = this.subject().agi;
var speed = agi + Math.randomInt(Math.floor(5 + agi / 4));
if (this.item()) {
speed += this.item().speed;
}
if (this.isAttack()) {
speed += this.subject().attackSpeed();
}
return speed;
Basically I just want to know how to change it to combine the user's agility, magic attack, magic defense, and luck. I'll probably remove the random aspect of it but either way I'll deal with that later.
I tried altering the line:
var speed = agi + Math.randomInt(Math.floor(5 + agi / 4));
to
var speed = agi + mat + mdf + luk;
But, that didn't work.
So I don't know exactly how this line works:
var agi = this.subject().agi;
And, if it should be altered somehow. Any help would be appreciated.