summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 01:49:59 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 01:49:59 +0000
commit25178bf21218cca469f1b05c0634c8e0c2bc2a41 (patch)
treef0596aebc72e33cba986b320a6eda1d21ad3c19c /crawl-ref
parent6271619f27e575d4e6c73bb6ffc75119a80f7747 (diff)
downloadcrawl-ref-25178bf21218cca469f1b05c0634c8e0c2bc2a41.tar.gz
crawl-ref-25178bf21218cca469f1b05c0634c8e0c2bc2a41.zip
Backport r10377 from trunk: fix bug #2816691, and other monster speech
fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10378 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/monster_speech.txt3
-rw-r--r--crawl-ref/source/dat/database/monspeak.txt8
-rw-r--r--crawl-ref/source/mon-util.cc5
3 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/docs/monster_speech.txt b/crawl-ref/docs/monster_speech.txt
index af4c6a460c..5a75e4bb65 100644
--- a/crawl-ref/docs/monster_speech.txt
+++ b/crawl-ref/docs/monster_speech.txt
@@ -560,7 +560,8 @@ is present then it will only be used on priestly monsters or god gift monsters.
"@Foe@" or "@foe@" will be replaced with "You" or "you" if directed at the
player, or if directed at another monster be the same as "@The_monster@" or
"@the_monster@", but with the foe monster's name rather than the speaking
-monster's name
+monster's name. "@foe_possessive@" will be replaced with "your" if directed
+at the player, or expanded like "@foe@'s" if directed at a monster.
If you want to indicate which monster a message is directed at, you can put in
"@to_foe@" or "@at_foe@" to fill in the foe name when the message is directed
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt
index 6142784c1b..d7cd8457d3 100644
--- a/crawl-ref/source/dat/database/monspeak.txt
+++ b/crawl-ref/source/dat/database/monspeak.txt
@@ -2007,7 +2007,7 @@ VISUAL:@The_monster@ grins evilly.
VISUAL:@The_monster@ seems to say something.
-VISUAL:@The_monster@ says something you can't hear. It was probably not a compliment.
+VISUAL:@The_monster@ says something you can't hear. It was probably not a compliment. @player_only@
## END silenced Murray ##
%%%%
# ugly orc sorceress
@@ -2048,7 +2048,7 @@ _Nessos_common_
@The_monster@ pounds the earth with his hooves.
-@The_monster@ intently looks at you, slowly moving @possessive@ tail.
+@The_monster@ intently looks at @foe@, slowly moving @possessive@ tail.
@The_monster@ stands on @possessive@ hind legs for a moment.
@@ -2071,7 +2071,7 @@ w:1
@The_monster@ says, "I schooled the Big Guy. You'll be no problem."
w:1
-@The_monster@ tries to tell you a complicated story about hydras, his blood, and marriage.
+@The_monster@ tries to tell @foe@ a complicated story about hydras, his blood, and marriage.
## END NESSOS
%%%%
@@ -2767,7 +2767,7 @@ _Killer_Klown_rare_
@The_monster@ honks.
-VISUAL:@The_monster@ pantomimes your execution.
+VISUAL:@The_monster@ pantomimes @foe_possessive@ execution.
VISUAL:@The_monster@ pokes out @possessive@ tongue.
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index c496f07e6c..aae15df3dc 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -8500,6 +8500,7 @@ std::string do_mon_str_replacements(const std::string &in_msg,
msg = replace_all(msg, "@player", "@foe");
msg = replace_all(msg, "@Player", "@Foe");
+ msg = replace_all(msg, "@foe_possessive@", "your");
msg = replace_all(msg, "@foe@", "you");
msg = replace_all(msg, "@Foe@", "You");
@@ -8520,6 +8521,9 @@ std::string do_mon_str_replacements(const std::string &in_msg,
&& !crawl_state.arena)
{
foe_name = foe->name(DESC_NOCAP_YOUR);
+ const std::string::size_type pos = foe_name.find("'");
+ if (pos != std::string::npos)
+ foe_name = foe_name.substr(0, pos);
}
else
foe_name = foe->name(DESC_NOCAP_THE);
@@ -8536,6 +8540,7 @@ std::string do_mon_str_replacements(const std::string &in_msg,
msg = replace_all(msg, " @at_foe@", " at @foe@");
msg = replace_all(msg, "@foe,@", "@foe@,");
+ msg = replace_all(msg, "@foe_possessive@", "@foe@'s");
msg = replace_all(msg, "@foe@", foe_name);
msg = replace_all(msg, "@Foe@", upcase_first(foe_name));