MV Equipment that applies state only in combat

Hello,
I'd like to create an armor that gives a state that heals the user for 10% mhp every turn.
I found the AutoPassiveStates plugin here on another thread, but my issue is that the heal also happens outside of battle whenever the player moves around the map.
I am assuming it is removable with a conditional passive, but I don't know anything about JavaScript

Thanks!
(Sorry if this is the wrong forum, it's my first time posting here)
You could have a parallel event that gives your actors immunity to that state whenever they are on the map and a troop event that removes that immunity in combat.
Ohh that's a good idea, I'll do that thanks!
Or if it's just one item, you could just test for it in battle.
Or, with YEP_AutoPassiveStates, you could try this tag on the passive state:

<Custom Passive Condition> condition = $gameParty.inBattle(); </Custom Passive Condition>
I.e. "active iff the party is in battle".
Or, with YEP_AutoPassiveStates, you could try this tag on the passive state:

<Custom Passive Condition> condition = $gameParty.inBattle(); </Custom Passive Condition>

I.e. "active iff the party is in battle".
Of course there was a fancy script way. 😀 Probably should go with that to avoid having an extra parallel event floating around everywhere if you can.
Or, with YEP_AutoPassiveStates, you could try this tag on the passive state:

<Custom Passive Condition> condition = $gameParty.inBattle(); </Custom Passive Condition>

I.e. "active iff the party is in battle".
Works perfectly, thanks a lot !!

If I'm being honest, I didn't manage to make the first solution work but thanks anyway 😀

Original thread: https://forums.rpgmakerweb.com/threads/equipment-that-applies-state-only-in-combat.158679/