I want to forcefully decrease the State's Turn Count

I would like to use a Script Call to decrease the State's Turn Count by 1 and remove the status abnormality when the Turn Count becomes 0.

1723334993511.png

I thought I could reduce it using the Script Call supported by Yanfly Buff&State Core, but I recently found out that this command is a separate system from the existing Turn Count.

I searched for quite a while but couldn't find it...
@DakeCraft I have a pretty simple answer for you.

JavaScript:
$gameActors.actor(x)._stateTurns[y] -= 2;

Since you're trying to forcefully reduce turns via script call, this is what I got. Replace X with the actor ID you want to inflict, and Y with the state ID you want to reduce.

If the turn count is at zero or less, it will stay on until it reaches that character's turn before forcefully removing itself by default, so you might have to use a conditional branch to forcefully remove the state if it's at 0 turns or less if aesthetics matter that much to you.

If you're trying to reduce it via Yanfly's Action Sequences, just put this in an "Eval:" call and it'll do the same thing.
@DakeCraft I have a pretty simple answer for you.

JavaScript:
$gameActors.actor(x)._stateTurns[y] -= 2;

Since you're trying to forcefully reduce turns via script call, this is what I got. Replace X with the actor ID you want to inflict, and Y with the state ID you want to reduce.

If the turn count is at zero or less, it will stay on for a second it reaches that character's turn before forcefully removing itself by default, so you might have to use a conditional branch to forcefully remove the state if it's at 0 turns or less if aesthetics matter that much to you.

If you're trying to reduce it via Yanfly's Action Sequences, just put this in an "Eval:" call and it'll do the same thing.

It worked fine! thank you!!!

Original thread: https://forums.rpgmakerweb.com/threads/i-want-to-forcefully-decrease-the-states-turn-count.170998/