From: PatR Date: Mon, 4 Apr 2022 17:20:28 +0000 (-0700) Subject: life-saved, while helpless X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47cef18a9bb82f522a1a0217537c78ec0c43d3b5;p=nethack life-saved, while helpless Implement the suggestion by entrez to avoid "while helpless" in the reason for the second death if hero gets killed, life-saved, and killed again at the same time. Life saving sets 'multi' to -1 which prevents the hero from moving again until next turn and is intended to make the sequencing of "you survived that attempt on your life" work if you're being interrupted during some multi-turn activity. It used to behave differently when the first death occurred while engaged in some voluntary multi-turn activity. I've removed that because I couldn't figure out why; it might need to be put back. --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 202f54b57..68d66f96c 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -864,6 +864,8 @@ be more flexible when wishing checks for artifact name matches; now allows exclude unique monsters from pacification when untrapped from web ask to kick a door open, if it's locked and you don't have unlocking tool give a message when stinking cloud is created on top of hero +when being life-saved prevents the hero from moving again during current turn, + avoid logfile annotation "while helpless" if hero dies a second time Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/end.c b/src/end.c index 6c928dd61..7cc61559f 100644 --- a/src/end.c +++ b/src/end.c @@ -924,10 +924,15 @@ savelife(int how) } g.nomovemsg = "You survived that attempt on your life."; g.context.move = 0; - if (g.multi > 0) - g.multi = 0; - else - g.multi = -1; + + g.multi = -1; /* can't move again during the current turn */ + /* in case being life-saved is immediately followed by being killed + again (perhaps due to zap rebound); this text will be appended to + "killed by , while " + in high scores entry, if any, and in logfile (but not on tombstone) */ + g.multi_reason = Role_if(PM_TOURIST) ? "being toyed with by Fate" + : "attempting to cheat Death"; + if (u.utrap && u.utraptype == TT_LAVA) reset_utrap(FALSE); g.context.botl = TRUE;