State Conditional Targetting

Hi! I hope someone out there can help me out with this.

What I'm looking for is a script that will allow the enemies that skills target to be dependent on their state. What makes this a little trickier (I think) is that I would like what states are targeted to be dependent on the state of the initial enemy targeted.

drawing.JPG

So, taking the image above, that a skill could be set so that if I target an enemy with Poison, it will also hit the enemy with Silence but not the enemies with Blind and Confusion.

Is this possible?

Thanks in advance for any help or advice.
I can write this up for you if you'd like ^^. The way I'm thinking of doing it is having a <state chain> tag to define a chain of states to target based on an initial state. For example:

<state chain: 2>

4

</state chain>

would mimic the example you provided (based on the default database state ids). Would that be ok/similar to what you were thinking of?
I think that would be pretty perfect actually! Thank you so much! 😀
Here's a test copy: State Chains.zip

Let me know if it's going in the direction you were thinking of ^^. I'll flesh out the descriptions and stuff so it's more user friendly soon XS.

It applies damage to the chained enemies first and then to the initial target, but I can fix that up when I get a chance if you'd like XD.

Original thread: https://forums.rpgmakerweb.com/threads/state-conditional-targetting.23698/