summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-speak.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-07-10 22:22:02 -0400
committerNeil Moore <neil@s-z.org>2012-08-14 16:26:47 -0400
commitd2b6c5e7f1a7b206ebe935b3ec9b7a27bd017f2f (patch)
treee02027ea9d4b8e88877515a59ddb289b647fe857 /crawl-ref/source/mon-speak.cc
parentfc704a08028746b6825a65023611b16f818c11be (diff)
downloadcrawl-ref-d2b6c5e7f1a7b206ebe935b3ec9b7a27bd017f2f.tar.gz
crawl-ref-d2b6c5e7f1a7b206ebe935b3ec9b7a27bd017f2f.zip
Use the ghost's god, not the player's, for speech.
Diffstat (limited to 'crawl-ref/source/mon-speak.cc')
-rw-r--r--crawl-ref/source/mon-speak.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-speak.cc b/crawl-ref/source/mon-speak.cc
index 1de5a118f4..ecea930f21 100644
--- a/crawl-ref/source/mon-speak.cc
+++ b/crawl-ref/source/mon-speak.cc
@@ -516,6 +516,13 @@ bool mons_speaks(monster* mons)
prefixes.push_back("unbeliever");
}
}
+ else if (mons->type == MONS_PLAYER_GHOST)
+ {
+ // Use the *ghost's* religion, to get speech about its god. Only
+ // sometimes, though, so we can get skill-based messages as well.
+ if (coinflip())
+ prefixes.push_back(god_name(mons->ghost->religion));
+ }
else
{
// Include our current god's name, too. This means that uniques