Daring Padawan (MV Plugin Tips & Tricks)

From Yanfly.moe Wiki
Revision as of 18:00, 9 July 2019 by Yanfly (talk | contribs) (Created page with "{{Yanfly Tips & Tricks MV |preview = <youtube>https://www.youtube.com/watch?v=SUsGUVWdO-o</youtube> |desc = The Daring Padawan is a passive effect for Ahsoka Tano, a Jedi fr...")
(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.


The Daring Padawan is a passive effect for Ahsoka Tano, a Jedi from Star Wars: Galaxy of Heroes. This passive ability lets the user start the battle with a number of buffs. However, if the user suffers from a critical hit, the user losees one of the buffs. If the user lands a KO, the user regains all of the buffs that were lost. We’ll make a spin on this effect by making the user lose a random buff when lost instead of a certain order. Here’s how we can make 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 grab the copy/paste code here:

Insert the following Lunatic Mode code into your Daring Padawan passive state’s notebox. Change the values to reflect your game’s settings.
<Custom Battle Effect>
// Insert the ID's of the states you want to add as bonus states applied at the start of battle
var padawanStates = [305, 306, 307];
// Loop through each of those bonus states
for (var i = 0; i < padawanStates.length; ++i) {
  // Get currently looped state
  var bonusState = padawanStates[i];
  // Add the state to the user
  user.addState(bonusState);
}
</Custom Battle Effect>

<Custom React Effect>
// Check if the effect dealt HP damage and is a critical hit
if (this.isHpEffect() && value > 0 && target.result().critical) {
  // Get the padawan states
  var padawanStates = [305, 306, 307];
  // Make an empty pool of states
  var currentStates = [];
  // Loop through each of the padawan states
  for (var i = 0; i < padawanStates.length; ++i) {
    // Get the currently looped state
    var bonusState = padawanStates[i];
    // Check if the target is affected by that state
    if (target.isStateAffected(bonusState)) {
      // If it is, add it to the pool of states
      currentStates.push(bonusState);
    }
  }
  // Check if the pool of states isn't empty
  if (currentStates.length > 0) {
    // Get a random state from that pool
    var removedState = currentStates[Math.floor(Math.random() * currentStates.length)];
    // Remove the random state
    target.removeState(removedState);
  }
}
</Custom React Effect>

<Custom Establish Effect>
// Check if the regained states flag is off and if the target is dead or has 0 HP
if (!this._regainPadawanStates && (target.isDead() || target.hp <= 0)) {
  // Get the padawan states
  var padawanStates = [305, 306, 307];
  // Loop through each of the states
  for (var i = 0; i < padawanStates.length; ++i) {
    // Get the currently looped state
    var bonusState = padawanStates[i];
    // Add the state to the user
    user.addState(bonusState);
  }
  // Set the flag to regain the states to true
  this._regainPadawanStates = true;
}
</Custom Establish Effect>

Enjoy!