- Joined
- Mar 15, 2015
- Messages
- 233
- Reaction score
- 27
- First Language
- English
- Primarily Uses
- RMMV
I'm not mathematician (not even that great at it!), so I'm having a mind fart.
Trying to make a skill that deals less damage the lower the enemy's current health is comparative to their lax health.
Let's just say my damage formula totals 1000 damage. I THEN want that damage to be reduced by the % of health lost by the target.
Basically if the enemy is at 100% health the skill will still deal it's full 1000 damage, but if the target is at 25% health, then the skill will only deal 250 damage. Can't quite figure out how to get the multiplier for that.
((100+((a.level/4)*(a.atk/10)))*1.1)*(?)
Bold part is the part I'm having trouble with. That needs to be % of target's health.
*edit* The answer, by Victor Sant, is to use "b.hpRate()" OR "b.hp/b.mhp".
So for my formula it would be:
((100+((a.level/4)*(a.atk/10)))*1.1)*b.hpRate()
OR
((100+((a.level/4)*(a.atk/10)))*1.1)*(b.hp/b.mhp)
Thanks again, Victor!
Trying to make a skill that deals less damage the lower the enemy's current health is comparative to their lax health.
Let's just say my damage formula totals 1000 damage. I THEN want that damage to be reduced by the % of health lost by the target.
Basically if the enemy is at 100% health the skill will still deal it's full 1000 damage, but if the target is at 25% health, then the skill will only deal 250 damage. Can't quite figure out how to get the multiplier for that.
((100+((a.level/4)*(a.atk/10)))*1.1)*(?)
Bold part is the part I'm having trouble with. That needs to be % of target's health.
*edit* The answer, by Victor Sant, is to use "b.hpRate()" OR "b.hp/b.mhp".
So for my formula it would be:
((100+((a.level/4)*(a.atk/10)))*1.1)*b.hpRate()
OR
((100+((a.level/4)*(a.atk/10)))*1.1)*(b.hp/b.mhp)
Thanks again, Victor!
Last edited by a moderator:

