MV MP cost problem

Hello 🙂
I want to make a skill that cost every actual MP and launch a big attack that depends of the actual MP. Something like:

a.mp/25 - b.mdf * 2
The problem is that I can't cast an attack that depends of the actual MP if the actual MP just got consumed by the skill cost ^^'

So I thought about consuming myself the MP with a common event and put the cost at 0 but the displaying of the cost will not work if I do this.

For the moment, I use the Yanfly plugin to do this:

<Custom MP Cost>
cost = user.mp;
</Custom MP Cost>


So i'm out of idea... Maybe a way to display a cost different from the actual cost so I can display the actual MP but in reality it's like 0 or 1 and then my common event could work but I don't know how to do it or if we can even do it.
<Custom MP Cost>
cost = user.mmp;
</Custom MP Cost>
You could add a line before that and set a property on the user to store their mp before they consume it all, and then use that property in the skill formula

Code:
<Custom MP Cost>
user._spentMp = user.mp
cost = user.mp
</Custom MP Cost>
Code:
a._spentMp/25 - b.mdf * 2
Waaaa Thanks!!!

Original thread: https://forums.rpgmakerweb.com/threads/mp-cost-problem.178301/