Frenzy Virus (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.


The Frenzy Virus from Monster Hunter is interesting. When the target is initially infected with it, it doesn’t really do anything. However, depending on the ways the target acts in battle it can evolve two different ways leading into two different possible effects. Let’s take a look at how it works with this Tips & Tricks!

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.

You can grab the copy/paste code here: Insert the following code into the Frenzy Virus state’s notebox. Change the values to fit your game’s settings.

<Reapply Ignore Turns>

<Custom Apply Effect>
// Set the charges for both virus paths.
user._frenzyA = 5;
user._frenzyB = 5;
</Custom Apply Effect>

<Custom Remove Effect>
// Clear the charges for both virus paths.
user._frenzyA = undefined;
user._frenzyB = undefined;
</Custom Remove Effect>

<Custom Respond Effect>
// Default the charges for both virus paths for the target.
target._frenzyA = target._frenzyA || 5;
target._frenzyB = target._frenzyB || 5;
// If the target received HP damage...
if (target.result().hpDamage > 0) {
  // The A path loses a charge.
  target._frenzyA -= 1;
}
// If the A path is at 0 charges...
if (target._frenzyA <= 0) {
  // ...then remove the Frenzy State.
  target.removeState(stateId);
  // And then add the A path state.
  target.addState(206);
}
</Custom Respond Effect>

<Custom Establish Effect>
// Default the charges for both virus paths for the user.
user._frenzyA = user._frenzyA || 5;
user._frenzyB = user._frenzyB || 5;
// If the attacker deals damage to the target...
if (target.result().hpDamage > 0) {
  // The B path loses a charge.
  user._frenzyB -= 1;
}
// If the B path is at 0 charges...
if (user._frenzyB <= 0) {
  // ...then remove the Frenzy State
  user.removeState(stateId);
  // And add the B path state.
  user.addState(207);
}
</Custom Establish Effect>

Happy RPG Making!