How do I make a poison-like effect wear off when the target hits 1 HP?

I'm currently experimenting to try and make a skill that, if you have the necessary items, adds a state that gives the user an ATK boost and applies invincibility, but I want it to only run out once the user runs out of HP to lose. I can't just have it end after a certain amount of turns because there will be healing items. Can I do this without plugins? And if not, which one do I need?
How would the user run out of hp if the user is invincible?
How would the user run out of hp if the user is invincible?
I meant that enemies can't drain their health. The applied state acts like poison on top of it to act like a timer for the ability.
I’m still not really understanding what you’re trying to do.

If you just need the state to be removed when the user has a certain amount of hp you can use a troop event for that. Yanfly’s base troop events plugin will let you apply the event to all troops.
Hopefully that will work. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-a-poison-like-effect-wear-off-when-the-target-hits-1-hp.125301/