In Mog's dash plugin, there is a line where the cost of dashing is set (for anyone looking too, it's around line 319). I want to add a var to the formula here (the line with the comment behind it), let's say var 46 in this case. The number in this var should slow down the cost in percentage so if the var = 1, slow down by 1%, if 50 by 50% etc). How would I handle this? below is the function:
Thanks for the help!
JavaScript:
//==============================
// ** update CT UP
//==============================
Game_CharacterBase.prototype.updateCTUP = function() {
this.battler()._chrono.ctFd = 0;
if (this.needDashCost()) {
if (this.isMoving()) {this.battler()._chrono.ctDash = 10};
this.battler()._chrono.ct -= 0.4; // Edit changes CT speed going down when dashing
} else if (this.needUpdateCTUP()) {
if (!this.battler().isCTMax()) {
this.battler()._chrono.ct += this.battler().ctSpeed();
if (this.battler().isCTMax()) {
SoundManager.playSoundMX(Moghunter.chronoCT_fullSE);
};
};
};
if (this.battler()._chrono.ct > this.battler().maxCt()) {
this.battler()._chrono.ct = this.battler().maxCt();
} else if (this.battler()._chrono.ct < 0) {
this.battler()._chrono.ct = 0;
};
if (this.battler()._chrono.ctWait > 0) {this.battler()._chrono.ctWait--};
};
Thanks for the help!