From f9617e163d657219b8e3930f703060e291d05984 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sun, 21 Dec 2008 22:35:35 +0000 Subject: 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 --- crawl-ref/source/player.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crawl-ref/source/player.cc') 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 = ""; +} -- cgit v1.2.3-54-g00ecf