Prevent Sealing Of Skill If Passive Skill Is Equipped When Silent

I'm making a game with a lot of skills and classes, I was wondering if there was a way to create a passive skill on let's say a Healer class, so if that passive skill is equip then it would prevent sealing Healing, Restore and Revive skills as examples.

I am using many of Yanfly's Plugins including Auto Passive States, Passive Aura Effects, Equip Skill Tiers and Class Change Core, Subclass. Link to Yanfly Plugins below.
http://yanfly.moe/yep/

So let's say the Healer has a Magi Subclass as well.

Then the Healer would have skills such as Fire, Ice, Thunder, Heal, Restore, Revivie. Now if they equip a Passive Skill called Silent Remedy then anytime they are have the Silent State added to them in battle, they will have Fire, Ice, Thunder sealed, but no longer Heal, Restore Revivie sealed.

Now if they remove that Passive Skill, then get the Silent State in battle, then it would seal all skills. Fire, Ice, Thunder, Heal, Restore, Revive. But the moment the they equip the Silent Remedy skill as a Passive Skill again, go into battle and get the Silent state on themselves, they unseal Heal, Restore and Revive in battle.

Does anyone know an easy way to accomplish this? Thank you.
group them under a different skill type, and seal by skill type.
that's one way of doing it, without plugins.

the other way, is manually, with specific seals.
I'm thinking that the best way to do this would be to create two States - one, a visible seal state that seals the elemental skills; the other, a non-visible (Priority 0, no icon) state that seals the healing skills. On the Elemental skill seal state, give it a Custom Apply Effect using Yanfly's Buffs & States Core. The Custom Apply Effect should evaluate whether the battler has the Silent Remedy passive (not sure how you're implementing this passive in the first place, so implementation will vary based on that), and if the battler does not have this passive, it will also add the Healing skill seal state to this battler.
I'm thinking that the best way to do this would be to create two States - one, a visible seal state that seals the elemental skills; the other, a non-visible (Priority 0, no icon) state that seals the healing skills. On the Elemental skill seal state, give it a Custom Apply Effect using Yanfly's Buffs & States Core. The Custom Apply Effect should evaluate whether the battler has the Silent Remedy passive (not sure how you're implementing this passive in the first place, so implementation will vary based on that), and if the battler does not have this passive, it will also add the Healing skill seal state to this battler.
To build upon this suggestion, rather than use a custom apply effect, you could also just make any silence skill apply both the elemental silence, and the healing silence, and make the passive skill/state that is equipped on the healer class make the actor immune to the healing sealing state.
To build upon this suggestion, rather than use a custom apply effect, you could also just make any silence skill apply both the elemental silence, and the healing silence, and make the passive skill/state that is equipped on the healer class make the actor immune to the healing sealing state.

I thought about this solution too, but the problem is that it only works if the Silence state is always applied at 100% (with nothing in the game that gives a % chance to resist it, and no LUK-based calculations). If it applies at less than a 100% chance - for example, a spell that has a 60% chance to silence an enemy - then the two States would be calculated and applied (or not applied) separately, which is not the desired behavior.
@gstv87
@Wavelength
@ramza

I am planning to have a Skill Type called Passives, and add them through Yanfly's Equip Skill Tiers Plugin. Link below.
http://yanfly.moe/2016/04/10/yep-91-equip-skill-tiers-rpg-maker-mv/

My thoughts on the manual way is I may be able to do that because I need different Skill Types for each Class anyway, so there may be a way to bypass that, but I'm clueless as to what to write in the description boxes for the Lunatic Mode of Yanfly plugins way.
I thought about this solution too, but the problem is that it only works if the Silence state is always applied at 100% (with nothing in the game that gives a % chance to resist it, and no LUK-based calculations). If it applies at less than a 100% chance - for example, a spell that has a 60% chance to silence an enemy - then the two States would be calculated and applied (or not applied) separately, which is not the desired behavior.
That is indeed an issue I hadn't considered. And now that you've brought it to my attention, I need to change something in my own project. Thanks. XD

@atoms As wavelength said, you'd use a <custom apply effect> on your main silence state which would check if the target of the state is also affected by the passive state that allows him to cast healing spells while silenced, and if found not to have that state, apply that silence as well.

Code:
<custom apply effect>
if (!target.isStateAffected(X)){
target.addState(X)
}
</custom apply effect>

Obviously replace the X with the stateId of your healer passive state.
@Wavelength
@ramza

Thank you both very much! That is great. It seems I just keep needing to know these bits of lunatic mode codes, and then after what I want to be done can easily happen. In this case, seems simple enough, but you just need to know the java code on how to add states and things.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/prevent-sealing-of-skill-if-passive-skill-is-equipped-when-silent.105987/