Tips & Tricks – Echo of Light (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.

Echo of Light is a passive skill from the World of WarCraft. When directly healing an ally, the target will heal an extra 10% over a brief period of time (or in RPG Maker MV’s case, a few extra turns). Here’s how to recreate this effect in RPG Maker MV!

You can grab the copy/paste code here: 

Place the following code in the Echo of Light Passive state. Change the values in red to fit your game’s settings.

<Custom Establish Effect>
// Check if the action deals HP healing and the target is alive.
if (this.isHpEffect() && target.result().hpDamage < 0 && target.isAlive()) {
  // Add the Echo of Healing state.
  target.addState(164);
  // Calculate 20% of the amount healed.
  var healing = Math.abs(Math.ceil(target.result().hpDamage * 0.20));
  // Default the echo healing total to 0.
  target._echoHealing = target._echoHealing || 0;
  // Add the healing amount to the echo healing total.
  target._echoHealing += healing;
}
</Custom Establish Effect>

Place the following code in the Echo Healing state. Change the values in red to fit your game’s settings.

<Custom Regenerate Effect>
// Default echo healing to 0.
user._echoHealing = user._echoHealing || 0;
// Check if the user is alive and the echo healing value is greater than 0.
if (user.isAlive() && user._echoHealing > 0) {
  // Get the number of turns left for the state.
  var turns = Math.max(1, user.stateTurns(stateId));
  // Calculate the amount of healing to be done.
  var dmg = Math.ceil(user._echoHealing / turns);
  // Decrease the total echo healing amount.
  user._echoHealing -= dmg;
  // Have the user gain HP.
  user.gainHp(dmg);
  // Show an animation.
  user.startAnimation(45);
  // Start the damage popup.
  user.startDamagePopup();
  // Clear the result.
  user.clearResult();
  // Check if the user is dead.
  if (user.isDead()) {
    // Perform a collapse.
    user.performCollapse();
  }
}
</Custom Regenerate Effect>

<Custom Remove Effect>
// Reset the echo healing amount.
user._echoHealing = 0;
</Custom Remove Effect>

Enjoy!

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