State that heals actor upon hitting the statused enemy?

Is there any way to make a state that when inflicted on enemies, heals the actor who damages it by a certain amount?

plugins are accepted

thank you
This is basically reverse thorn armor/mail. There's a script for it somewhere for Yanfly buffs and states core

Here
This is basically reverse thorn armor/mail. There's a script for it somewhere for Yanfly buffs and states core

Here
Sorry, but isn't that an MV plugin? Is there one for MZ?
It'll give you a starting point as the script will be similar if you use the VisuStella equivalent plugin or @ATT_Turan 's eval tags.

You'll need to ask him or someone like @Robro33 for help as I don't have MZ to help you with this
but isn't that an MV plugin
the plugin you use to run it is for MV, but the code itself works for either one.


As AquaEcho metioned, you can run the code for the effect with Turan's Eval Tags after a few adjustments. if you just want a battler hitting a target with that state and healing for it, you can remove most of the code.
Try this when you can.

Code:
<Action Respond Eval>
// Check to see if the skill deals damage.
if (skill.isDamage() && value > 0) {
  // Sets the Heal Rate to 15% of damage dealt.
  var rate = 0.15;
  // Makes the attacker gain health equal to the damage * the rate.
  user.gainHp(Math.ceil(value * rate));
}
</Action Respond Eval>

Original thread: https://forums.rpgmakerweb.com/threads/state-that-heals-actor-upon-hitting-the-statused-enemy.173851/