diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-22 15:58:36 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-22 15:58:36 +0000 |
commit | 13abff271666dcc566102311c3b9d237ea04f933 (patch) | |
tree | 499b2bb9a9f91a7b201f8e0102dc2befa5bcb057 /crawl-ref/source/xom.cc | |
parent | 5c8009179acad07659f28a6995438b72a7a6c183 (diff) | |
download | crawl-ref-13abff271666dcc566102311c3b9d237ea04f933.tar.gz crawl-ref-13abff271666dcc566102311c3b9d237ea04f933.zip |
* Tweak Xom's ideas about what makes a funny or boring death.
* Add another option (*sigh*) covering whether W=T and P=R. (Defaults to
false.)
* Various spacing and comment fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9675 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 47f5ef2293..067c069513 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -3134,7 +3134,7 @@ static bool _death_is_funny(const kill_method_type killed_by) { switch (killed_by) { - // The less original deaths are boring. + // The less original deaths are considered boring. case KILLED_BY_MONSTER: case KILLED_BY_BEAM: case KILLED_BY_CLOUD: @@ -3142,6 +3142,7 @@ static bool _death_is_funny(const kill_method_type killed_by) case KILLED_BY_BURNING: case KILLED_BY_SELF_AIMED: case KILLED_BY_SOMETHING: + case KILLED_BY_TRAP: return (false); default: // All others are fun (says Xom). @@ -3154,6 +3155,22 @@ void xom_death_message(const kill_method_type killed_by) if (you.religion != GOD_XOM && (!you.worshipped[GOD_XOM] || coinflip())) return; - if (_death_is_funny(killed_by) || you.hp < -1 * random2(10)) + const int death_tension = get_tension(GOD_XOM, false); + + // "Normal" deaths with only down to -2 hp and comparatively low tension + // are considered particularly boring. + if (!_death_is_funny(killed_by) && you.hp >= -1 * random2(3) + && death_tension <= random2(10)) + { + god_speaks(GOD_XOM, _get_xom_speech("boring death").c_str()); + } + // Unusual methods of dying, really low hp, or high tension make + // for funny deaths. + else if (_death_is_funny(killed_by) || you.hp <= -10 + || death_tension >= 20) + { god_speaks(GOD_XOM, _get_xom_speech("laughter").c_str()); + } + + // All others just get ignored by Xom. } |