Tips & Tricks – Seraphic Planar Breastplate (Everquest Online Adventures) – RPG Maker MV

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.

This video, we’ll show an item effect from Everquest Online Adventures that will be recreated in RPG Maker MV. When the user is dealt damage, the armor will respond by dealing magic damage to the foe that physically attacked the user. After the magic damage is dealt, the user is healed for half the amount.

You can grab the copy/paste code here: 

Insert the following code in the passive state that is tied to the armor. Change the values in red to reflect the settings of your game.

<Custom Respond Effect>
// Check if the target is alive and the HP value is above 0.
if (target.isAlive() && target.hp > 0) {
  // Check if the user received physical HP damage from an opponent
  if (this.isHpEffect() && this.isPhysical() && user.isActor() !== target.isActor()) {
    // Calculate the damage dealt.
    var dmg = Math.ceil(target.mat * 0.50);
    // Make the attacker lose that HP.
    user.gainHp(-dmg);
    // Start the damage popup.
    user.startDamagePopup();
    // If the attacker is dead...
    if (user.isDead()) {
      // Make the attacker collapse.
      user.performCollapse();
    }
    // Clear the attacker's results.
    user.clearResult();
    // Make a copy of the wearer's results.
    var result = JsonEx.makeDeepCopy(target._result);
    // Calculate the healing.
    var heal = Math.ceil(dmg * 0.50);
    // Make the wearer gain the heal amount.
    target.gainHp(heal);
    // Start the damage popup.
    target.startDamagePopup();
    // Clear the wearer's results.
    target.clearResult();
    // Return the wearer's results to what it was before.
    target._result = result;
  }
}
</Custom Respond Effect>

Happy RPG Making!

Please wait while you are redirected...or Click Here if you do not want to wait.