summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-29 05:59:51 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-29 05:59:51 +0000
commit3744c360da8fefca3e74ec098b9478df017f6b3f (patch)
treee3cac9c77ce17fc60c982f8677194764a3bcedcd /crawl-ref/source/mon-util.cc
parent3ccb84a86f21de5797a5a2480711233fb38ea9d5 (diff)
downloadcrawl-ref-3744c360da8fefca3e74ec098b9478df017f6b3f.tar.gz
crawl-ref-3744c360da8fefca3e74ec098b9478df017f6b3f.zip
Differentiate between god gift monsters and non-gift monsters with a god via
MF_GOD_GIFT. When a non-god gift priestly monster is first created it will be given a god: orcs Beogh, mummies Kikubaaqudgha or Yredelemnul, and deep elves Kikubaaqudgha, Yredelemnul or Makhleb. Monster spell announcments/messages for priestly monsters now uses the name of their god. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8008 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index e90a4d7809..79f0361fb0 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -7984,6 +7984,12 @@ std::string do_mon_str_replacements(const std::string &in_msg,
msg = replace_all(msg, "@player_god@", _replace_god_name(false, false));
msg = replace_all(msg, "@Player_god@", _replace_god_name(false, true));
+ // The monster's god, not the player's.
+ if (monster->god == GOD_NO_GOD)
+ msg = replace_all(msg, "@God@", "NO GOD");
+ else
+ msg = replace_all(msg, "@God@", god_name(monster->god));
+
// Replace with species specific insults.
if (msg.find("@species_insult_") != std::string::npos)
{