Tips & Tricks – Daring Padawan (Star Wars Galaxy of Heroes) – RPG Maker MV

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

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!

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 in red 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!

Please wait while you are redirected...or Click Here if you do not want to wait.