Creating a skill that damages health and mana

I'm aware that there is a way to damage hp or mp respectively in the standard formula yet what would be the easiest way to create a skill that damages both health and mana for the same value? 


I know you can create a common event call within the first skill that calls another "invisible skill" and have one damage health while the other damages mana but this seems very inefficient.


What is the easiest way to make one skill damage both health and mana for the same value? 
use damage formula coding - there is a topic about that on this forum that explains how you can add almost any effect by placing javascript into the damage formula
https://rpgmakermv.co/threads/damage-formulas-101-mv-edition.2172/ has some things on advanced formula setting and I've used some of the things before it's just atleast on the links I have found there is no straight "deal damage to health/mana" syntax. 


The closest thing I created was c = (b.mp/3); a.setHp(a.hp - c); c  were the damage type being dealt was MP Damage. This of course it just supposed to set the current health value to it's normal value minus the c variable (which of course is the damage dealt your mana).


This does not work in the current state, instead the damage to your mana is dealt and that is all, I believe even if it did work as intended it would be extremely anti-user as it doesn't show them taking damage and gives no indicator when it silently sets your health back.


If there is anyone willing to help on this I would greatly appreciate it. I can keep throwing random combinations of formulas at it for hours but some push from a much more competent and helpful person would be appreciated.
If that doesn't work, then you made a mistake in the code - although you are correct in assuming that it would not give a display of the damage and as such might surprise a user.


However, anything else would require a plugin to create the effect - for example yanfly's action sequences can do a lot more, and they can create the displays for additional effects.


That is because you can't make the damage formula code display anything extra without changes in the engine's code - no need to experiment with random combinations for that.
If that doesn't work, then you made a mistake in the code - although you are correct in assuming that it would not give a display of the damage and as such might surprise a user.


However, anything else would require a plugin to create the effect - for example yanfly's action sequences can do a lot more, and they can create the displays for additional effects.


That is because you can't make the damage formula code display anything extra without changes in the engine's code - no need to experiment with random combinations for that.



Alright, I can just make it a skill that deals damage with a common event call that can force another skill to deal mana damage, won't be too hard to do I just wanted to see if there was an easy way I overlooked. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-skill-that-damages-health-and-mana.71197/