Attack that is supposed to get stronger as your HP lowers always does no damage! Please Help!

I am having an issue with an attack that is supposed to be stronger the lower your HP is! Regardless of the character's HP level, the attack always does no damage even when the character's health is dangerously low!!

This is the attack in question:
1690112289555.png


As you see, I am taking the character's max HP and subtracting her current HP from this and then multiplying it by 6.7

Even if this actor's HP was 750/1000, the attack still should do 1000-750=250, 250*6.7=1675 points of damage! Yet it literally does 0 damage every time!

It is not a hit rate thing because this actor's other physical attacks hit the enemies and this actor does have a hit rate set. Her hit rate is 100 and the attack is 100.

Does anybody know what the problem could be?
Does anybody know what the problem could be?
the math.

Your forgetting order of calculation.
* and / then + and -
So your formula is a.mhp - a.hp * 6.7
which is a.hp * 6.7 then subtract that from a.mhp.
so if your health was 10 and maximum was 100
10 * 6.7 = 67
100 - 67 = 33

20 * 6.7 = 132
100 - 132 = 0

How you should have it is with brackets.
(a.mhp - a.hp) * 6.7
100 - 10 = 90
90 * 6.7 = 603
Ah, yes! PEDMAS! Forgot about that.

Thank you!
Ah, yes! PEDMAS! Forgot about that.

Thank you!
PEMDAS, unless I'm mistaken. Multiplication comes before division.

Original thread: https://forums.rpgmakerweb.com/threads/attack-that-is-supposed-to-get-stronger-as-your-hp-lowers-always-does-no-damage-please-help.159622/