MV Give Conditions to State/Skill Activating?

Is there any way to give conditional statements to states or skills? For example, I want to give a character a state that only activates its effect if a specific character is in the party. When this specified character is in the party, the character affected by special state will increase their healing done by 150%. Basically, this character works harder when their friend is in the party. I'm using Yanfly's auto passive plugin to give the character the state passively, but I only want the effect of the state to work if that other character is in the party.

I'm using MV.
Yanfly's plugin instructions provide the Custom Passive Condition notetag which takes a JavaScript evaluation.

You could combine that with the MV script call list pinned thread (or Googling something like "RPG Maker script actor in party") and get the following:
Code:
<Custom Passive Condition>
condition=$gameParty.members().includes($gameActors.actor(ID));
</Custom Passive Condition>
where ID is the ID of the friendly actor (no leading zeros).

Good luck!

Original thread: https://forums.rpgmakerweb.com/threads/give-conditions-to-state-skill-activating.157438/