Wit's End (MV Plugin Tips & Tricks)

From Yanfly.moe Wiki
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.


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!

Required Plugins

The following plugin(s) is required to create this Tips & Tricks effect:

For help on how to install plugins, click here.

For help on how to update plugins, click here.

About

This is a Tips & Tricks effect created for RPG Maker MV. Tips & Tricks are not to be confused with plugins. Instead, they are usually customized code created for the sake of producing unique features/effects that do not require an entire plugin to do.

Yanfly Engine Plugins

This Tips & Tricks effect is made possible due to the Yanfly Engine Plugins library.

Click here if you want to help support Team Yanfly on Patreon.

Instructions

Follow video instructions.

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>