MV Blessing of Protection skill

Hello,
I would need help doing this skill.

Capture d’écran 2021-01-06 020647.png


I have all of Yanfly's plugins.

I'll admit that I'm a coding newbie and I'm not sure where to start to do this skill.

If anyone would give me any advice, I thank you in advance.

Edit: Here is where I start but it doesn't work at all and I don't know why ..

Code:
<Custom React Effect>
if (this.isPhysical() && this.isHpEffect() && value > 0) {
  var dmg = value;
  value = 0;
  target.gainHp(dmg);
</Custom React Effect>
I found part of the solution with this simple code.....

Code:
<Custom React Effect>
if (this.isPhysical()) {
  value = 0;
}
</Custom React Effect>

Now the problem is that I would like that when the battler is assigned to this state (346) it can't use physical skill.

For the basic attack it's easy, in the properties of the state I disabled "Attack".

But how can I make sure that not all physical skills can be used?

One method would be to put in each physical skill notetag this one:

Code:
<Custom Requirement>
if (user.isStateAffected(346)) {
  value = false;
} else {
  value = true;
}
</Custom Requirement>

The problem is that it can be quite long depending on the number of skills.

That's why I would like to know if there is a code in the state notetag (346) that would prevent the use of physical skills that have as element the physical element for example.
The only way to prevent skills from being used when afflicted by a state is to individually seal them all using the traits box on the state. Either seal them individually, or make them all belong to the same skillType and seal that skilltype to prevent use of any skills within it.

The alternative, is to use the custom requirement tag you've already found on every physical skill, and prevent them from being used when the user is under the affects of that specific state, as you already found. It is a time consuming process, but it's either that, or individually lock them all using the traits box.
Thank you for your response.

Original thread: https://forums.rpgmakerweb.com/threads/blessing-of-protection-skill.131872/