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

@@ -674,6 +674,8 @@ static const struct instance_globals_r g_init_r = {
};
static const struct instance_globals_s g_init_s = {
/* allmain.c */
FALSE, /* saving_grace_turn */
/* artifact.c */
0, /* spec_dbon_applies */
/* decl.c */
@@ -764,6 +766,8 @@ static const struct instance_globals_t g_init_t = {
};
static const struct instance_globals_u g_init_u = {
/* allmain.c */
0, /* uhp_at_start_of_monster_turn */
/* botl.c */
FALSE, /* update_all */
/* decl.c */