summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-09 00:47:48 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-09 00:47:48 +0000
commitf355d0cc4d2ca649c06ade4b3e9c9154a41202a3 (patch)
tree2b1d0920c170a95037470df40748593b173d90df
parentc5f0a9b1667ed5091dbb5b413782dbaafc0541e3 (diff)
downloadcrawl-ref-f355d0cc4d2ca649c06ade4b3e9c9154a41202a3.tar.gz
crawl-ref-f355d0cc4d2ca649c06ade4b3e9c9154a41202a3.zip
Implement [2546032]: Aside from orc priests and orcs, which can worship
Beogh, and holy beings, which can worship TSO (or, specially, Xom), give other priestly monsters that need gods the new god GOD_NAMELESS. Monsters with this god will produce messages like "The monster invokes the aid of its god against you." git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9004 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/acr.cc1
-rw-r--r--crawl-ref/source/dat/database/monspell.txt14
-rw-r--r--crawl-ref/source/enum.h3
-rw-r--r--crawl-ref/source/mon-util.cc33
-rw-r--r--crawl-ref/source/monplace.cc8
-rw-r--r--crawl-ref/source/religion.cc4
6 files changed, 38 insertions, 25 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index d31e6446b7..11ba485d3a 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -389,6 +389,7 @@ static void _god_greeting_message( bool game_start )
case GOD_NO_GOD:
case NUM_GODS:
case GOD_RANDOM:
+ case GOD_NAMELESS:
break;
}
}
diff --git a/crawl-ref/source/dat/database/monspell.txt b/crawl-ref/source/dat/database/monspell.txt
index 6a1e8774dc..75b9bc8934 100644
--- a/crawl-ref/source/dat/database/monspell.txt
+++ b/crawl-ref/source/dat/database/monspell.txt
@@ -159,7 +159,7 @@ sphinx cast
%%%%
angel cast targeted
-@The_monster@ calls down the wrath of @God@ upon @target@.
+@The_monster@ calls down the wrath of @possessive_God@ upon @target@.
%%%%
dragon cast targeted
@@ -196,19 +196,19 @@ giant eyeball cast
%%%%
priest cast targeted
-@The_monster@ calls down the wrath of @God@ upon @target@.
+@The_monster@ calls down the wrath of @possessive_God@ upon @target@.
-@The_monster@ mumbles some strange prayers to @God@ against @target@.
+@The_monster@ mumbles some strange prayers to @possessive_God@ against @target@.
-@The_monster@ invokes the aid of @God@ against @target@.
+@The_monster@ invokes the aid of @possessive_God@ against @target@.
%%%%
priest cast
-@The_monster@ prays to @God@.
+@The_monster@ prays to @possessive_God@.
-@The_monster@ mumbles some strange prayers to @God@.
+@The_monster@ mumbles some strange prayers to @possessive_God@.
-@The_monster@ utters an invocation to @God@.
+@The_monster@ utters an invocation to @possessive_God@.
%%%%
unseen priest cast targeted
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index d7ef76457c..9e9f8baf38 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1335,7 +1335,8 @@ enum god_type
GOD_BEOGH,
NUM_GODS, // always after last god
- GOD_RANDOM = 100
+ GOD_RANDOM = 100,
+ GOD_NAMELESS = 101 // for monsters with nameless gods
};
enum holy_word_source_type
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 149ef50be3..ddaf81d597 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -8206,19 +8206,19 @@ void mon_enchant::set_duration(const monsters *mons, const mon_enchant *added)
maxduration = duration;
}
-// Replaces @foe_god@ and @god_is@ with foe's god name
-// special handling for atheists: use "you"/"You" instead.
+// Replaces @foe_god@ and @god_is@ with foe's god name.
+//
+// Atheists get "You"/"you", and worshippers of nameless gods get "Your
+// god"/"your god".
static std::string _replace_god_name(god_type god, bool need_verb = false,
bool capital = false)
{
std::string result =
- (god == GOD_NO_GOD ? (capital ? "You" : "you")
- : god_name(god, false));
+ ((god == GOD_NO_GOD) ? (capital ? "You" : "you") :
+ (god == GOD_NAMELESS) ? (capital ? "Your god" : "your god")
+ : god_name(god, false));
if (need_verb)
- {
- result +=
- (god == GOD_NO_GOD ? " are" : " is");
- }
+ result += (god == GOD_NO_GOD) ? " are" : " is";
return (result);
}
@@ -8496,11 +8496,26 @@ std::string do_mon_str_replacements(const std::string &in_msg,
_replace_god_name(god, false, true));
}
- // The monster's god, not the player's.
+ // The monster's god, not the player's. Atheists get
+ // "NO GOD"/"NO GOD", and worshippers of nameless gods get
+ // "a god"/"its god".
if (monster->god == GOD_NO_GOD)
+ {
msg = replace_all(msg, "@God@", "NO GOD");
+ msg = replace_all(msg, "@possessive_God@", "NO GOD");
+ }
+ else if (monster->god == GOD_NAMELESS)
+ {
+ msg = replace_all(msg, "@God@", "a god");
+ std::string possessive = monster->pronoun(PRONOUN_NOCAP_POSSESSIVE);
+ possessive += " god";
+ msg = replace_all(msg, "@possessive_God@", possessive.c_str());
+ }
else
+ {
msg = replace_all(msg, "@God@", god_name(monster->god));
+ msg = replace_all(msg, "@possessive_God@", god_name(monster->god));
+ }
// Replace with species specific insults.
if (foe != NULL && msg.find("@species_insult_") != std::string::npos)
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index daef5c4526..c51d4937bb 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1047,16 +1047,10 @@ static int _place_monster_aux(const mgen_data &mg,
menv[id].god = GOD_BEOGH;
break;
case MONS_MUMMY:
- menv[id].god = coinflip() ? GOD_KIKUBAAQUDGHA : GOD_YREDELEMNUL;
- break;
case MONS_DRACONIAN:
case MONS_ELF:
- {
- god_type gods[] = {GOD_KIKUBAAQUDGHA, GOD_YREDELEMNUL,
- GOD_MAKHLEB};
- menv[id].god = RANDOM_ELEMENT(gods);
+ menv[id].god = GOD_NAMELESS;
break;
- }
default:
mprf(MSGCH_ERROR, "ERROR: Invalid monster priest '%s'",
menv[id].name(DESC_PLAIN, true).c_str());
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 742362ac53..05115a8f69 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2258,6 +2258,7 @@ std::string god_name( god_type which_god, bool long_name )
{
case GOD_NO_GOD: return "No God";
case GOD_RANDOM: return "random";
+ case GOD_NAMELESS: return "nameless";
case GOD_ZIN: return (long_name ? "Zin the Law-Giver" : "Zin");
case GOD_SHINING_ONE: return "The Shining One";
case GOD_KIKUBAAQUDGHA: return "Kikubaaqudgha";
@@ -6172,7 +6173,7 @@ bool god_likes_items(god_type god)
case GOD_ZIN: case GOD_SHINING_ONE: case GOD_BEOGH: case GOD_NEMELEX_XOBEH:
return (true);
- case GOD_NO_GOD: case NUM_GODS: case GOD_RANDOM:
+ case GOD_NO_GOD: case NUM_GODS: case GOD_RANDOM: case GOD_NAMELESS:
mprf(MSGCH_ERROR, "Bad god, no biscuit! %d", static_cast<int>(god) );
default:
return (false);
@@ -6993,6 +6994,7 @@ int god_colour(god_type god) // mv - added
case GOD_NO_GOD:
case NUM_GODS:
case GOD_RANDOM:
+ case GOD_NAMELESS:
default:
break;
}