Help pls - How can i...?

Hi, im new at this forum. Im stuck in a project where i need to implement this mechanic:
In battle i want to use "HP" concept as a shield, if the player gets 0 it may cause an state called "vulnerable"; if the player gets injured when they are into that state; they automatically dies. How can i do this? i tried using some new states (made by me) but the game always counts 0 "hp" as a death, so i cant fix it. Any ideas?

Ps: I want also to recover shield conform turns passes.
Ps2: Sorry my bad english. Working on it...

Greetings, be safe and thanks in advance.
I would use the VisuStella Skills and States Core.

Give all of your actors a passive state that says (pseudo-code):
-Would incoming damage kill me? And I don't have vulnerable on?
--If yes, adjust damage to leave me at 1 HP and add vulnerable
I would use the VisuStella Skills and States Core.

Give all of your actors a passive state that says (pseudo-code):
-Would incoming damage kill me? And I don't have vulnerable on?
--If yes, adjust damage to leave me at 1 HP and add vulnerable
Thanks for quick reply, ill update soon as i can.

Original thread: https://forums.rpgmakerweb.com/threads/help-pls-how-can-i.143220/