I want to create a system where in order to use an attack, the player must have a certain amount of MP. Each attack costs a certain amount of MP and this basically works as energy- the player needs a certain amount of energy to use each attack.
When the players MP is at 0, then instead of dying, they just skip that turn into their MP naturally goes back up. How would I go towards adding this system to my game?
Just go to the attack in the database, and set the amount of MP you want it to cost.
Also, I think you cud easy event a system where yo fighters can't act at 0 MP! 😍 In troop events, jus' check all actors at the end of turn, and if their MP is at zero, put on a state that makes 'em unable to act. And then remove it when their MP goes up again!
I tried making some edits today. This seemed to work (based on a quick test) 😀
BattleManager.startActorInput = function() {
if (this._currentActor) {
if (this._currentActor.mp === 0) {
this._currentActor.gainMp(25);
this.finishActorInput();
this.selectNextActor();
} else {
this._currentActor.setActionState("inputting");
this._inputting = true;
}
}
};
Or did you mean that the player could make multiple attacks if they still had MP? I think there's a VS plugin for that.