Tips & Tricks – Cyclone (World of WarCraft) – 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.

Cyclone is a spell from the World of WarCraft that stuns an opponent. However, when repeatedly used on the same opponent, the duration of the stun lowers each time. Furthermore, only one Cyclone can be active at a time per team. Here’s how to recreate that effect in RPG Maker MV!

Find the copy/paste version of the code here: 

Place this in the notebox for the Cyclone Bridge state. Change the values in red to fit your game’s settings:

<Custom Apply Effect>
// Set the target's default cyclone times to 0.
target._cycloneTimes = target._cycloneTimes || 0;
// Get the number of turns cyclone will last.
var turns = Math.max(5 - target._cycloneTimes * 2, 1);
// Add the real Cyclone state.
target.addState(134);
// Set the number of turns on the Cyclone state.
target.setStateTurns(134, turns);
// Raise the number of times the target has been affected by Cyclone.
target._cycloneTimes += 1;
</Custom Apply Effect>

<Custom Remove Effect>
// Clear the number of times the target has been affected by Cyclone.
target._cycloneTimes = undefined;
</Custom Remove Effect>

Place this in the notebox for the Cyclone skill’s notebox. Change the values in red to fit your game’s settings.

<Before Eval>
// Get all of the viable battle members.
var members = BattleManager.allBattleMembers();
// Loop through each member.
for (var i = 0; i < members.length; ++i) {
  // Get current member.
  var member = members[i];
  // If the member exists and is affected by Cyclone...
  if (member && member.isStateAffected(134)) {
    // ...then remove Cyclone.
    member.removeState(134);
  }
}
</Before Eval>

Happy storming!

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