Hey guys I'm actually having the same problem here. Is there a bug in the system?
Additionally, common events used to increase the variable's value only seem to trigger every second time the skill is used.
Hey guys I'm actually having the same problem here. Is there a bug in the system?
Yes, like Brendon's post above me, I also have arithmetic in my formula.
That doesn't fix the problem.
You simply have to add brackets. The system follows the BEDMAS order of calculating math. That means it'll calculate brackets and exponents first, then multiplications and divisions, then lastly it'll add and subtract.
You can use a.gainMp(x) in your formula, with x being the amount of MP/Mana you regain.
a.gainMp((60 - 10) * 0,1);b.gainMp(-((60 - 10) * 0,1));60 - 10
a.gainMp(5);b.gainMp(-5);50
This is pretty good and all, but the formula doesn't account for whether the skill deals more MP damage than the target already has. It could very well deal 10 MP damage to an enemy with only 8 MP, but still return 10 MP to the user.
If you haven't found a way to fix this yet, try using
Thanks for the help! It's working perfectly now.
You can do this with a "states stack" script. I know they exist but I'm not up for finding one.
Original thread: https://forums.rpgmakerweb.com/threads/rmmv-damage-formula-ideas-and-help.47099/