While the title is pretty self-explanatory, there is one important detail: this isn't meant to affect every enemy in the game, just specific enemies that are given a "resistance" to the state in question.
Thanks in advance.
you could use a troop event in the battles they show up in to check if they have the state at the end of every turn, and if they do, give them an invisible state with a 0% state rate for that first state
You could also make two versions of this enemy with everything including the name identical, except the second one has the immunity.
Make the first one to be initial enemy, then make them transform into the second form with zero visual effects if they get the specific state (via a conditional branch command in the troop setting).
Probably should use "state resist" instead of "0% state rate", because then it works against certain hit attacks, right?
So, something like this?
<Custom Apply Effect>
if (user.isStateAffected(18)) {
user.addState(53);
}
</Custom Apply Effect>
And I would also need to check the specific enemy ID, but I don't know how to do that.