summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-05 07:25:56 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-05 07:25:56 +0000
commit464c6c2079869fd86514eaa3942f9d4eb565f763 (patch)
tree81f4a0e162b6c4a3e91c2c6643278e32a3851791 /crawl-ref/source
parentbc0ee393e8fbe5b8ca296367866557dce3de62f7 (diff)
downloadcrawl-ref-464c6c2079869fd86514eaa3942f9d4eb565f763.tar.gz
crawl-ref-464c6c2079869fd86514eaa3942f9d4eb565f763.zip
Oops, forgot to special-case "@says@ @to_foe@".
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8237 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/mon-util.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 356e837316..dbf7be1ae9 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -7964,6 +7964,9 @@ std::string do_mon_str_replacements(const std::string &in_msg,
const monsters* m_foe = (foe && foe->atype() == ACT_MONSTER) ?
dynamic_cast<const monsters*>(foe) : NULL;
+ if (s_type < 0 || s_type >= NUM_LOUDNESS || s_type == NUM_SHOUTS)
+ s_type = mons_shouts(monster->type);
+
std::string foe_species;
if (foe == NULL)
@@ -8007,6 +8010,11 @@ std::string do_mon_str_replacements(const std::string &in_msg,
else
foe_name = "something";
+ std::string prep = "at";
+ if (s_type == S_SILENT || s_type == S_SHOUT || s_type == S_NORMAL)
+ prep = "to";
+ msg = replace_all(msg, "@says@ @to_foe@", "@says@ " + prep + " @foe@");
+
msg = replace_all(msg, " @to_foe@", " to @foe@");
msg = replace_all(msg, " @at_foe@", " at @foe@");
msg = replace_all(msg, "@foe,@", "@foe@,");
@@ -8224,9 +8232,6 @@ std::string do_mon_str_replacements(const std::string &in_msg,
};
if (s_type < 0 || s_type >= NUM_LOUDNESS || s_type == NUM_SHOUTS)
- s_type = mons_shouts(monster->type);
-
- if (s_type < 0 || s_type >= NUM_LOUDNESS || s_type == NUM_SHOUTS)
{
mpr("Invalid @says@ type.", MSGCH_DIAGNOSTICS);
msg = replace_all(msg, "@says@", "buggily says");