Tips & Tricks – EMP Shockwave (StarCraft) – 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.

Today’s Tips & Tricks is a continuation of yesterday’s! Where barrier points were converted into HP healing yesterday, today we’ll look at barrier points being converted into MP damage! Slightly tweaked from StarCraft’s EMP Shockwave, we’ll be making a skill that deals MP damage based on half of the barrier points removed!

You can grab the copy/paste code here: 

Insert the following code into your skill’s notebox. Change the value in red to fit your game’s settings!

<After Eval>
// Get the target's total barrier points.
var barrier = target.barrierPoints();
// Make the target lose those barrier points.
target.loseBarrier(barrier);
// Calculate the MP removed based on the barrier points.
var mploss = Math.ceil(barrier * 0.50);
// Make the target lose that MP.
target.gainMp(-mploss);
// Play a damage popup.
target.startDamagePopup();
// Clear the target's results.
target.clearResult();
</After Eval>

Happy RPG Making!

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