Tips & Tricks – Buff Breaker – 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.

Buff Breaker is an effect that clears the board of buffs and debuffs. For each debuff cleared, the unit will be healed. For each buff cleared, the unit will be dealt damage. Here’s how to create this effect in RPG Maker MV!

You can grab the copy/paste code here: 

Insert the following code into your Buff Breaker skill’s notebox. Change the values in red to fit your game’s settings.

<Target: Everybody>

<After Eval>
// Initialize the HP value.
var hp = 0;
// Loop through all 8 parameters.
for (var i = 0; i < 8; i++) {
  // If it is a buff...
  if (target._buffs[i] > 0) {
    // Then increase the damage by a formula.
    hp -= user.mat * 2;
  }
  // If it is a debuff...
  if (target._buffs[i] < 0) {
    // Then increase the healing by a formula.
    hp += user.mdf * 2;
  }
  // Reset the buff to neutral.
  target._buffs[i] = 0;
}
// Check if the HP change is positive...
if (hp > 0) {
  // Play an animation.
  target.startAnimation(41);
// Check if the HP change is negative...
} else if (hp < 0) {
  // Play an animation.
  target.startAnimation(56);
}
// Check if the HP amount isn't 0...
if (hp !== 0) {
  // Alter the target's HP.
  target.gainHp(hp);
  // Start the damage popup for the target.
  target.startDamagePopup();
}
// Clear the target's results.
target.clearResult();
</After Eval>

Enjoy!

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