Siphoning Strike (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.


In League of Legends, the champion Nasus has an ability called Siphoning Strike. Once used, his next attack deals bonus damage. If he kills an enemy with this attack, Siphoning Strike permanently gains bonus damage on subsequent uses. Now, you can recreate this ability in 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.

Warning for RPG Maker MZ Users

Warning.jpg

If you are using RPG Maker MZ and VisuStella MZ, the following code may or MAY NOT work as this Tips & Tricks is made for RPG Maker MV. VisuStella MZ is NOT responsible if this Tips & Trick does not work because the code base for RPG Maker MV and RPG Maker MZ are different and the code base between Yanfly Engine Plugins and VisuStella MZ is even more drastically different.

Instructions

Follow video instructions.

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

Be sure the change the code to fit your game.

<Custom Apply Effect>
// Sets the default Siphon Stack amount.
user._siphonbonus = user._siphonbonus || 1;
// Gets the Life Siphon bonus amount.
var bonus = user._siphonbonus;
// Create a counter to display it.
user.setStateCounter(stateId, 'x' + bonus);
</Custom Apply Effect>

<Custom Confirm Effect>
// Check if the current action is an attack.
if (this.isAttack()) {
  // Sets the default Siphon Stack amount.
  user._siphonbonus = user._siphonbonus || 1;
  // Calculate the bonus damage.
  value += user._siphonbonus * 100;
  // Play an animation on the target.
  target.startAnimation(102);
  // Get the target's current life state.
  target._lifeState = target.hp > 0;
}
</Custom Confirm Effect>

<Custom Establish Effect>
// Check if the current action is an attack.
if (this.isAttack()) {
  // Check if the target has fallen in this hit.
  if (target._lifeState && target.hp <= 0) {
    // Sets the default Siphon Stack amount.
    user._siphonbonus = user._siphonbonus || 1;
    // Increase the stacks by 1.
    user._siphonbonus += 1;
  }
  // Remove the Siphoning Strike state.
  user.removeState(stateId);
  // Reset the life state check.
  target._lifeState = undefined;
}
</Custom Establish Effect>

Happy Siphoning!