summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-19 22:28:38 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-19 22:28:38 +0000
commita56eea02ae7ce566af2baff5be396ddc15134735 (patch)
treea10aefecf614ec03b4c08c7544814e15d4076102 /crawl-ref/source/xom.cc
parentdbea6550fa584e710e7788b95f1037a9ec344ba5 (diff)
downloadcrawl-ref-a56eea02ae7ce566af2baff5be396ddc15134735.tar.gz
crawl-ref-a56eea02ae7ce566af2baff5be396ddc15134735.zip
* For flavour, let Xom laugh himself silly whenever a follower dies.
* Fix Xom being amused about rotten corpses being butchered. (As opposed to clean corpses becoming rotten while butchered, which is how it was originally intended.) * Xom no longer is amused if you deliberately hit yourself with a missile/wand/spell in safe surroundings. (Identifying wands that way or zapping /random effects is still considered amusing.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9519 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc32
1 files changed, 23 insertions, 9 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 8b2ace2adc..cf485d99b9 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -104,15 +104,15 @@ const char *describe_xom_favour()
return "A BORING thing.";
else
return (you.piety > 180) ? "A beloved toy of Xom." :
- (you.piety > 160) ? "A favourite toy of Xom." :
- (you.piety > 140) ? "A very special toy of Xom." :
- (you.piety > 120) ? "A special toy of Xom." :
- (you.piety > 100) ? "A toy of Xom." :
- (you.piety > 80) ? "A plaything of Xom." :
- (you.piety > 60) ? "A special plaything of Xom." :
- (you.piety > 40) ? "A very special plaything of Xom." :
- (you.piety > 20) ? "A favourite plaything of Xom."
- : "A beloved plaything of Xom.";
+ (you.piety > 160) ? "A favourite toy of Xom." :
+ (you.piety > 140) ? "A very special toy of Xom." :
+ (you.piety > 120) ? "A special toy of Xom." :
+ (you.piety > 100) ? "A toy of Xom." :
+ (you.piety > 80) ? "A plaything of Xom." :
+ (you.piety > 60) ? "A special plaything of Xom." :
+ (you.piety > 40) ? "A very special plaything of Xom." :
+ (you.piety > 20) ? "A favourite plaything of Xom."
+ : "A beloved plaything of Xom.";
}
static std::string _get_xom_speech(const std::string key)
@@ -169,6 +169,7 @@ static void _xom_is_stimulated(int maxinterestingness,
}
if (was_stimulated || force_message)
+ {
god_speaks(GOD_XOM,
((interestingness > 200) ? message_array[5] :
(interestingness > 100) ? message_array[4] :
@@ -176,6 +177,7 @@ static void _xom_is_stimulated(int maxinterestingness,
(interestingness > 50) ? message_array[2] :
(interestingness > 25) ? message_array[1]
: message_array[0]));
+ }
}
void xom_is_stimulated(int maxinterestingness, xom_message_type message_type,
@@ -223,6 +225,9 @@ void xom_tick()
void xom_is_stimulated(int maxinterestingness, const std::string& message,
bool force_message)
{
+ if (you.religion != GOD_XOM)
+ return;
+
const char *message_array[6];
for (int i = 0; i < 6; ++i)
@@ -1995,11 +2000,15 @@ void xom_acts(bool niceness, int sever)
// mode to escape death from deep water or lava.
ASSERT(you.wizard && !you.did_escape_death());
if (_feat_is_deadly(grd(you.pos())))
+ {
mpr("Player is standing in deadly terrain, skipping Xom act.",
MSGCH_DIAGNOSTICS);
+ }
else
+ {
mpr("Player is already dead, skipping Xom act.",
MSGCH_DIAGNOSTICS);
+ }
return;
}
#else
@@ -2171,3 +2180,8 @@ void xom_check_destroyed_item(const item_def& item, int cause)
: "Xom snickers softly.",
true);
}
+
+void xom_death_message()
+{
+ god_speaks(GOD_XOM, _get_xom_speech("laughter").c_str());
+}