how do I make passive states end after a set amount of turns I can't seem to find a way to make it limited (yanfly's auto passive states)

I assumed you could control how many turns the state would last when applied but there's no function to that ?
if its supposed to have a duration, then why make it a passive? just have it be a normal state?
if its supposed to have a duration, then why make it a passive? just have it be a normal state?
my idea was adding a state that appears at the beginning of the battle and lasts for a few turns but this only happens when you have an accessory equipped
youll have 2 states then in that case. give your passive a <custom battle effect>, and have that effect be to add the actual effect state to the battler
You could do that, or you can do it pretty easily with a custom condition.

Code:
<Custom Passive Condition>
condition = $gameParty.inBattle() && $gameTroop.turnCount()<=3;
</Custom Passive Condition>

That will turn the state off when it gets to turn 4.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-passive-states-end-after-a-set-amount-of-turns-i-cant-seem-to-find-a-way-to-make-it-limited-yanflys-auto-passive-states.164158/