MV Yanfly Skill Core - How to check enemy state before damage eval?

Hello everyone,
I've made a skill with the intention that it gets 2 hits against targets that are not affected by a particular state, and 4 hits against targets that are affected by it. For the sake of completion, it's also restricted to the user being affected by a particular state as well, in addition to an HP% cost (just in case there's some disagreements.) Here is what I have in the notebox:

<Custom Requirement>
if (user.isStateAffected(11) || user.isStateAffected(12) || user.isStateAffected(13)) {
value = true;
} else {
value = false;
}
</Custom Requirement>
<HP Cost: 15%>
<Pre-Damage Eval>
if (target.isStateAffected(14)) {
<repeat: 4> }
else {
<repeat: 2> }
</Pre-Damage Eval>

The issue I'm having is that the "else" part of the Pre-Damage Eval is the only part that works. It appears to be that the state-detecting part of the code is incorrect. In place of "target" I've also tried "b" and "enemy", but it doesn't change the outcome. I suspect that the issue is the way I've asked the game to check for the state. Any help would be appreciated!
You cant stick notetags inside of code like that. The repeat is only set to be written at the start of the game, and when it does, its not considering any code youve tried to wrap around it. Its only hitting twice because the 2 is the most recent repeat notetag the plugin read while setting up the game.

You can use yanflys action sequences plugin and set up a conditional statement to execute the action effect twice or 4 times based on those states
Ah, okay. That explains that. Thank you. Solved.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-core-how-to-check-enemy-state-before-damage-eval.177173/