Just make it a standard HP Damage attack and put that in the damage formula. Should work ! Oop just read tha part about damaging the enemies MP I don’t think it’ll do that.
ok so this DOES work, but it's kind of wonky.
The SP that gets restored can come out as a fraction, im mostly seeing 3.25 restored with my formula at level 1.
"a.gainMp(a.mmp * 0.05); 1.1 * a.mat * 2 - b.mdf * 0.4625" is what I currently have as my formula, for reference.
in the future, you'd want to say what plugins you were using. if Visustella's Battle Core or Turans Eval Tags are within that list, then could use the relevant skill notetag and then use
Code:
user.gainMp(Math.ceil(value/20))
target.gainMp(-Math.ceil(value/20))
to make it so that whatever damage the skill does, the user regains 5% of it and the target loses the same amount (granted, i dont think enemies had SP to begin with, so you probably just want the first line)
Apologies for that, you're correct that I am indeed usiing Visustella. I was told not to mention them on here or the post would get deleted, so that's why I didn't. I'll be sure to iinclude that info if I need help again.
As for the plugin, they do have a note tag called <Life steal>, but its not what im looking for, for the reasons mentioned above. I just want MP or HP to be granted to the user, not stolen away from the enemy.
that said, will plug that code you provided into my pre-damage js in the notetags to see iif it works.
I believe it should be: user.gainMp(Math.ceil(10/20))
In order to make it come out to 5%
ok so this DOES work, but it's kind of wonky.
The SP that gets restored can come out as a fraction, im mostly seeing 3.25 restored with my formula at level 1.
"a.gainMp(a.mmp * 0.05); 1.1 * a.mat * 2 - b.mdf * 0.4625" is what I currently have as my formula, for reference.
Apologies for that, you're correct that I am indeed usiing Visustella. I was told not to mention them on here or the post would get deleted, so that's why I didn't. I'll be sure to iinclude that info if I need help again.
As for the plugin, they do have a note tag called <Life steal>, but its not what im looking for, for the reasons mentioned above. I just want MP or HP to be granted to the user, not stolen away from the enemy.
that said, will plug that code you provided into my pre-damage js in the notetags to see iif it works.
I believe it should be: user.gainMp(Math.ceil(10/20))
In order to make it come out to 5%
Just tried the code out. It also... kinda works. But it seems to only restore 1 mp, no matter what's in the value section.