Action patterns with turns - incorrect behavior

Hello everybody.


While trying to set up the AI of one of the enemies of my game, I encountered a strange problem. Here is the action pattern of the enemy.





As you see, I expected for the enemy to use the skills in the order : Attack, Charge, Rafale, Attack, Charge, Rafale, etc. But, for some reason, the enemy only correctly uses the first attack, while in the second turn it casts one of the two next skills, and does nothing in the third turn.


At first, I thought that it was due to one of my plugins, but the same problem appears in a new project free from any plugin. Did I miss something, or could it be a bug of the engine ?


Thank you for your help 🙂
does the enemy have enough MP/TP to pay for the skill costs of those skills?
Yes, the costs were at zero during the AI test.


Edit : I solved the problem by adding a micro script to work with Yanfly's ATB, making sure to calculate each battler turn separately.

Original thread: https://forums.rpgmakerweb.com/threads/action-patterns-with-turns-incorrect-behavior.51221/