[SOLVED]Battle Condition After Actions, Not Turns(Yanfly's STB)

Hello!
I made a game and implemented Yanfly's Standard Turn Battle System plugin as I like being able to have the characters instantly carry out their chosen actions in battle. Unfortunately I came into a problem when trying to create a new system into my project.

Here's how it works:

The player has to inflict a certain state on an enemy so that another enemy has it's immortal state removed.

Problem:

I need this condition to run after any actor or enemy action so that the other enemy instantly becomes vulnerable to any attack the next actor performs(before the turn ends). MV has conditions only for turns, but not actions by default, and turns only end after every actor has performed.

I was hoping someone would find a way so that I could have a common event(or battle event) run once every action(or at the end of every action).

If anyone could help it would be most appreciated! 👋
Bump~
that should be handled by the span of the troop event - I don't think that yanfly had changed that.
How would I handle this then?
I've tried using the 'turn' conditions, however this only triggers after every actor /enemy has performed their move. Did Yanfly provide a way to have it happen only after each action? I must have missed it. D:
Not exactly sure how I could make this work, help would be appreciated! 😅

Edit:
You bringing this up gave me a lightbulb moment. I've been avoiding using the 'moment' span in troops due to my brain not comprehending how to stop it from repeating constantly and getting the whole battle stuck. I think I may have figured out how it works, will check it out tomorrow. If it works I'm going to feel so dumb. XD
As your edit shows you realised that the span defines how often a troop event and its conditions are checked.
Battle: Once per battle
Turn: Once per turn
Moment: Once per action

For anything set to Moment you need to make sure that it cannot be stopped - checking values and changing other things should not be a problem, but anything including wait, show text or so on has a high risk of going wrong if you aren't carefull with the conditions.
Managed to figure it out!
Solution:
  1. Had skill(the one that applies the state) run a common event that turns on a switch to let the troop event know the state MAY be applied.
  2. Have a troop event that's condition is set to the switch and has a span of 'moment'
  3. In the event check if the enemy has the state applied, if yes, remove the immortal state and turn off the switch. If not, turn off the switch to stop the event from continuously running.
I did add an extra event to check if the state has been removed and to add the immortal state again, however this used a 'turn' span and was pretty easy to figure out.

Thanks again Andar for your help!
Now I shall wallow in shame about how simple this was. 😢
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/solved-battle-condition-after-actions-not-turns-yanflys-stb.109178/