summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
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 = "";
+}