The hitpoints and power/energy status values (and corresponding maxima) shown on the screen are capped at 9999 to control status line width. The actual values can be bigger than that. Highlights based on percentages were doing their calculations on the potentially truncated values rather than on the actual ones. Add another field to the blstat[] structure, populate it for BL_HP, BL_HPMAX, BL_ENE, and BL_EXEMAX and switch to it for their percentage calculations. Doesn't seem to break highlighting of 'normal' range values but hasn't been tested for extreme ones.
8.8 KiB
8.8 KiB