Help with "Pain" Damage formula

Reanimunculus

Villager
Member
Joined
May 9, 2013
Messages
13
Reaction score
1
First Language
English
Primarily Uses
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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.
a.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)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top