Tips & Tricks – Spirit Shell (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.

The Spirit Shell ability from the World of WarCraft allows a Priest to convert his/her heals into barriers while the Spirit Shell state is active! Now, you can do the same with RPG Maker MV!

You can grab the copy/paste version of the code here:

Full HP -> Barrier Conversion

<Custom Confirm Effect>
// Check to see if the used action affects HP, is a skill, and heals.
if (this.isHpEffect() && this.isSkill() && value < 0) {
  // Set the number of turns for the barrier.
  var turns = 3;
  // The percentage of points converted from the heal to barrier points.
  var rate = 1.00;
  // Create the number of barrier points granted.
  var barrier = Math.floor(value * rate * -1);
  // Target gains the barrier points for the forementioned turn count.
  target.gainBarrier(barrier, turns);
  // Reduce the barrier points from the healed amount.
  value += barrier;
}
</Custom Confirm Effect>

<Custom Establish Effect>
// Get the target's results.
var result = target.result();
// Check if the altered HP result is 0.
if (result.hpDamage === 0) {
  // Set the result's HP affected flag to false.
  result.hpAffected = false;
}
</Custom Establish Effect>

40% HP -> Barrier Conversion

<Custom Confirm Effect>
// Check to see if the used action affects HP, is a skill, and heals.
if (this.isHpEffect() && this.isSkill() && value < 0) {
  // Set the number of turns for the barrier.
  var turns = 3;
  // The percentage of points converted from the heal to barrier points.
  var rate = 0.40;
  // Create the number of barrier points granted.
  var barrier = Math.floor(value * rate * -1);
  // Target gains the barrier points for the forementioned turn count.
  target.gainBarrier(barrier, turns);
  // Reduce the barrier points from the healed amount.
  value += barrier;
}
</Custom Confirm Effect>

<Custom Establish Effect>
// Get the target's results.
var result = target.result();
// Check if the altered HP result is 0.
if (result.hpDamage === 0) {
  // Set the result's HP affected flag to false.
  result.hpAffected = false;
}
</Custom Establish Effect>

Enjoy!

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