VXAce Status that returns half of the damage caused

Hi! I was trying to make it but gave up.

I'm looking for a script that functions similar to counterattacking.

- When the user receives damage, they still receive it but the enemy also gets hurt by half the damage they caused.

For example: The enemy harms the user by 100 damage. The user still gets hurts but returns 50 damage to the enemy.

- It would also be cool that, if the enemy caused a status ailment to the user, the user receives it but also gives it to the enemy who caused it.
Use a formula and the second to last part of it should include the total damage / 2 like this:

a.change_hp(dmg / 2, true); b.change_hp(dmg, true)

You could use change_hp with a.hp += dmg / 2; b.hp += dmg instead.
Use a formula and the second to last part of it should include the total damage / 2 like this:

a.change_hp(dmg / 2, true); b.change_hp(dmg, true)

You could use change_hp with a.hp += dmg / 2; b.hp += dmg instead.
It looks good. But I think it only applies to a skill: I need a state that does this.
You can try something like Hime's Effect Manager, there is an addon with a Thorn Mail effect here (check the answer by Kes).

Original thread: https://forums.rpgmakerweb.com/threads/status-that-returns-half-of-the-damage-caused.178323/