Here's a fun one.
Attempting to create a skill that reads "Drain all MP. Deal damage to all enemies based on MP drained". Basically, use all MP, the more MP used, the more damage dealt.
Here's what I have so far:
dam=(a.mat - b.mdf) * (a.mp / 4);
a.mp=0; dmg;
The formula does what I want, except that it applies it to the first enemy, reduces the MP to 0, and then reapplies the formula again to the next enemy. But now my MP is 0, so damage is null.
Is there a way to circumvent this?
Thanks in advance!
Note: I am using Yanfly's Ace Battle Engine, in case it matters.
Attempting to create a skill that reads "Drain all MP. Deal damage to all enemies based on MP drained". Basically, use all MP, the more MP used, the more damage dealt.
Here's what I have so far:
dam=(a.mat - b.mdf) * (a.mp / 4);
a.mp=0; dmg;
The formula does what I want, except that it applies it to the first enemy, reduces the MP to 0, and then reapplies the formula again to the next enemy. But now my MP is 0, so damage is null.
Is there a way to circumvent this?
Thanks in advance!
Note: I am using Yanfly's Ace Battle Engine, in case it matters.