Tips & Tricks – Magic Guard

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

Magic Guard is a status effect that reduces incoming damage by displacing 85% of it through MP. If MP reaches 0, then the Magic Guard effect will wear off.

Buffs and States Core

Here is the copy and paste version of the code:

Please wait while you are redirected...or Click Here if you do not want to wait.
<Custom React Effect>
if (value > 0 && this.isHpEffect()) {
  var mpDmg = Math.floor(value * 0.85);
  mpDmg = Math.min(mpDmg, target.mp);
  target.gainMp(-mpDmg);
  value -= mpDmg;
  if (target.mp === 0) {
    target.removeState(71);
  }
}
</Custom React Effect>

Have fun everybody!