VXAce Unwanted 1-turn delay on state restrictions "Attack an enemy", "Attack anyone", and "Attack an ally".

I was doing some experimenting while trying to implement a very basic confusion state simply using the "attack an ally" state restriction. There I discovered that, immediately after applying a state with any of the three skill restrictions mentioned in the title, the foe would do absolutely nothing on its very next turn, and only on the second turn of being confused would they start attacking the corresponding targets.

I even tried testing in a completely unmodified new project without any scripts and the behavior was the same. Enemy does nothing as if the restriction was "Cannot move", and then the turn after that they start behaving as expected.
Actors seemingly behave without a hitch. If they get confused during the enemy phase, I can't choose their command but act out the correct restriction immediately instead of the second turn after.

Since it happens whether there are scripts or not, it seems to be intended behavior. But I personally find it a less than ideal. Has anyone else had to deal with this or know how to fix it? I would prefer if the confusion status worked without having to wait a whole turn of full stun to see the enemies attack each other.
If they get confused during the enemy phase,
by default, there is no enemy phase at all - only the selection phase and the action phase, and the order of actions is mixed between actors and enemies based on their AGI and their skill-speed as well as a random factor.
if all actors act before all enemies, that means that you gave the enemies an AGI much lower than the actors have.

the regular behaviour is that the restricting states always take affect in the next selection phase, which only happens after the current action phase.
and you would have to use scripts to change the battlesystem to change that.

with that info, does the behaviour of your battles look correct?
if not you might have already used scripts that changed that.

in both cases we would need to know which scripts you use to help further.
by default, there is no enemy phase at all - only the selection phase and the action phase, and the order of actions is mixed between actors and enemies based on their AGI and their skill-speed as well as a random factor.
if all actors act before all enemies, that means that you gave the enemies an AGI much lower than the actors have.

the regular behaviour is that the restricting states always take affect in the next selection phase, which only happens after the current action phase.
and you would have to use scripts to change the battlesystem to change that.

with that info, does the behaviour of your battles look correct?
if not you might have already used scripts that changed that.

in both cases we would need to know which scripts you use to help further.
I completely forgot about AGI, I almost never use it in my projects, but I took your comment into consideration and did some further testing.

I tried adjusting AGI to see what happens depending on who starts first and discovered that the issue always occurs as long as one of the actors in the team confuses the enemy before the enemy gets to do anything. It doesnt matter if the rest of the team always go after the enemy.

Likewise, it doesnt matter if most of the player team acts first, if the actor who inflicted the confusion acted AFTER the enemy already had their chance to act, the turn ends normally and only on the following turn the enemy starts following the proper restrictions of the confusion state.

At least now I know that the problem is inflicting the status before the enemy gets to act, but I have yet to find a solution.

Also, like I mentioned before, the issue still happens in a completely unmodified new project without any scripts. The project I wanted to fix this issue for does use a bunch of scripts, most importantly Yanfly's Ace Battle engine with the FTB addon.

Original thread: https://forums.rpgmakerweb.com/threads/unwanted-1-turn-delay-on-state-restrictions-attack-an-enemy-attack-anyone-and-attack-an-ally.181743/