MV State Counters tracking Misses

Hello! Is there a way to use states to check for misses in MV? Ideally I want to check and apply a state counter for each miss, but "if (b.result().missed){" doesn't seem to work w/Custom Action Effects such as <Custom Initiate Effect> or
<Custom Conclude Effect>, likely due to how misses/evasion are calculated. I'm using all of yanfly's plugins and Buffs & States Core.

I tried this as well just in case but it's a lot less specific than i was hoping:

Code:
<Custom Confirm Effect>

if (value < 0 && this.isHpEffect()){

user.addStateCounter(538, 1);

user.clampStateCounter(538, 0, 3);

}

</Custom Confirm Effect>

my original attempt:

Code:
<Custom Confirm Effect>
if (b.result().missed){
user.addStateCounter(538, 1);
user.clampStateCounter(538, 0, 3);
}
</Custom Confirm Effect>
You're missing a part of Yanfly's instructions in the Buffs & States Core.

At the beginning of the Custom Action Effects section, it lists which notetags only run when the action successfully hits and which ones run regardless.

So there's no point in checking for a miss inside of a Confirm effect, because that notetag won't be getting executed if the skill missed.

What you have should work inside of a Custom Conclude Effect.

If not - how are you using the notetag? I presume it's on the attacker via a passive state?
You're missing a part of Yanfly's instructions in the Buffs & States Core.

At the beginning of the Custom Action Effects section, it lists which notetags only run when the action successfully hits and which ones run regardless.

So there's no point in checking for a miss inside of a Confirm effect, because that notetag won't be getting executed if the skill missed.

What you have should work inside of a Custom Conclude Effect.

If not - how are you using the notetag? I presume it's on the attacker via a passive state?

I did read that but I wasn't sure if a successful evasion on the target's part was the same as a miss on the user's part when I checked b.result().evaded, sometimes brute forcing things has led me to find a lot of solutions haha (not so much this time). The conclude effect worked perfectly, thanks for the quick fix!

Original thread: https://forums.rpgmakerweb.com/threads/state-counters-tracking-misses.157968/