I am trying to have my attacks get weaker depending on my current HP's. But I don't want it to get down to virtually nothing.
The formula I am trying to use is:
a.atk * [[[[a.hp / a.mhp] * 100] + 10] / 110]
For some reason MV is doing 2457 damage with my a.atk = 27. It should be doing 27 damage with me at full life and 6.9 damage at 1 HP.
Harold has an ATK of 27 and Max HP's of 544.
When he is at full life he does 2457 damage. (should be doing 27)
When he is at 543 of 544 life he is doing 25 damage (should be doing 26.9)
When he is at 273 of 544 life he is doing 12 damage (should be doing 14.7)
When he is at 272 of 544 life he is doing 1230 damage (should be doing 14.7)
When he is at 271 of 544 life he is doing 12 damage again (should be doing14.6)
When he is at 1 life he is doing 0 damage (should be doing 6.9)
If I set it to a.atk * [a.hp / a.mhp] it works fine but if I am below 11 HP's I do 0 damage. I wanted to always be able to do some damage which is why I used the above formula.
Does anyone have a clue as to why MV is giving me these weird numbers? Even if I change the HP's and the ATK values it still gives the weird results.
Thanks for any advise,
Kuzac73
PS. I do not have any plugins running just to be sure it was not something messing with the numbers.
The formula I am trying to use is:
a.atk * [[[[a.hp / a.mhp] * 100] + 10] / 110]
For some reason MV is doing 2457 damage with my a.atk = 27. It should be doing 27 damage with me at full life and 6.9 damage at 1 HP.
Harold has an ATK of 27 and Max HP's of 544.
When he is at full life he does 2457 damage. (should be doing 27)
When he is at 543 of 544 life he is doing 25 damage (should be doing 26.9)
When he is at 273 of 544 life he is doing 12 damage (should be doing 14.7)
When he is at 272 of 544 life he is doing 1230 damage (should be doing 14.7)
When he is at 271 of 544 life he is doing 12 damage again (should be doing14.6)
When he is at 1 life he is doing 0 damage (should be doing 6.9)
If I set it to a.atk * [a.hp / a.mhp] it works fine but if I am below 11 HP's I do 0 damage. I wanted to always be able to do some damage which is why I used the above formula.
Does anyone have a clue as to why MV is giving me these weird numbers? Even if I change the HP's and the ATK values it still gives the weird results.
Thanks for any advise,
Kuzac73
PS. I do not have any plugins running just to be sure it was not something messing with the numbers.