I figured out how I am going to approach increasing attack power by using a variety states so the player loses states and gains a better one, however, how do I check if the evading actor is affected by a state? I tried using this.isStateAffected(1) != 1) to check if we don't have that state, if not then it'll apply it, but it doesn't even apply the state at all anymore.
Once that's figured out, I can just add else and more checks to see if other states are applied that way a state is removed and the better one is applied after every successful evade. I just also wish there was a way to hide the pop-up text when you gain a state so the player won't have to see "+Stylish Evasion Lv1/Lv2/Lv3/MAX" throughout the entire battle.
Code:
(function() {
var variableId = 307; // change var id
var stateId = 63; // change state id
var stateLvl2= 64; // change state id
var stateLv3 = 65; // change state id
var stateLvMax = 66; // change state id
var animationId = 340; //change animation id
var AG_EvasionState_Game_Actor_performEvasion = Game_Actor.prototype.performEvasion;
Game_Actor.prototype.performEvasion = function() {
AG_EvasionState_Game_Actor_performEvasion.call(this);
if($gameVariables.value(variableId) === 1 && this.isStateAffected(1) != 1){
this.addState(stateId);
this.startAnimation(animationId);
}
};
})();