MV Found a bug with a Yanfly selection control plugin.

So I know this is one of those situations where I know what's causing the problem but not how to fix it.

Basically if I use a skill that creates a state, and that state temporarily gives lets say actor 'a' an untargetable status (in my case <Cannot Select: Element x> notetag)

Well if I use a skill of that element on actor 'a' same turn by actor 'b' and actor 'b' has less agility, it basically resolves the untargetable state first and the second skill tries to target, sees that it's not supposed to target actor 'a' and crashes the game.

1709587317602.png


Is there a different way I can go about solving the conditional targeting problem? Basically the idea is the skill creates a state so that only specific elements can target it a few turns, but the elements that can target it deal more damage. I included skill and state screenshots as well.
1709587598119.png


1709587625909.png
Your description of the problem is not what the crash's error trace is showing.

That error says that one of your actors has ended up with a decimal value for the HP. Most likely cause is doing something with a notetag/script call for gainHp() someplace that isn't rounding the math.
Strange. It only triggers when I do that though. But thanks, this is helpful.
then check the order of your yanfly plugins.
they are known to cause strange effect if placed in the wrong order.

Original thread: https://forums.rpgmakerweb.com/threads/found-a-bug-with-a-yanfly-selection-control-plugin.166472/