summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-05 04:57:15 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-05 04:57:15 +0000
commit27bc7176af098086af8922e8a3d97ed9bc7193d0 (patch)
tree994ba1479b288e8386ff5a1917cffd4fa04d830d
parentdd28fe417e451795644b185c3870da2e410dc88e (diff)
downloadcrawl-ref-27bc7176af098086af8922e8a3d97ed9bc7193d0.tar.gz
crawl-ref-27bc7176af098086af8922e8a3d97ed9bc7193d0.zip
Determine if an orc is an unbeliever when it's generated, and use an orc's god
field to determine whether to use a believer speech or an unbeliever speech. This prevents orc priests from using unbeliever speech, and has the side benefit of preventing other orcs from flip-flopping on whether they believe. If a band leader is a priest then make all band members have the same god (so that Saint Roka won't have any unbelievers among his entourage). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8231 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/dat/database/monspeak.txt70
-rw-r--r--crawl-ref/source/monplace.cc14
-rw-r--r--crawl-ref/source/monspeak.cc13
-rw-r--r--crawl-ref/source/religion.cc4
4 files changed, 61 insertions, 40 deletions
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt
index 81eeace28f..e73cd60d6c 100644
--- a/crawl-ref/source/dat/database/monspeak.txt
+++ b/crawl-ref/source/dat/database/monspeak.txt
@@ -1559,7 +1559,7 @@ VISUAL:@The_monster@ runs @possessive@ fingers through @possessive@ long green h
%%%%
_Ilsuiw_rare_
-VISUAL:@The_monster@ gazes at you @hypnot_or_seductively@.
+VISUAL:@The_monster@ gazes at @foe@ @hypnot_or_seductively@.
@The_monster@ sings, "To sleep, to sleep ... mayhap to drown."
@@ -2313,10 +2313,10 @@ related beogh Saint Roka
@related Saint Roka@
w:20
-@_hostile_orc_beogh_believer_common_@
+@_hostile_orc_beogh_believer_speech_common_@
w:5
-@_hostile_orc_beogh_believer_rare_@
+@_hostile_orc_beogh_believer_speech_rare_@
w:1
@The_monster@ shouts @at_foe@, "There can only be one messiah: ME!"
@@ -2968,8 +2968,22 @@ burn
maim
%%%%
#######################################################
-# Heretic orcs, not believing in Beogh or doubting the
-# saviour story.
+# Heretic orcs, not believing in Beogh.
+#######################################################
+related unbeliever orc
+
+# hostile orcs shouldn't be too talkative
+w:60
+__NONE
+
+w:1
+@_generic_orc_speech_@
+
+w:5
+@_hostile_orc_beogh_unbeliever_speech_@
+%%%%
+#######################################################
+# Heretic orcs, doubting the saviour story.
#######################################################
related beogh orc
@@ -2981,22 +2995,29 @@ w:1
@_generic_orc_speech_@
w:5
-@_hostile_beogh_speech_@
+@_hostile_orc_beogh_believer_speech_@
%%%%
-_hostile_beogh_speech_
+_hostile_orc_beogh_believer_speech_
-@_hostile_beogh_speech_common_@
+@_hostile_orc_beogh_believer_speech_common_@
w:4
-@_hostile_beogh_speech_rare_@
+@_hostile_orc_beogh_believer_speech_rare_@
%%%%
-_hostile_orc_beogh_unbeliever_common_
+_hostile_orc_beogh_unbeliever_speech_
+
+@_hostile_orc_beogh_unbeliever_speech_common_@
+
+w:4
+@_hostile_orc_beogh_unbeliever_speech_rare_@
+%%%%
+_hostile_orc_beogh_unbeliever_speech_common_
@The_monster@ @orc_says_to_foe@, "I don't believe in Beogh!"
@The_monster@ @shouts@ @at_foe@, "You're not the messiah, I am!"
%%%%
-_hostile_orc_beogh_believer_common_
+_hostile_orc_beogh_believer_speech_common_
@The_monster@ mutters @at_foe@, "You're NOT the saviour of the Orcs."
@@ -3022,7 +3043,7 @@ _hostile_orc_beogh_believer_common_
VISUAL:@The_monster@ grimaces.
%%%%
-_hostile_orc_beogh_unbeliever_rare_
+_hostile_orc_beogh_unbeliever_speech_rare_
@The_monster@ @orc_says_to_foe@, "Orcs don't need Beogh!"
@@ -3030,7 +3051,7 @@ _hostile_orc_beogh_unbeliever_rare_
@The_monster@ says @to_foe@, "Even if there were a messiah, it wouldn't be you."
%%%%
-_hostile_orc_beogh_believer_rare_
+_hostile_orc_beogh_believer_speech_rare_
@The_monster@ laughs @at_foe@, "You, our saviour!?"
@@ -3044,28 +3065,7 @@ _hostile_orc_beogh_believer_rare_
VISUAL:@The_monster@ shakes @possessive@ head.
-VISUAL:@The_monster@ stares at you quizzically.
-%%%%
-_hostile_beogh_speech_common_
-
-# unbelievers
-w:1
-@_hostile_orc_beogh_unbeliever_common_@
-
-# orcs doubting you
-w:6
-@_hostile_orc_beogh_believer_common_@
-%%%%
-_hostile_beogh_speech_rare_
-
-# unbelievers
-w:3
-@_hostile_orc_beogh_unbeliever_rare_@
-
-# orcs doubting you
-w:7
-@_hostile_orc_beogh_believer_rare_@
-
+VISUAL:@The_monster@ stares at you quizzically. @player_only@
###################################################
# Orcish followers of Beogh's messiah
###################################################
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index e3b22e347e..02a943bc1a 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -929,6 +929,8 @@ int place_monster(mgen_data mg, bool force_pos)
if (band_size > 1)
menv[id].flags |= MF_BAND_MEMBER;
+ const bool priest = mons_class_flag(mon->type, M_PRIEST);
+
mgen_data band_template = mg;
// (5) For each band monster, loop call to place_monster_aux().
for (int i = 1; i < band_size; i++)
@@ -939,7 +941,13 @@ int place_monster(mgen_data mg, bool force_pos)
band_template.cls = band_monsters[i];
const int band_id = _place_monster_aux(band_template, false);
if (band_id != -1 && band_id != NON_MONSTER)
+ {
menv[band_id].flags |= MF_BAND_MEMBER;
+ // Priestly band leaders should have an entourage of the
+ // same religion.
+ if (priest)
+ menv[band_id].god = mon->god;
+ }
}
// Placement of first monster, at least, was a success.
@@ -1043,6 +1051,12 @@ static int _place_monster_aux(const mgen_data &mg,
break;
}
}
+ // 6 out of 7 non-priestly orcs are believers.
+ else if (mons_genus(mg.cls) == MONS_ORC)
+ {
+ if (x_chance_in_y(6, 7))
+ menv[id].god = GOD_BEOGH;
+ }
// Angels and Daevas belong to TSO
else if (mons_class_holiness(mg.cls) == MH_HOLY)
{
diff --git a/crawl-ref/source/monspeak.cc b/crawl-ref/source/monspeak.cc
index 1265e522ca..1d9a7c77b6 100644
--- a/crawl-ref/source/monspeak.cc
+++ b/crawl-ref/source/monspeak.cc
@@ -445,11 +445,14 @@ bool mons_speaks(const monsters *monster)
// Add Beogh to list of prefixes for orcs (hostile and friendly) if you
// worship Beogh. (This assumes your being a Hill Orc, so might have odd
- // results in wizard mode.) Don't count charmed orcs.
- if (god == GOD_BEOGH && mons_genus(monster->type) == MONS_ORC
- && !monster->has_ench(ENCH_CHARM))
- {
- prefixes.push_back("beogh");
+ // results in wizard mode.) Don't count charmed or summoned orcs.
+ if (you.religion == GOD_BEOGH && mons_genus(monster->type) == MONS_ORC
+ && !monster->has_ench(ENCH_CHARM) && !monster->is_summoned())
+ {
+ if (monster->god == GOD_BEOGH)
+ prefixes.push_back("beogh");
+ else
+ prefixes.push_back("unbeliever");
}
else
{
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 07edc0d82d..f67b3ad3ac 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -5662,6 +5662,10 @@ void beogh_convert_orc(monsters *orc, bool emergency,
// become hostile later on, it won't count as a good kill.
orc->flags |= MF_CREATED_FRIENDLY;
+ // Prevent assertion if the orc was previously worshipping a different
+ // god rather than already worhsipping Beogh or being an athiest.
+ orc->god = GOD_NO_GOD;
+
mons_make_god_gift(orc, GOD_BEOGH);
if (orc->is_patrolling())