max HP manipulation
Life-saving has been setting u.uhpmax to max(2 * u.ulevel, 10) and if it took place during level drain that could make u.uhpmax increase instead of decrease, confusing healing which gets applied to a monster who has drained the hero with Stormbringer or the Staff of Aesculapius. Change the setting to be max(u.ulevel, 10) (removing the times two part) and also have level drain force it to be set back to previous value if/when it gets increased. Max HP loss due to strength trying to drop below 3 or to fire trap or to being hit by Death now uses a mininum max HP of u.ulevel rather than 1. They don't have the alternate minimum of 10; I'm uneasy that there are still two different minimum values. I changed adjattrib() to set the flag to request a status update before it gave its optional message rather than after so that the new characteristic value would be visible during the message. That resulted in not updating status when eating royal jelly changed HP or max HP after boosting strength. But the same missing update would have occurred--or rather, failed to occur--without the change in sequencing if the strength boost causes a change in encumbrance.
This commit is contained in:
@@ -127,6 +127,8 @@ extern void init_attr(int);
|
||||
extern void redist_attr(void);
|
||||
extern void adjabil(int, int);
|
||||
extern int newhp(void);
|
||||
extern int minuhpmax(int);
|
||||
extern void setuhpmax(int);
|
||||
extern schar acurr(int);
|
||||
extern schar acurrstr(void);
|
||||
extern boolean extremeattr(int);
|
||||
|
||||
Reference in New Issue
Block a user