Tips & Tricks – False Promise (DOTA2) – 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

The Oracle, from DotA2, has a unique ability to delay direct damage and healing until after an effect is over allowing for a myriad of applications! Here is how you can recreate such an effect in RPG Maker MV!

Get the copy/paste version of the code here:

Place this inside of your False Promise state. Change the parts in red to fit your game.

// To prevent infinitely reapplying the effect and making a target invulnerable to direct damage.
<Reapply Ignore Turns>

<Custom Apply Effect>
// Sets the default promised damage to 0 if it is undefined.
target._promisedDmg = target._promisedDmg || 0;
</Custom Apply Effect>

<Custom React Effect>
// If the receiving action is an HP damage effect...
if (this.isHpEffect()) {
  // Sets the default promised damage to 0 if it is undefined.
  target._promisedDmg = target._promisedDmg || 0;
  // If the damage is positive...
  if (value > 0) {
    // Then, add it to the promised damage value.
    target._promisedDmg += value;
  // If the damage isn't positive...
  } else {
    // Then, double it as healing.
    target._promisedDmg += value * 2;
  }
  // Set the received damage to 0.
  value = 0;
}
</Custom React Effect>

<Custom Remove Effect>
// Sets the default promised damage to 0 if it is undefined.
target._promisedDmg = target._promisedDmg || 0;
// If the promised damage is positive...
if (target._promisedDmg > 0) {
  // Then play a damage animation.
  target.startAnimation(11);
// If it isn't positive...
} else {
  // Then play a healing animation.
  target.startAnimation(41);
}
// Alter the target's HP based on the damage received.
target.gainHp(-target._promisedDmg);
// Start the damage popup.
target.startDamagePopup();
// Clear the target's result.
target.clearResult();
// If the target is dead...
if (target.isDead()) {
  // Play the collapse animation on the target.
  target.performCollapse();
}
target._promisedDmg = undefined;
</Custom Remove Effect>

Happy promising!

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