Make saving grace also work against repeated damage sources

For example, being hit by the bounce of a wand of fire means that
the main character could take damage twice in a turn, which would
kill even through saving grace; and scrolls and potions could burn
up after that and finish off the last HP, even if the wand only hit
once. This commit changes it to track all damage done during the
turn, and prevent HP dropping below 1 from damage until the next
player action or the next turn boundary, whichever comes first.
This commit is contained in:
Alex Smith
2025-11-26 05:45:45 +00:00
parent 6eb2eb7df7
commit 4d55e1de79
4 changed files with 38 additions and 2 deletions

View File

@@ -838,6 +838,9 @@ struct instance_globals_r {
struct instance_globals_s {
/* allmain.c */
boolean saving_grace_turn; /* saving grace was triggered this turn */
/* artifact.c */
int spec_dbon_applies; /* coordinate effects from spec_dbon() with
messages in artifact_hit() */
@@ -969,6 +972,9 @@ struct instance_globals_t {
struct instance_globals_u {
/* allmain.c */
int uhp_at_start_of_monster_turn;
/* botl.c */
boolean update_all;