How would you like this to stack? Over time? When applied via skill? On a hit? Any stack limit? Does it fill the mp it gains as well? Or when it gains, is it just max?Hello there.
So, short story short, I would like to create a state that stacks with itself, and provides a flat +1 bonus to MaxMP for each stack.
Any help would be appreciated :>
<Category: buff>
<Custom Regenerate Effect>
//add your state + how many visual stacks you want per turn
user.addStateCounter(yourstate, 1);
//specify stack value gained per turn
this._RegenCounter = 1;
var n = this._RegenCounter;
// * 1 can be changed to whatever value for MP per stack (n).
var value = Math.floor(n * 1);
//gain the max mp
user.addMaxMp(value);
this._RegenCounter += 1;
</Custom Regenerate Effect>
<Custom Victory Effect>
user.removeStateCounter(yourstate);
a.clearParamPlus()
</Custom Victory Effect>
<Custom Escape Effect>
user.removeStateCounter(yourstate);
a.clearParamPlus()
</Custom Escape Effect>
<Custom Defeat Effect>
user.removeStateCounter(yourstate);
a.clearParamPlus()
</Custom Defeat Effect>
<Custom Remove Effect>
user.removeStateCounter(yourstate);
a.clearParamPlus()
</Custom Remove Effect>
This is a Passive Version that resets every battle, every turn you gain 1max mp along with a stack that's visually indicated by a counter. (It may not be the most clean code but this works for me). We can change it if you'd like.
JavaScript:<Category: buff> <Custom Regenerate Effect> //add your state + how many visual stacks you want per turn user.addStateCounter(yourstate, 1); //specify stack value gained per turn this._RegenCounter = 1; var n = this._RegenCounter; // * 1 can be changed to whatever value for MP per stack (n). var value = Math.floor(n * 1); //gain the max mp user.addMaxMp(value); this._RegenCounter += 1; </Custom Regenerate Effect> <Custom Victory Effect> user.removeStateCounter(yourstate); a.clearParamPlus() </Custom Victory Effect> <Custom Escape Effect> user.removeStateCounter(yourstate); a.clearParamPlus() </Custom Escape Effect> <Custom Defeat Effect> user.removeStateCounter(yourstate); a.clearParamPlus() </Custom Defeat Effect> <Custom Remove Effect> user.removeStateCounter(yourstate); a.clearParamPlus() </Custom Remove Effect>
Sorry, maybe my little comments weren't very clear, I'm not really used to sharing my bruteforced success stories haha! Glad it worked out!This is exactly what I wanted, but I must be doing something wrong. Do I have to replace something in the code?
EDIT: Never mind, my bad, it works great! Thanks a bunch!