From 0a51a9656e38f2255adfc48811f14cfc3f69645f Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 21 Apr 2026 20:55:39 -0700 Subject: [PATCH] address issue #1499 - saving grace vs traps Issue reported by Shrigis1: hero at or close to full HP stepped on a not-yet-discovered rolling boulder trap and was killed; end-of-game disclosure reported "You could have avoided a one-shot death via saving-grace." Originally, saving grace was completely hidden, so the disclosure line wouldn't have been included. Once disclosure was incorporated, having saving grace not work for traps triggered by the hero seems counter-intuitive, regardless of whether player is aware of the trap. This makes saving grace apply to any damage applied by losehp(). The original purpose of unexpectedly survivng by the skin of one's teeth is still maintained. Aside from having more of a chance of surviving via saving-grace, the main difference is that some players might try for "survived by saving-grace" as an unofficial conduct. As long as we don't start tracking that as a conduct, I don't think this is a big deal. Fixes #1499 --- src/hack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hack.c b/src/hack.c index ce0c488c8..367591eff 100644 --- a/src/hack.c +++ b/src/hack.c @@ -4251,12 +4251,12 @@ saving_grace(int dmg) impossible("saving_grace check for negative damage? (%d)", dmg); return 0; } - +#if 0 /* saving grace _does_ protect hero during own actions */ if (!svc.context.mon_moving) { /* saving grace doesn't protect you from your own actions */ return dmg; } - +#endif if (dmg < u.uhp || u.uhp <= 0) { /* no need for saving grace */ return dmg;