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.
In Pokémon, a confused unit will have a chance to attack itself whenever it tries to perform an action unlike the RPG Maker MV confusion effect where it can randomly target an ally or enemy. Here’s how to replicate the Pokémon confusion effect in RPG Maker MV!
You can grab the copy/paste code here:
Insert the following Lunatic Mode code into the Confusion state’s notebox. Change the values in red to fit your game’s settings.
<Custom Action Start Effect> // Calculate the confusion success rate var confuseRate = 0.50; // Check RNG if it passed if (Math.random() < confuseRate) { // Get the confusion skill for the user to perform var confusionSkill = 10; // Start the animation user.startAnimation(63); // Get the user's current action var action = user.currentAction(); // Set it to the confusion skill action.setSkill(confusionSkill); } </Custom Action Start Effect>
Enjoy!
Please wait while you are redirected...or Click Here if you do not want to wait.