Is there a way to make a skill heal for half the damage caused?

One curious thing I've noticed is it seems to factor in decimals as well, which is something I haven't seen before in any of my previous formulas.
If you want to avoid that, put your formulae inside of Math.floor() any time you divide a number (or multiply by a decimal, same thing). That will round down the number.

You can see how I and Anastasius did that in our solutions we posted for you.
Oopsie, I *did* forget Math.floor. If you wanna get rid of the decimal, you can keep your damage formula the same. Just change the script that's in the common event to this:

JavaScript:
$gameVariables.value(1206).gainHp(Math.floor(($gameVariables.value(1207) - $gameVariables.value(1208).hp) / 2));
If you want to avoid that, put your formulae inside of Math.floor() any time you divide a number (or multiply by a decimal, same thing). That will round down the number.

You can see how I and Anastasius did that in our solutions we posted for you.

Oopsie, I *did* forget Math.floor. If you wanna get rid of the decimal, you can keep your damage formula the same. Just change the script that's in the common event to this:

JavaScript:
$gameVariables.value(1206).gainHp(Math.floor(($gameVariables.value(1207) - $gameVariables.value(1208).hp) / 2));

Thank you, that fixed it.

I didn't really mind the decimals, but I guess I should probably change it so it's more consistent with all my other skills. Thanks again for all the help. ^^

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-make-a-skill-heal-for-half-the-damage-caused.148005/