Help with a skill based on mana?

So, I tried to do it using common events but I just got overwhelmed and couldn't figure it out. I really wish you could use percentages in common events as opposed to flat numbers. Anyways. I have a character named Ruto, she uses "Mana", but I renamed it Catnip, and turned it into a type of ammo. She has 50 catnip for the whole game, and has to get consumables to refill it. So, I made a skill called Catnip Frenzy. She casts it, and it consumes all the catnip then deals damage based on how much catnip she used. Would anyone know how to do this? I'm sure there's a way to do it via common eventing, the only problem with that is, her catnip can scale, well, virtually endlessly depending on if people purchase upgrades to it.


So the example of how the skill will work is


Ruto has MAX catnip. She casts Catnip Frenzy and consumes all catnip. Because she used her max amount of Catnip, the skill does MAX skill damage with it. If Ruto has less than 50 catnip, it'll deal less damage depending on how much was consumed. 50 catnip used will = most damage possible. 0 catnip used will = least damage possible. 


Hopefully it would be possible to do it so I wouldn't have to common event for the endless possibilities of upgrades bought to her catnip.
Why not use the damage formulas? Simply use a.mp.
So you want the skill to do damage based on mprate and not the actual mp 


If so formula * ((a.mp/a.mmp) + 1)


Just be more clear if that not what you want and I'll have another solution


1 at the end is replaceable by whatever more damage you want, right now its twice as more if you're full.
Why not use the damage formulas? Simply use a.mp.

Because when I do that, the skill would cast and use all her MP, and she wouldn't deal any damage.

So you want the skill to do damage based on mprate and not the actual mp 


If so formula * ((a.mp/a.mmp) + 1)


Just be more clear if that not what you want and I'll have another solution


1 at the end is replaceable by whatever more damage you want, right now its twice as more if you're full.



I'll try that, then. Maybe it'll do something different than what I had happen before.
I understand the problem from your other answer now


skill costs 0 mp


<After Eval>


user.setMp(0)


</After Eval>


<Custom Requirement>


value = false


if (user.mp >= 1) {


value = true; }


</Custom Requirement>

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-skill-based-on-mana.70539/