So I'm going through the painfully slow process of adding classes/skills to the database, creating new animations, and scripting in functionality where necessary when I encountered some odd behavior.


hp_rate as I've understood it, should return what is essentially the decimal equivalent of the percentage of HP remaining.
If health is at full: hp_rate = 1
If health is at half: hp_rate = 0.5
Through some testing, this has been shown to be true, however, when I multiply a say... atk by hp_rate, the value increases drastically as HP falls while I'd expect it to decrease instead...
# The formula for the berserk state is bascially: user.atk *= (1 / user.hp_rate) #Should increase as hp falls.# The formula I tested above is: user.atk * user.hp_rate # Should decrease as hp falls.Instead they both return insanely high values as hp damage is taken. Now, I'm not asking for a solution, I just want to know what's causing this.


hp_rate as I've understood it, should return what is essentially the decimal equivalent of the percentage of HP remaining.
If health is at full: hp_rate = 1
If health is at half: hp_rate = 0.5
Through some testing, this has been shown to be true, however, when I multiply a say... atk by hp_rate, the value increases drastically as HP falls while I'd expect it to decrease instead...
# The formula for the berserk state is bascially: user.atk *= (1 / user.hp_rate) #Should increase as hp falls.# The formula I tested above is: user.atk * user.hp_rate # Should decrease as hp falls.Instead they both return insanely high values as hp damage is taken. Now, I'm not asking for a solution, I just want to know what's causing this.

