Remove state only once conditions are met

Hi there,

I have just begun playing with Ellye's ATB plugin, which measures turns in ticks. As far as I can tell, it's impossible to make a state's auto-removal timing conicide with the actor's filling of the ATB gauge, so I'm wondering if there's a way to put a condition on a state that says "this state remains until the ATB gauge is full".

I'm not very experienced with the battle side of things on MV so I have not dabbled with states before with this type of complexity.

I believe the ATB terms in the plugin are "atb" and "full_atb" but I'll worry about that later, if this is even possible.

Thanks.
If you don't mind directly editing the script, you can try this. Take a look at Game_BattlerBase.prototype.atbRatio function located around line 871.

Spoiler
QZLdaDI
QZLdaDI.png

At the line before "return 1", you can add new code this.removeState(x);
Replace x with the state Id that you want to be removed when the atb bar is full.
For example, if you want to remove state with Id number 5, add "this.removeState(5);" code like this.

Spoiler
OW4aEZU.png
So, this would be a blanket fix for one particular state right? And I could add more state conditions / requirements in the script as I see fit?

EDIT: @Moogle_X thanks very much. That actually works perfect.

EDIT AGAIN: @Moogle_X ... uh actually, this seems to be causing a random freeze occasionally when the state in question is used. I turned the turn auto-remove timing right up to 9999 so regardless off the character's AGI, the status will never end until the ATB bar is filled up. Do you think this has something to do with it?

Original thread: https://forums.rpgmakerweb.com/threads/remove-state-only-once-conditions-are-met.83961/