Plague Touch (MV Plugin Tips & Tricks)

From Yanfly.moe Wiki
Revision as of 14:59, 8 July 2019 by Yanfly (talk | contribs) (Created page with "{{Yanfly Tips & Tricks MV |preview = <youtube>https://www.youtube.com/watch?v=Obs1kOtpnqk</youtube> |desc = Roaming Mend is a skill used by the Dark Side in Star Wars: The O...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.


Roaming Mend is a skill used by the Dark Side in Star Wars: The Old Republic. When an ally affected by Roaming Mend is struck, it will heal that ally and then move to another random ally with the same effect. Roaming Mend can heal up to 4 allies this way. Now, you can recreate this effect 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 to change the code to fit your game!

// Skill Core

<Custom Requirement>
// Check state count for state category the user is affected by.
var count = user.getStateCategoryAffectedCount('Ailment');
// Set the requirement condition to be dependent on the count.
value = count > 0;
</Custom Requirement>

// Skill Core

<After Eval>
// Get the states the user is currently affected by.
var states = user.states();
// This is the category we want to transfer.
var category = 'Ailment';
// Create a loop that goes through each state.
while (states.length > 0) {
  // Get the currently looped state.
  var state = states.shift();
  // Check if the state's categories has the one we want.
  if (state.category.contains(category.toUpperCase())) {
    // Get the number of turns left on the user for the state.
    var turns = user.stateTurns(state.id);
    // Remove the state from the user.
    user.removeState(state.id);
    // Add the state to the target.
    target.addState(state.id);
    // Check if the addition of the state went through.
    if (target.isStateAffected(state.id)) {
      // Set the number of turns for that state for the target.
      target.setStateTurns(state.id, turns);
    }
  }
}
</After Eval>

// Action Sequence

// Sets up the action.
<setup action>
display action
immortal: targets, true
</setup action>

// Moves the user in front of the target.
<whole action>
move user: targets, front, 20
motion standby: user
wait for movement
</whole action>

// User removes ailments from self and applies it to target.
<target action>
face user: target
animation 58: user
wait for animation
motion thrust: user, no weapon
wait: 10
action animation: target
wait for animation
action effect
</target action>

Happy touching!