I'm using Yanfly's AutoPassiveStates and Buffs + States Core Plugins to try and give my actors dynamic action times+ values using states.
However, for whatever reason the game really *really* doesn't like what i'm trying to do and the bolded part of code is terribly bugged.
Note: The actor passive state id is 73
<Custom Battle Effect>
var Q1 = 80;
if (!this.isStateAffected(Q1)){
this.addState(Q1);
}
</Custom Battle Effect>
<Custom Turn End Effect>
var Q1 = 80;
var Q2 = 78;
var Q3 = 76;
var Q4 = 74;
if (user.isStateAffected(Q1)){
this.removeState(Q1);
this.addState(Q2);
}
else if (this.isStateAffected(Q2)){
this.removeState(Q2);
this.addState(Q3);
}
else if (this.isStateAffected(Q3)){
this.removeState(Q3);
this.addState(Q4);
}
</Custom Turn End Effect>
<Custom Action Start Effect>
var Q1 = 80;
var Q2 = 78;
var Q3 = 76;
var Q4 = 74;
var action = this.currentAction();
var skill = action.item();
// Check if the action exists, is a skill
if (action && action.isSkill()) {
if(!this.isInstantCast(skill)){
if (this.isStateAffected(Q2)){
this.addState(Q1);
this.removeState(Q2);
}
if (this.isStateAffected(Q3)){
this.addState(Q2);
this.removeState(Q3);
}
if (this.isStateAffected(Q4)){
this.addState(Q3);
this.removeState(Q4);
}
}
}
</Custom Action Start Effect>
What happens is --the state will get removed and the new state will not be added back.
The bolded code works if the state getting added has *any other state* other than states Q1- Q4 (e.g. states 01-72).
It's absolutely baffling. Is there something i'm overlooking?
Pictures of the states are below: