Saving grace

Once per game, if receiving a killing blow from above 90% HP,
allow the hero to survive with 1 HP.
This commit is contained in:
Pasi Kallinen
2023-03-03 17:37:02 +02:00
parent 2c092bb641
commit 08a2a2a1a4
6 changed files with 19 additions and 2 deletions

View File

@@ -1753,6 +1753,7 @@ mdamageu(struct monst *mtmp, int n)
if (u.mh < 1)
rehumanize();
} else {
n = saving_grace(n);
u.uhp -= n;
if (u.uhp < 1)
done_in_by(mtmp, DIED);