How to make attacks that do both HP and MP damage

HI guys! I'm trying to make a game with MP management, but I don't know how to make attacks with multiple damage types.
The idea is that if an enemy or player's MP runs out, they take x4 damage for any attack, adding MP attrition into combat.
Here is where I don't know what to do, how to make this system actually work. I have skills that cost MP, and attacks designed around damaging MP, but I don't have any base ways to chip at MP damage dynamically. How do I make an attack that does like the title in order to make normal attacks spicier?
So there are two ways you can do this:

1. Since only the last value evaluated in the formula is considered to be the damage done, you can perform additional semicolon-separated operations before that calculation is written, so you could for example do b.gainMp(-10); 50 for a skill that does 50 base damage, and it will also reduce the target's MP by 10.

2. Add a "Recover MP" effect to the skill and make its value negative.
This may or may not be a little bit overkill for you, depending on your project, but with action sequencing you could make the skill do whatever the heck you want whenever you want.
This may or may not be a little bit overkill for you, depending on your project, but with action sequencing you could make the skill do whatever the heck you want whenever you want.
Can you make the skill make you a slice of delicious toast?!
Can you make the skill make you a slice of delicious toast?!
I'm sure with the right script call it's possible! 😂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-attacks-that-do-both-hp-and-mp-damage.183864/