Tips & Tricks – Fire Aura (Mega Man Battle Network) – 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 Fire Aura, from Mega Man Battle Network, nullifies damage until broken. It will block all damage under a certain threshhold until the damage overcomes the aura or if a certain element is used to pierce the aura. Here’s how to make this effect in RPG Maker MV!

You can grab the copy/paste code here: Insert the following notetags into your Fire Aura state’s notebox. Change the values in red to reflect the settings of your game.

<Custom Apply Effect>
// Calculate the threshhold for the effect
var threshhold = Math.ceil(target.mhp * 0.10);
// Set the state counter to display the threshhold
target.setStateCounter(stateId, threshhold);
// Create the text stating the effect's threshhold
var text = '<CENTER>\\c[4]' + state.name + '\\c[0] blocks damage under \\c[4]' + threshhold + '\\c[0]!';
// Set the wait time for the message
var wait = 60;
// Display the text.
BattleManager.addText(text, wait);
// Select which elements will pierce the barrier
var pierceElements = [10, 12];
// Create an empty slot for the element text
var elementNames = '';
// Loop through the text
while (pierceElements.length > 0) {
  // Get the currently looped element
  var elementId = pierceElements.shift();
  // Add the name to the list
  elementNames += '\\c[4]' + $dataSystem.elements[elementId] + '\\c[0]';
  // Check if the length of the elements remaining exceeds 0
  if (pierceElements.length > 0) {
    // Add a comma
    elementNames += ', ';
  }
};
// Create a text explaining what elements can pierce the effect
text = '<CENTER>Deal more than \\c[4]' + threshhold + '\\c[0] damage or ' + elementNames + ' damage to break barrier!'
// Display the text
BattleManager.addText(text, 0);
</Custom Apply Effect>

<Custom Regenerate Effect>
// Calculate the threshhold
var threshhold = Math.ceil(target.mhp * 0.10);
// Display the threshhold on the state
target.setStateCounter(stateId, threshhold);
</Custom Regenerate Effect>

<Custom React Effect>
// Check if the action deals HP damage
if (this.isHpEffect() && value > 0) {
  // Get the elements that can pierce the effect
  var pierceElements = [10, 12];
  // Calculate the threshhold
  var threshhold = Math.ceil(target.mhp * 0.10);
  // Get the current elements of the action
  var elements = this.getItemElements();
  // Check if the effect was pierced by damage alone
  var pierced = value > threshhold;
  // Create an empty text for the elements.
  var elementNames = '';
  // If the effect wasn't pierced
  if (!pierced) {
    // Create a loop through the elements
    while (pierceElements.length > 0) {
      // Get the currently looped element
      var elementId = pierceElements.shift();
      // Check if the action elements contain a piercing element
      if (elements.contains(elementId)) {
        // If it does, set it to true
        pierced = true;
      }
      // Add the element name
      elementNames += '\\c[4]' + $dataSystem.elements[elementId] + '\\c[0]';
      // If the looped elements still has something left
      if (pierceElements.length > 0) {
        // ... Then add a comma
        elementNames += ', ';
      }
    }
  }
  // Create a text to be displayed
  var text = '<CENTER>\\c[4]' + state.name + '\\c[0]';
  // Set the wait time
  var wait = 60;
  // Check if the effect was pierced
  if (pierced) {
    // If it is, remove the state
    target.removeState(stateId);
    // And state that it was pierced
    text += ' has been pierced!';
    // Display the text
    BattleManager.addText(text, wait);
  } else {
    // If it wasn't, then set the damage to 0
    value = 0;
    // Start a barrier animation
    target.startAnimation(53);
    // Display the text stating how much damage it blocks
    text += ' blocks damage under \\c[4]' + threshhold + '\\c[0]!';
    // Add the text
    BattleManager.addText(text, wait);
    // Create a new line stating how to pierce the effect
    text = '<CENTER>Deal more than \\c[4]' + threshhold + '\\c[0] damage or ' + elementNames + ' damage to break barrier!'
    // Ad the text
    BattleManager.addText(text, 0);
  }
}
</Custom React Effect>

Enjoy!

Happy RPG Making!


These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin Suggestion, Yanfly's Patreon-based Suggestion Box a visit here:


If you have any bugs to report, visit the following link:


If you have any questions about Action Sequences, visit the following link:



Thank you!