State that nullifies all damage

Hello. I was thinking on adding a skill that grants a character a state that completely nullifies all damage taken.

First I considered adding a feature to the state that raises both the Physical and Magic Damage Reduction, but when testing, I saw it not only reduces damage but, can even recover damage; besides, i think it wouldn't reduce damage if attacks were set to Certain Hit, or if they dealt fixed damage, like 200 hit points. Then I thought adding two features that increase the Guard Rate and grant the Guard flag, so it would be like an overpowered Defense command, but while it reduces a lot the damage it does not completely reduce it. My last resort would be increasing the Defense a Magical Defense stats, but I think that would not solve all the problems, and could be counterproductive (i don't if that's how it's said in English).

So, is there anyway to achieve this without scripts, or will I need one?

Thanks.
The easiest way to do it (and avoid the problem of direct hits ignoring PDF and MDF) is this. Assign every attack an element except ones that you want to *always* do damage, then give the character under this state the following feature: Element rate: 0% to every element (including physical) that you want them to take no damage from.

This way you can add in a skill later that does damage no matter what by either assigning it the None element, or by assigning it to an element that is not set to 0% in this skill.
There is also this nifty little script which nullifies all physical, magical and certain hit damage
Make a state that sets both "Magical damage rate" and "physical damage rate" to 0% and you won't get any damage.


I think you really misunderstood how that works, because there is no "magical damage reduction" (or physical) and the mathematics of that feature are MULTIPLICATION, which means all values lower than 100% reduce damage taken and all values >100% increase damage taken, and you should never place negative values in such a feature.
Make a state that sets both "Magical damage rate" and "physical damage rate" to 0% and you won't get any damage.

I think you really misunderstood how that works, because there is no "magical damage reduction" (or physical) and the mathematics of that feature are MULTIPLICATION, which means all values lower than 100% reduce damage taken and all values >100% increase damage taken, and you should never place negative values in such a feature.
I set both to 0% but it still recovers HP, although it happens when the difference between the "attack" of the user and the "defense" of the target are very big.

Anyway, I've got the answer I was looking for. The script eases things and the element rate mechanic is usefull if I make a state that only protects from one type of damage. Thanks!

EDIT: I've experimented with a vanilla game and as you say it reduces damage to 0, which is pretty logic, so I guess the recovery issue must come from one of the scripts I am using.

Original thread: https://forums.rpgmakerweb.com/threads/state-that-nullifies-all-damage.43160/