MZ State Immunity Pop ups

I sincerely hope this is the correct forum for this, but I'm looking for a way to have enemies show when they are immune to a specific state. I use most of the Visustella plugin set, so I have a way to make the pop ups I need (via BattleCore Action Sequences), but I have no idea how to trigger it properly. I've scoured the web, but everything I found has either not been exactly what I need, I do not understand or has no in depth explanation of how it's done.

I have no coding experience whatsoever, so I honestly don't know how to tweak something that's not completely what I need. This is driving me mad, as I feel like it shouldn't be this hard (and also, why does this not already exist?). Please help?

What I want: a pop up when an enemy is immune to certain state. Like Visustella's Weakness Display pop ups, but those only work for elemental rates, not states.
Preferably also show a separate 'resist' message when the skill 'could' work, but fails to apply the state - but for now I'll settle for the Immune.

Hurdles I need to overcome:
- Single target skills with only the state effect
- Multi target skills with only the state effect
- Skills that deal both damage and (have a chance to) state effect
- Mixed battles of creatures immune and creatures that are not immune

What I've tried:
- "Misusing" the Weakness Display by creating a specific 'element' for a state, so I could set that to 0 and get the Weakness Display 'Immune' pop up.
This fails on the skills that are also supposed to deal damage. Because of the element rate the damage would also get reduced to 0. Also the skill needs to deal damage (which can be set to 0) for the element rate to count.
- Setting switches on battles with immune creatures and have 'immune' pop ups appear when the specific states are used
This does not work for battles with mixed creatures, as every time state X is used it would show the message even if it could be applied.
- Check if afterwards the target is affected by the state
Doesn't check if the creature is immune, the state could simply have missed. Also if it's a multi-target skill I've only found how to check if no one is affected, not if for example half have the state and the other half doesn't.

What I would love for you to help me with:
1) Is it possible to check if an enemy is actually resistant to a state? I've found .isStateResist(), but I cannot get it to work in a conditional branch with target.isStateResist(12) (while target.isStateAffected(12) does work).
2a) If 1 is possible, how would I use that to check multiple enemies and show a message for each specific enemy that is immune?
2b) If 1 is not possible, how can I use the 'isStateAffected' for each individual enemy (via common event) and show a message where appropriate?
3) The big one: is there an easier way to accomplish this?

As I said I feel completely overwhelmed with the script calls and such, so complete examples would help me, not just 'use this piece of script somewhere'.

Example of what I've tried in a common event:

1706533698457.png
I have moved this thread from RPG Maker MZ Support to JavaScript/Plugin Support, but I super promise it’s not a dig deal to post in the wrong section lol.

Original thread: https://forums.rpgmakerweb.com/threads/state-immunity-pop-ups.165255/