Flying Passives and ways to "Silence" it.

Hello. So I am currently experimenting with a mechanic in my game where there is a Flying and Grounded state. Flying itself is a state, while Grounded is just the absence of it. Flying is a state that some abilities can apply but it is also a passive a lot of 'flying enemies' possess, and the state itself grants the affected troop immunity to Grounded attacks, bonus damage from Electric attacks, and an additional 10% Evasion. Only by hitting them with Root could they become Grounded, disabling all the aforementioned buffs, albeit temporarily and enemies with Flying as a passive state will get them back soon.

So I've tried several methods like making a state that had those parameters and even applying the parameters themselves to the enemy of my choosing with no passive. My issue at the moment is how Grounded attacks would still do zero damage even if I Root the target, as I also programmed Root to remove the Flying state or just outright reverse the buffs. The enemy still didn't take any Grounded damage.

Can anyone help me with the execution for this idea of mine, if it's possible? I only have several Yanfly plugins to help me, including the AutoPassive one.

EDIT: In case my description of the state is confusing, allow me to reword it in a TL;DR:

Flying is a state that can be applied (lasts for 3-4 turns) but also a passive. It gives immunity to Grounded attacks, weakness to Electric attacks, and additional +10% Evasion. The Root state (or at least abilities that apply Root) removes the state and its benefits, making Flying enemies susceptible to Grounded Attacks and losing the bonus evasion.

This is at least what I was going for.
Okay in case my description of the state is confusing, allow me to reword it in a TL;DR:

Flying is a state that can be applied (lasts for 3-4 turns) but also a passive. It gives immunity to Grounded attacks, weakness to Electric attacks, and additional +10% Evasion. The Root state (or at least abilities that apply Root) removes the state and its benefits, making Flying enemies susceptible to Grounded Attacks and losing the bonus evasion.

This is at least what I was going for.
Easily possible, but I don't see how we can help without seeing any related database tabs, what's your enemy page? What's your troop page? State page? And so on.

We would just be guessing.

Also, you should edit your post instead of double posting(Forum rules).
Can you add screenshots of these states?
Easily possible, but I don't see how we can help without seeing any related database tabs, what's your enemy page? What's your troop page? State page? And so on.

We would just be guessing.

Also, you should edit your post instead of double posting(Forum rules).
Here's each of them.
Spoiler: Flying State
1675425109218.png
Spoiler: Root State
1675425226990.png
Spoiler: Root Skill
1675425441776.png
Spoiler: Flying Bat Enemy
1675425382560.png

Also sorry for the double post. Will keep that rule in mind.
I think you should add state resist against flying state.

Edit: I'm sorry for my language mistakes.
I think you should add state resist against flying state.
I did and tested it. It still does 0 damage when I use a Grounded attack on a Rooted flying enemy.
Spoiler: Root w/ State Resist: Flying
1675426936941.png
YEP Auto Passive States implements passives separately from normal states. They never get added/removed/resisted: a passive state is always there, but may be active or inactive.

You can add a condition to the Flying passive state by using an appropriate tag in the Flying state's notebox, e.g.

<Custom Passive Condition> condition = true; if (user.isStateAffected(11)) { condition = false; } if (user.isStateAffected(31)) { condition = false; } </Custom Passive Condition>
I.e. "this passive is active unless the user is affected by state 11 (Root) or state 31 (Grounded)".
YEP Auto Passive States implements passives separately from normal states. They never get added/removed/resisted: a passive state is always there, but may be active or inactive.

You can add a condition to the Flying passive state by using an appropriate tag in the Flying state's notebox, e.g.

<Custom Passive Condition> condition = true; if (user.isStateAffected(11)) { condition = false; } if (user.isStateAffected(31)) { condition = false; } </Custom Passive Condition>

I.e. "this passive is active unless the user is affected by state 11 (Root) or state 31 (Grounded)".
This possibility occurred to me as well but i couldn't test this because i'm out. This is likely correct answer for the question.
YEP Auto Passive States implements passives separately from normal states. They never get added/removed/resisted: a passive state is always there, but may be active or inactive.

You can add a condition to the Flying passive state by using an appropriate tag in the Flying state's notebox, e.g.

<Custom Passive Condition> condition = true; if (user.isStateAffected(11)) { condition = false; } if (user.isStateAffected(31)) { condition = false; } </Custom Passive Condition>

I.e. "this passive is active unless the user is affected by state 11 (Root) or state 31 (Grounded)".
I did exactly that and it finally worked. Thank you so much for the help!

Original thread: https://forums.rpgmakerweb.com/threads/flying-passives-and-ways-to-silence-it.154646/