Need help with a focus sash-like item

I wanna make an accessory that will keep the wearer alive when hitting 0hp, (as well as healing them 15%) once per encounter
I figured i'd try to use yanfly's auto passive states plugin but i couldn't figure out a working solution

I'll gladly use another plugin if there's a better solution
you might need 2 states for that since you want to be able to reset with each fight

take your current passive on the accessory and give it a <custom battle effect> to apply another state at the start of the fight. then give that second state a trait to resist KO and a <custom deselect effect> to heal the target and remove itself if their hp was at 0
you might need 2 states for that since you want to be able to reset with each fight

take your current passive on the accessory and give it a <custom battle effect> to apply another state at the start of the fight. then give that second state a trait to resist KO and a <custom deselect effect> to heal the target and remove itself if their hp was at 0
you might need 2 states for that since you want to be able to reset with each fight

take your current passive on the accessory and give it a <custom battle effect> to apply another state at the start of the fight. then give that second state a trait to resist KO and a to heal the target and remove itself if their hp was at 0
Sounds good but i don't really understand how the notetag <custom deselect effect> works
will you please explain it to me?
Custom deselect effexts run as the battler with the state is targeted for an action and is one of the last things to happen in the process of hitting a target

It slipped my mind, but what youre asking for the state to do is pretty much exactly what Yanfly's Autolife tip does. give it a shot
Ah perfect, it's exaclty what i needed lol. Thank you 😀

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-a-focus-sash-like-item.176660/