Tips & Tricks – Wit’s End

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.

Wit’s End is a weapon from League of Legends that adds on bonus magic damage to basic attacks, decreases the enemy’s magic resistance, and increases your own! Here’s how to recreate this high utility weapon for RPG Maker MV!

You can find the copy/paste code here: 

For those who would like the magic defense to be lowered first before applying magic damage, use this one:

<Custom Confirm Effect>
// Check if the action is a basic attack.
if (this.isAttack()) {
  // Calculate the number of turns the user has for MDF buff.
  var turns = user.buffTurns(5);
  // Make the minimum number of turns for MDF buff to 3.
  turns = Math.max(3, turns);
  // Increase the MDF rate for user.
  user.addBuff(5, turns);
  // Calculate the number of turns the target has for MDF buff.
  var turns = target.buffTurns(5);
  // Make the minimum number of turns for MDF debuff to 3.
  turns = Math.max(3, turns);
  // Decrease the MDF rate for target.
  target.addDebuff(5, turns);
  // Calculate the damage dealt.
  var damage = (user.mat - target.mdf) * 0.40;
  // Round the damage dealt upward.
  damage = Math.ceil(damage);
  // Ensure that the bonus damage has a minimum of 0 damage.
  value += Math.max(0, damage);
  // Set the color used for a screen flash.
  var color = [0, 255, 255, 64];
  // Set the duration of the screen flash.
  var duration = 8;
  // Cause the screen to flash when a basic attack connects.
  $gameScreen.startFlash(color, duration);
}
</Custom Confirm Effect>

For those who would like the magic defense to be lowered after applying magic damage, use this one:

<Custom Confirm Effect>
// Check if the action is a basic attack.
if (this.isAttack()) {
  // Calculate the damage dealt.
  var damage = (user.mat - target.mdf) * 0.40;
  // Round the damage dealt upward.
  damage = Math.ceil(damage);
  // Ensure that the bonus damage has a minimum of 0 damage.
  value += Math.max(0, damage);
  // Calculate the number of turns the user has for MDF buff.
  var turns = user.buffTurns(5);
  // Make the minimum number of turns for MDF buff to 3.
  turns = Math.max(3, turns);
  // Increase the MDF rate for user.
  user.addBuff(5, turns);
  // Calculate the number of turns the target has for MDF buff.
  var turns = target.buffTurns(5);
  // Make the minimum number of turns for MDF debuff to 3.
  turns = Math.max(3, turns);
  // Decrease the MDF rate for target.
  target.addDebuff(5, turns);
  // Set the color used for a screen flash.
  var color = [0, 255, 255, 64];
  // Set the duration of the screen flash.
  var duration = 8;
  // Cause the screen to flash when a basic attack connects.
  $gameScreen.startFlash(color, duration);
}
</Custom Confirm Effect>

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