summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.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/player.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/player.cc')
-rw-r--r--crawl-ref/source/player.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 1a47d3c4b1..a083d68541 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5810,6 +5810,9 @@ void player::init()
if (m_quiver)
delete m_quiver;
m_quiver = new player_quiver;
+
+ // Currently only set if Xom accidentally kills the player.
+ reset_escaped_death();
}
player_save_info player_save_info::operator=(const player& rhs)
@@ -7291,3 +7294,14 @@ bool player::do_shaft()
return (true);
}
+
+bool player::did_escape_death() const
+{
+ return (escaped_death_cause != NUM_KILLBY);
+}
+
+void player::reset_escaped_death()
+{
+ escaped_death_cause = NUM_KILLBY;
+ escaped_death_aux = "";
+}