MV How to run notetag code after all attacks?

Hi! So I'm trying to run a bit of javascript after an attack that hits two random enemies, and an attack that hits four random enemies. The problem is that instead of running after all the attacks are finished, it runs after each attack. How would I fix this? This is the current notetags I have, and I'm using Yanfly's SkillCore:
JavaScript:
<After Eval>
// Up the cacophony counter by two
user._stateTurns[33] = user._stateTurns[33]+2;
</After Eval>
Hi! So I'm trying to run a bit of javascript after an attack that hits two random enemies, and an attack that hits four random enemies. The problem is that instead of running after all the attacks are finished, it runs after each attack. How would I fix this? This is the current notetags I have, and I'm using Yanfly's SkillCore:
JavaScript:
<After Eval>
// Up the cacophony counter by two
user._stateTurns[33] = user._stateTurns[33]+2;
</After Eval>
try halving the value,
want to hit four enemies? then

user._stateTurns[33] += 0.5;

want to hit two enemies? then

user._stateTurns[33] += 1;
Johnny's reply seems like it would work... but to figure out why, you need to know how multi-target attacks actually work.

First, all the targets are selected. Either a single target, all available targets, or in this case, a random number of targets. After that, it runs the skill routine repeatedly, for EACH target. So MV/MZ actually treats ALL skills as single target skills, and just uses them for each selected target. This means any such code will run each time the skill completes, which is once for each target.

Single target? Runs once. All targets? Runs once for each target in the group in question. X random targets? Runs X times.

Hope that helps!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-run-notetag-code-after-all-attacks.138653/