summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-21 22:35:35 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-21 22:35:35 +0000
commitf9617e163d657219b8e3930f703060e291d05984 (patch)
tree133c9956096f64bb19d5518dd28e791f2380ebfc /crawl-ref/source/ouch.cc
parent0480b2a904133ba40129d2effa33f7d638bb95d0 (diff)
downloadcrawl-ref-f9617e163d657219b8e3930f703060e291d05984.tar.gz
crawl-ref-f9617e163d657219b8e3930f703060e291d05984.zip
Improved handling of Xom accidentally killing the player.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7900 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 2bdda4bf10..ffe58014e5 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -911,7 +911,10 @@ void ouch(int dam, int death_source, kill_method_type death_type,
&& crawl_state.which_god_acting() == GOD_XOM
&& crawl_state.other_gods_acting().size() == 0)
{
- // Xom should only kill his worhsippers if they're under penance or
+ you.escaped_death_cause = death_type;
+ you.escaped_death_aux = aux == NULL ? "" : aux;
+
+ // Xom should only kill his worshippers if they're under penance or
// Xom is bored.
if (you.religion == GOD_XOM && !you.penance[GOD_XOM]
&& you.gift_timeout > 0)
@@ -920,11 +923,14 @@ void ouch(int dam, int death_source, kill_method_type death_type,
}
// Also don't kill wizards testing Xom acts.
- if (crawl_state.prev_cmd == CMD_WIZARD)
+ if (crawl_state.prev_cmd == CMD_WIZARD && you.religion != GOD_XOM)
return;
+ // Okay, you *didn't* escape death.
+ you.reset_escaped_death();
+
// Ensure some minimal informfullness about Xom's involvment.
- if (aux == NULL)
+ if (aux == NULL || strlen(aux) == 0)
{
if (death_type != KILLED_BY_XOM)
aux = "Xom";