Looking for a damage formula for an attack that would cause the user to deal 10% of his total remaining hp as damage to himself, and then hurt the enemy by the percentile difference between your max hp and remaining hp. Basically an attacl that hurts you and the enemy, but gets stronger the less hp you have. My basic calculus skills have failed me.
Help with "Pain" Damage formula
RGSS3 Script Requestsa.hp*=0.9;((a.mhp-a.hp)/a.mhp.to_f)*multiplier
if your max hp is 100 for example:
using it will cause hp to become 90, and will deal damage equal to multiplier * (10/100)
then if your current hp is 50 (max is still 100) then using it will cause you to have only 45 hp, so damage is now multiplier * (55/100)
Thats perfect my engineering friend, thank you very much🙂
Original thread: https://forums.rpgmakerweb.com/threads/help-with-pain-damage-formula.22469/