Tips & Tricks – Topsy-Turvy (Pokémon) – 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.

Topsy-Turvy is a skill from Pokémon that flips a target’s buffs and changes into them into debuffs. Likewise, the debuffs on the target will flip and change into buffs. Here’s how you can create such an effect in RPG Maker MV!

Here’s the copy/paste version of the code: 

Insert this into your skill’s notebox:

<Before Eval>
// Make a loop that goes through the 8 parameters.
for (var i = 0; i < 8; ++i) {
  // Set the target's buffs/debuffs to equal 0 if they don't exist.
  target._buffs[i] = target._buffs[i] || 0;
  // Check if the target is either buffed or debuffed.
  if (target.isBuffAffected(i) || target.isDebuffAffected(i)) {
    // Flip it around!
    target._buffs[i] *= -1;
  }
}
</Before Eval>

Happy flipping!

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