update PR #1071 - highlighting critical HP
If status field 'hitpoints' has rules for both 'criticalhp' and 'up' or 'down' or 'changed', make critical-hp take precedence. Otherwise critical-hp might never be seen because of the value changing every move (if hero has regeneration attribute). Normally up/down/changed take precedence over other types of highlighting. Something is messed up with up/down/changed HP though. I'm seeing the 'up' highlight when it goes either up or down and not seeing the 'down' highlight at all. 'up' and 'down' for gold work as expected.
This commit is contained in:
@@ -103,11 +103,12 @@ static const char *const godvoices[] = {
|
||||
|
||||
/* critically low hit points if hp <= 5 or hp <= maxhp/N for some N */
|
||||
boolean
|
||||
critically_low_hp(boolean only_if_injured) /* determines whether maxhp <= 5
|
||||
matters */
|
||||
critically_low_hp(
|
||||
boolean only_if_injured) /* determines whether maxhp <= 5 matters */
|
||||
{
|
||||
int divisor, hplim, curhp = Upolyd ? u.mh : u.uhp,
|
||||
maxhp = Upolyd ? u.mhmax : u.uhpmax;
|
||||
int divisor, hplim,
|
||||
curhp = Upolyd ? u.mh : u.uhp,
|
||||
maxhp = Upolyd ? u.mhmax : u.uhpmax;
|
||||
|
||||
if (only_if_injured && !(curhp < maxhp))
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user