How do I set up a skill that harms the user, and the target?

I have a skill for my katana user that drains the target's MP, while damaging her HP. But every time I test it, it gives the enemy the HP debuff. Any suggestions? They'd be much appreciated!  🙂
you might need to set it up using a script call or a common event, where when you use this skill the commen event forces the activation of another skill which damages the user, or you could set it up where it does direct damage
Very simple: you use javascriptcode in the damage formula (ignore the advice with the common event, that won't work as easily).


Details on this: http://forums.rpgmakerweb.com/index.php?/topic/47099-rmmv-damage-formula-ideas-and-help/
Are you using a plugin?
This example drains 50 HP from the user but 50 MP from the enemy:

Set to do MP Drain:

a.hp -= 50 ; 50

In the damage formula "a" is the Actor who is executing the Skill, and "b" is the target of the Skill.  The "a,hp -=50" part removes 50 HP from the Actor (and may kill him/her) and the "50" part is the amount of MP Drained from the target.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-set-up-a-skill-that-harms-the-user-and-the-target.48689/