diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-09 00:43:03 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-09 00:43:03 +0000 |
commit | dacc5311c59ec11e3bb4ce2f63a6e1985cf24bcc (patch) | |
tree | 9dbb19006303df12e977cbe7f9f5a593ae910ba9 /crawl-ref/source/monspeak.cc | |
parent | 836f5b7754e361f5482f17b199647ace667bbd3b (diff) | |
download | crawl-ref-dacc5311c59ec11e3bb4ce2f63a6e1985cf24bcc.tar.gz crawl-ref-dacc5311c59ec11e3bb4ce2f63a6e1985cf24bcc.zip |
FR 1833480: Implement Lemuel's Beogh specific orc speech.
Orcs can now give different speech, depending on whether you worship
Beogh or not, and of whether they are hostile or friendly. (Neutrals
are treated as hostile, in this case.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3547 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monspeak.cc')
-rw-r--r-- | crawl-ref/source/monspeak.cc | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/crawl-ref/source/monspeak.cc b/crawl-ref/source/monspeak.cc index 70a9c6643b..b0f82bfafc 100644 --- a/crawl-ref/source/monspeak.cc +++ b/crawl-ref/source/monspeak.cc @@ -160,17 +160,6 @@ bool mons_speaks(const monsters *monster) && monster->has_ench(ENCH_CONFUSION))) return false; - // Dealing with the monster not being silenced while the player - // *is* silenced, and is hence able to see the monsters' gestures - // and such but not hear any sounds it makes, would be a big - // headache to deal with, so skip it. - - // [jpeg] Why? Only print visible stuff! :p -/* - if (!silenced(monster->x, monster->y) - && silenced(you.x_pos, you.y_pos)) - return false; -*/ // Silenced monsters only "speak" 1/3 as often as non-silenced, // unless they're normally silent (S_SILENT). Use // get_monster_data(monster->type) to bypass mon_shouts() @@ -206,6 +195,12 @@ bool mons_speaks(const monsters *monster) if (monster->has_ench(ENCH_CONFUSION)) prefixes.push_back("confused"); + + // Add Beogh to list of prefixes for orcs (hostile and friendly) if you + // worship Beogh. (This assumes you being a Hill Orc, so might have odd + // results in wizard mode.) + if (you.religion == GOD_BEOGH && mons_genus(monster->type) == MONS_ORC) + prefixes.push_back("beogh"); std::string msg; @@ -227,6 +222,22 @@ bool mons_speaks(const monsters *monster) if (msg == "__NONE") return false; + // The exact name brought no results, try species. + if (msg.empty() || msg == "__NEXT") + { + msg = get_speak_string(prefixes, + mons_type_name(mons_species(monster->type), DESC_PLAIN), + monster); + + // Still nothing found? Try monster genus! + if (msg.empty() || msg == "__NEXT") + { + msg = get_speak_string(prefixes, + mons_type_name(mons_genus(monster->type), DESC_PLAIN), + monster); + } + } + // Now that we're not dealing with a specific monster name, include // whether or not it can move in the prefix if (mons_is_stationary(monster)) |