MV Free additional turn after a successful hit?

Hi! I wanted help on a simple skill I'm trying to make. Essentially, I want the skill to give the player/party member a free, additional turn if they successfully hit an enemy. My main problem is I don't know how I should properly format it or if I'm using the right scripting.


Relevant Plugins:
Yanfly Battle Core
Yanfly Action sequence 1-3
Yanfly Skill Score
Yanfly Instant Cast

Here if my current notetag in the skill:


Code:
<Target Action>
action animation
wait for animation
action effect
wait for animation
action animation
wait for animation
action effect
If (this.isHpEffect())
  instant = true
end
<\Target Action>
<Cooldown: 4>

I had the idea of maybe making a variable for this skill, so that it checks on each hit if the player dealt damage, adding 1 to the variable. Then, at the very end of the notetag, it would make the skill instant if that variable was at 2. Once again, I'm not sure how to format it though. If you need any screenshots or additional info please let me know. Thanks!
I'm fairly sure you can't turn on instant cast during the action sequence. The moment a skill is executing, the turn is already spent, unless you have the instant eval in its correct instant eval notetag, not during the action sequence.
Good to know. So would it work if I put the Instant Eval check outside of the action sequence or is the turn spent no matter what?
The eval is ran before the sequence as far as I can tell, so checking whether or not the skill actually hit wouldn't work, since there was no actual action effect yet.

What you can do however, is using the proper eval notetag, checking down the line if the skill hit, turn on a switch, or add a state(whichever you like) and then have that skill be instant on the next turn, based off of that switch/state. Not quite the same, but similar.

Original thread: https://forums.rpgmakerweb.com/threads/free-additional-turn-after-a-successful-hit.181084/