I made this formula that deals damage, and then deals 1/3 of the damage back to the user. Unfortunately, the recoil damage is giving me a percent, so it's leaving my HP in a really long number string. How can I make it so this skill rounds up with whatever the recoil damage would be?
Here's the formula:
var d = ((a.level*20)+(1.2*a.atk))*(100/(100+b.def)); a.gainHp(-d / 3); d
Here's the formula:
var d = ((a.level*20)+(1.2*a.atk))*(100/(100+b.def)); a.gainHp(-d / 3); d