Overlife effect, is that possible?

Hey guys, I was thinking about some kind of passive effect that would do the following: "If you take lethal damage, become immune to damage this turn only.". This effect could trigger only one time per fight.

So, to made it clear:
If a Monster X deals lethal damage to the Character Y, the effect would trigger, preventing the Character Y's death and making It immune to any further damage suffered this turn.

Is there a way to do this? And If yes, how could I?
All I can think about is first making a state that negates all damage (EX Parameters Magic and Physical damage rates I think). Then use a plugin like Yanfly's Lunatic Pack State Protection to inflict the state when the actor recieves mortal damage. The once per battle thing I have no idea how to do. If only one actor at a time will be able to do it you could condition the state effect with a switch and then turn it off after battle.
Thank you so much! I checked this script out and I found a way to do it!

"
* <HP Protection: Guts x%>
* - Works only with HP type. Replace 'x' with the success rate percentage
* you wish to give this effect. If the affected target were to receive fatal
* damage as a result of this attack, there would be a x% chance the target
* would be able to survive with 1"
I'll set the X to 100 and then everything is fine!

Original thread: https://forums.rpgmakerweb.com/threads/overlife-effect-is-that-possible.102608/