From b8f3c183df87ee55833ab561fa12ed324da5a913 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Wed, 9 Dec 2009 21:31:02 +0100 Subject: Make Xom sometimes (< 5% chance) revive the player after death. The chance of this happening depends strongly on tension and mood, as well as type of death. I also tried the normal protection from harm but I figure it's more interesting this way. :D --- crawl-ref/source/ouch.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/ouch.cc') diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 432cc7b440..93eaacd48b 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -1130,7 +1130,7 @@ void ouch(int dam, int death_source, kill_method_type death_type, // Okay, you *didn't* escape death. you.reset_escaped_death(); - // Ensure some minimal information about Xom's involvment. + // Ensure some minimal information about Xom's involvement. if (aux == NULL || strlen(aux) == 0) { if (death_type != KILLED_BY_XOM) @@ -1139,6 +1139,12 @@ void ouch(int dam, int death_source, kill_method_type death_type, else if (strstr(aux, "Xom") == NULL) death_type = KILLED_BY_XOM; } + // Xom may still try to save your life. + else if (xom_saves_your_life(dam, death_source, death_type, aux, + see_source)) + { + return; + } #if WIZARD || DEBUG if (you.never_die) -- cgit v1.2.3-54-g00ecf