Tips & Tricks – Atonement (World of WarCraft) – 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.

Atonement is an interesting buff in the World of WarCraft. The effect by itself doesn’t do anything too special. However, when the caster deals spell damage, it instantly heals all affected allies for 40% of the damage dealt. Here’s how to recreate the effect in RPG Maker MV!

You can grab the copy/paste code here: Insert the following code into the Atonement Global state. Change the values in red to reflect the settings of your game.

<Custom Establish Effect>
// Check if the current effect dealt HP damage and is magical.
if (this.isHpEffect() && this.isMagical() && value > 0) {
  // Set the ID of the atonement state.
  var atonement = 225;
  // Get current alive members.
  var group = user.friendsUnit().aliveMembers();
  // Calculate the amount of HP healed.
  var hpHealed = Math.floor(value * 0.401);
  // Go through all of the party members.
  for (var i = 0; i < group.length; ++i) {
    // Get the currently looped ally.
    var ally = group[i];
    // Check if the ally exists, is affected by atonement, and the original caster of the state is the current user.
    if (ally && ally.isStateAffected(atonement) && ally.stateOrigin(atonement) === user) {
      // If it matches, heal the ally.
      ally.gainHp(hpHealed);
      // Start the damage popup.
      ally.startDamagePopup();
      // Clear the results.
      ally.clearResult();
    }
  } 
}
</Custom Establish Effect>

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