From 3744c360da8fefca3e74ec098b9478df017f6b3f Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 29 Dec 2008 05:59:51 +0000 Subject: 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 --- crawl-ref/source/mon-util.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crawl-ref/source/mon-util.cc') 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) { -- cgit v1.2.3-54-g00ecf