Tips & Tricks – One Time Half MP Cost – 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.

In RPG Maker MV, you can make a state that lasts one turn and wears off the next. However, in a battle system where multiple turns and/or actions can suddenly wear off an effect, it may become rather awkward to decide when a particular state wears off. Such is the case for an effect that gives a character a One Time Half MP Cost effect. While setting it to last one action would work, if the next action is a non-MP cost skill, the state would still wear off. Here is how to mitigate that.

You can grab the copy/paste code here: Insert the following Lunatic Mode code into your One Time Half MP Cost state.

<Custom Initiate Effect>
// Check if the action is a skill and uses MP
if (this.isSkill() && user.skillMpCost(this.item()) > 0) {
  // Then remove the state.
  user.removeState(stateId);
}
</Custom Initiate Effect>

Enjoy!

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