Commit fbb29f54bf73a2c8937de6785df7429977082999

Authored by DarkGod
2 parents c93b92ad 717cc4b8

Merge branch 'LifeFix' into 'master'

Display negative life in the UI instead of ???

Display negative life instead of ???.  I'm pretty sure I fixed this forever ago, so on the off chance it was reverted intentionally, I'll re-make the argument here.

Firstly, the reason I'm doing this now is because its actively making my test character gameplay a lot less fun.

The use of die_at has gradually inflated.  Importantly, Heroism is a tool experienced players use almost universally, but at the same time I thought I fixed this display issue I also added it on randarts as a power.  It has shown up more and more on talents as well.  The use of die_at is done not because it makes the UI actively hostile, but because its a unique form of life that has specific interactions with max_life and/or for theme.

Additionally, it is inconsistent to give completely information in the combat log but not on the life display.  This leads to encouraging people to look through the hard to read combat log to estimate what their life is at.  Which is exactly what we do, and why I've gotten several complaints about it when I'm active in chat.

If this has to stay, I'll re-do Heroism and delete the randart powers and such so it can stay limited to classes deemed acceptable to have hostile UI as a balance mechanic or whatever the design goal is.

See merge request !395
... ... @@ -769,7 +769,7 @@ function _M:displayResources(scale, bx, by, a)
769 769
770 770 local life_regen = player.life_regen * util.bound((player.healing_factor or 1), 0, 2.5)
771 771 if not self.res.life or self.res.life.vc ~= player.life or self.res.life.vm ~= player.max_life or self.res.life.vr ~= life_regen then
772   - local status_text = ("%s/%d"):format(player.life > 0 and math.round(player.life) or "???", math.round(player.max_life))
  772 + local status_text = ("%s/%d"):format(math.round(player.life), math.round(player.max_life))
773 773 local reg_text = string.limit_decimals(life_regen,3, "+")
774 774 self.res.life = {
775 775 vc = player.life, vm = player.max_life, vr = life_regen,
... ...