summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-16 16:44:48 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-16 16:44:48 +0000
commit9d74ad5fb0661a0fc2ac424adcbed85761954d25 (patch)
tree368af85251f5cfc610f25d3e3fa7e1088e5bd4aa
parent9505de56091b195cb5d33ef88dcf9cfcc724cc89 (diff)
downloadcrawl-ref-9d74ad5fb0661a0fc2ac424adcbed85761954d25.tar.gz
crawl-ref-9d74ad5fb0661a0fc2ac424adcbed85761954d25.zip
Yet another change to monster speech and silencing...
I found my previous change to block all messages passed through MSGCH_TALK when silenced was too restrictive, so I've added another channel MSGCH_TALK_VISUAL and adapted the monster speech files accordingly. For example, imps can now also "talk" when silenced, but only the visual stuff will actually be output. (This automatically takes care of lowering the output likelihood.) And no, this doesn't hurt any, as visual talk also won't interrupt travel or resting. And I added a how-to file on monster speech, which was the main reason for my silence during the last couple of hours. It's not that the database system is that complicated but it surely can't hurt to give players who want to add something an idea of what is possible and how to go about it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2108 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/monster_speech.txt227
-rw-r--r--crawl-ref/source/dat/shout.txt69
-rw-r--r--crawl-ref/source/dat/speak.txt454
-rw-r--r--crawl-ref/source/debug.cc6
-rw-r--r--crawl-ref/source/message.cc4
-rw-r--r--crawl-ref/source/mon-data.h2
-rw-r--r--crawl-ref/source/mon-util.cc8
-rw-r--r--crawl-ref/source/monspeak.cc79
-rw-r--r--crawl-ref/source/mpr.h1
-rw-r--r--crawl-ref/source/view.cc20
10 files changed, 597 insertions, 273 deletions
diff --git a/crawl-ref/docs/monster_speech.txt b/crawl-ref/docs/monster_speech.txt
new file mode 100644
index 0000000000..27ebc1aae2
--- /dev/null
+++ b/crawl-ref/docs/monster_speech.txt
@@ -0,0 +1,227 @@
+As of Stone Soup 0.3 the previously hard-coded monster
+speech has been outsourced into shout.txt and speak.txt by
+Matthew Cline. This makes changing existing messages, or
+adding new ones really easy. This file will hopefully help
+you in this endeavour.
+
+shout.txt handles message output for monsters noticing you.
+speak.txt handles messages for monsters communicating.
+
+If you take a look through the two files, you'll see that
+all entries have basically the same structure. Let's have a
+look at an xample:
+
+###############
+# Friendly imps
+###############
+%%%%
+# Friendly imps are very common so they speak very rarely
+friendly '5'
+
+w:9
+__NONE
+
+w:1
+@_friendly_imp_@
+
+%%%%
+
+
+Now let's have a look at these in more detail:
+
+# Friendly imps
+ A '#' sign at the beginning of line means this line will
+ be ignored, so it's used as a comment.
+
+
+%%%%
+ The four percentage signs mark beginning and end of a
+ database entry. If you forget to place these, buggy
+ monster speech will result.
+
+
+friendly '5'
+ The first non-comment, non-clear line is interpreted as
+ the key of an entry. Most keys are hardcoded but there's
+ place for user defined ones as well. In this case, the key
+ is "friendly '5'".
+
+ '5' refers to the monster glyph, so the speech will not be
+ entirely restricted to imps, though they are by far the
+ most common ones.
+ On the whole there are three ways the game tries to look
+ for keys in the database. First the actual monster name is
+ used, then the monster glyph (with prefix "cap-" for
+ capital letters), then a a group description (such as
+ insect or humanoid) defined by the monster's body shape.
+ The latter is entirely hardcoded, though.
+
+ "friendly" is one of a couple of allowed prefixes,
+ distinguishing the speech from "hostile" (default).
+
+ These prefixes are optional and tested in the following
+ order:
+
+ default friendly/hostile fleeing silenced confused monster
+
+ First the database is searched for the whole prefix
+ string, then reading from left to right the combinations
+ are tested, beginning at three prefixes and ending at
+ none, at which time the prefix "default" is used instead.
+ For the last round (shape comparison, e.g. winged humanoid
+ etc.) a prefix on intelligence gets added. If in this last
+ round still nothing has been found, the monster stays
+ silent.
+
+
+w:9
+ After a clear line the actual talk begins. You can skew
+ the probability of a given message with the weight ('w')
+ tag. A message will be chosen with a probability of its
+ weight (defaults to 10 if none set) out of the sum of
+ weights for this entry. In this case, nine times out of
+ ten a friendly imp will stay silent.
+
+
+__NONE
+ Aside from "__NONE" there are a few other hardcoded
+ markers:
+
+ __NONE : no message
+ __NEXT : try the next combination of attributes
+ __MORE : enforce a "-- More --" prompt
+ __YOU_RESIST : "You resist."
+ __NOTHING_HAPPENS : "Nothing appears to happen."
+
+ In addition, some more are defined in speak.txt and
+ shout.txt, such as __RESIST_OR_NOTHING, __SHOUT, and
+ others.
+
+
+@_friendly_imp_@
+ Other variables can be defined in the form of @variable@.
+ The "@_friendly_imp_@" above is key to another entry in
+ the database entitled "_friendly_imp_" (without those '@'
+ signs) that actually has imps talking. Their speech
+ includes messages such as the following.
+
+
+VISUAL:@The_monster@ grins impishly at you.
+
+VISUAL:@The_monster@ picks up some beetles from the @surface@ and offers them to you.
+
+
+Again, there have to be clear lines between the different
+messages. If messages are placed directly one after another
+they will be printed as a block. This can be useful, e.g.
+for outputting first a "spell" and then it's (fake) result.
+
+Monster speech can be greatly customized by the use of
+several variables. This example already includes a few.
+
+
+VISUAL:
+ This optional parameter at the beginning of a string
+ decides which message channel a string will be passed
+ through. The list of allowed tags is as follows:
+
+ TALK : MSGCH_TALK (Default value.)
+ DANGER : MSGCH_DANGER
+ ENCHANT : MSGCH_ENCHANT
+ PLAIN : MSGCH_PLAIN
+ SOUND : MSGCH_SOUND
+ SPELL : MSGCH_MONSTER_SPELL
+ VISUAL : MSGCH_TALK_VISUAL
+ WARN : MSGCH_WARN
+
+ Note that MSGCH_SOUND and MSGCH_TALK get filtered out
+ when you are silenced. For similar reasons monster speech
+ of channel SPELL is muted under silence, along with
+ ENCHANT and WARN, both of which currently only occur in
+ combination with SPELL. To allow for silent spells along
+ with fake warnings and enchantments, you can combine these
+ with VISUAL and enforce output even when silenced.
+
+ VISUAL SPELL : MSGCH_SPELL
+ VISUAL WARN : MSGCH_WARN
+ VISUAL ENCHANT : MSGCH_ENCHANT
+
+ Note, though, that these hardly ever take effect as
+ usually the "silenced humanoid" types take precedence.
+ Only if no message for the silenced monster type is found
+ these special VISUAL cases will apply.
+ For shouts the default is also MSGCH_TALK which is
+ changed to MSGCH_TALK_VISUAL for monsters that don't
+ speak, and manually set to MSGCH_SOUND for all those
+ variants of "You hear a shout!"
+
+
+@The_monster@, @surface@
+ Like with @_friendly_imp_@ above, variables have been
+ defined to allow for greater flexibility. When the speech
+ code encounters an '@' sign it will first search the
+ database for a variable of that name and execute the
+ necessary replacement. Note that recursive replacement of
+ one variable with another is possible, so try to avoid
+ loops. The remaining variables it was unable to find in
+ the database are hardcoded and will be replaced before
+ output. If you add a new variable make sure to also add a
+ database entry for it (without those '@' marks around!);
+ otherwise it won't get replaced and just look weird.
+
+ A variable that you will see all over the place is
+ @The_monster@ which is hardcoded and will be replaced with
+ the monster's name. This is particularly useful for groups
+ of monsters that share the same speech pattern. Another
+ variable you can see in this example is @surface@ which
+ will be replaced by whatever the monster is standing on.
+
+The following variables are hardcoded:
+
+@the_monster@ : replaced with definite article plus
+ monster name for non-unique monsters
+@Monster@ : as above, but capitalized
+@the_monster@ : replaced with monster name
+@The_monster@ : replaced with capitalized monster name
+@a_monster@ : replaced with indefinite article plus
+ monster name, if several can exist
+@A_monster@ : as above, but capitalized
+@Monster@ : replaced with plain monster name
+@monster@ : es above, but capitalized
+
+For friendly monsters an additional "your"/"Your" is
+placed before the monster name, respecting capitalization
+and grammar (only for the_xxx).
+
+As an alternative there's also @the_something@,
+@The_something@, @a_something@, @A_something@, @something@
+and @Something@, all of which behave like the corresponding
+monster definitions above but get replaced by "something"
+and "Something", respectively, should the monster be
+invisible and the player be unable to see invisible.
+
+But wait, there's more!
+
+@player_name@ : replaced by player name
+
+@surface@ : replaced with whatever the monster stands on
+@feature@ : replaced with the monster's square's feature
+ description
+
+@pronoun@ : replaced be it, she, he as appropriate
+@Pronoun@ : replaced be It, She, He, as appropriate
+@possessive@ : replaced by its, her, his as appropriate
+@Possessive@ : replaced by Its, Her, His, as appropriate
+
+@imp_taunt@ : replaced by hardcoded imp type insults
+@demon_taunt@ : replaced by hardcoded demon type insults
+
+Also, @says@ will get replaced with a synonym of 'say' that
+fits a monster's (hardcoded) speech pattern and noise level.
+
+Pre-defined variables in the database include _high_priest_,
+_mercenary_guard_, _wizard_, _hostile_adventurer_,
+_friendly_imp_, _hostile_imp_, _tormentor_. There are also a
+few synonyms defined at the beginning of speak.txt such as
+for @ATTACK@, @pointless@, @shouts@, @wails@, @yells@ and
+others.
diff --git a/crawl-ref/source/dat/shout.txt b/crawl-ref/source/dat/shout.txt
index 28dceff0e7..977b32e689 100644
--- a/crawl-ref/source/dat/shout.txt
+++ b/crawl-ref/source/dat/shout.txt
@@ -1,81 +1,94 @@
+############################################################
+# As of Stone Soup 0.3 the previously hardcoded monster
+# speech has been outsourced. This makes changing existing
+# messages, and adding new ones really easy.
+#
+# shout.txt holds the utterances (and visual equivalents) of
+# monsters that notice you.
+#
+# For an explanation of how to read shout.txt and speak.txt
+# and how to add new messages, see monster_speech.txt in the
+# docs directory.
+############################################################
%%%%
__BUGGY
# This line should never get displayed to the user, even if
-# handle_monster_shouts() in view.cc detects buggy behavior, so
-# showing this line would itself be a bug.
-You hear doubly buggy behavior!
+# handle_monster_shouts() in view.cc detects buggy behavior,
+# so showing this line would itself be a bug.
+SOUND:You hear doubly buggy behavior!
%%%%
__SHOUT
-You hear a shout!
+SOUND:You hear a shout!
%%%%
__BARK
-You hear a bark!
+SOUND:You hear a bark!
%%%%
__TWO_SHOUTS
-You hear two shouts!
+SOUND:You hear two shouts!
%%%%
__ROAR
-You hear a roar!
+SOUND:You hear a roar!
%%%%
__SCREAM
-You hear a hideous shriek!
+SOUND:You hear a hideous shriek!
%%%%
__BELLOW
-You hear a bellow!
+SOUND:You hear a bellow!
%%%%
__SCREECH
-You hear a screech!
+SOUND:You hear a screech!
%%%%
__BUZZ
-You hear an angry buzzing noise.
+SOUND:You hear an angry buzzing noise.
%%%%
__MOAN
-You hear a chilling moan.
+SOUND:You hear a chilling moan.
%%%%
__WHINE
-You hear an irritating high-pitched whine.
+SOUND:You hear an irritating high-pitched whine.
%%%%
__CROAK
-You hear a loud, deep croak!
+SOUND:You hear a loud, deep croak!
-You hear a croak.
+SOUND:You hear a croak.
%%%%
__GROWL
-You hear an angry growl.
+SOUND:You hear an angry growl.
%%%%
__HISS
-You hear an angry hiss.
+SOUND:You hear an angry hiss.
%%%%
__DEMON_TAUNT
@The_monster@ @says@: @demon_taunt@
-####################################################################
+############################################
# End of default shouts
-####################################################################
+############################################
-####################################################################
-# Player ghost shouts. Potentially different ones for each class,
-# though currently they all just copy the default player ghost.
-####################################################################
+############################################################
+# Player ghost shouts. Potentially different ones for each
+# class, though currently they all just copy the default
+# player ghost.
+############################################################
%%%%
player ghost
-@The_monster@ turns @possessive@ malevolent gaze towards you.
+VISUAL:@The_monster@ turns @possessive@ malevolent gaze towards you.
%%%%
Fighter player ghost
@@ -189,9 +202,9 @@ Wanderer player ghost
@player ghost@
-######################################################################
+########################################
# Shouts by monster symbol
-######################################################################
+########################################
%%%%
'&'
@@ -222,9 +235,9 @@ Wanderer player ghost
'r'
@The_monster@ angrily lashes @possessive@ tail.
-######################################################################
+########################################
# Shouts for specific monsters
-######################################################################
+########################################
%%%%
# The giant spore has no eyes, so it can't gaze at the player like the
# other 'G' monsters.
diff --git a/crawl-ref/source/dat/speak.txt b/crawl-ref/source/dat/speak.txt
index e1be5ab2fa..d58da9d2d6 100644
--- a/crawl-ref/source/dat/speak.txt
+++ b/crawl-ref/source/dat/speak.txt
@@ -1,8 +1,22 @@
-##################################################################
-# Library of randomized word/phrase substitutions. (The keys will
-# have to be changed in the unlikely event that monsters are ever
-# given names like "yells" or "begs".)
-##################################################################%%%%
+############################################################
+# As of Stone Soup 0.3 the previously hardcoded monster
+# speech has been outsourced. This makes changing existing
+# messages, and adding new ones really easy.
+#
+# speak.txt contains the messages of monsters that "talk"
+# to the player, or at least the biggest part there-of.
+#
+# For an explanation of how to read shout.txt and speak.txt
+# and how to add new messages, see monster_speech.txt in the
+# docs directory
+############################################################
+
+############################################################
+# Library of randomized word/phrase substitutions. (The keys
+# will have to be changed in the unlikely event that
+# monsters are ever given names like "yells" or "begs".)
+############################################################
+%%%%
__RESIST_OR_NOTHING
__YOU_RESIST
@@ -31,6 +45,17 @@ cries
screams
%%%%
+# for ghosts
+wails
+
+wails
+
+shouts
+
+says
+
+screams
+%%%%
begs
begs
@@ -87,10 +112,10 @@ ploy
trick
-######################################################################
-# Library of speeches for types of monsters, like priests, wizards,
-# guards and so on.
-######################################################################
+############################################################
+# Library of speeches for types of monsters, like priests,
+# wizards, guards and so on.
+############################################################
%%%%
_high_priest_
@@ -100,7 +125,7 @@ SPELL:@The_monster@ mumbles some strange prayers.
SPELL:@The_monster@ intones a terrible prayer.
-@The_monster@ looks excited.
+VISUAL:@The_monster@ looks excited.
@The_monster@ starts to sing a prayer.
@@ -119,11 +144,11 @@ SPELL:@The_monster@ intones a terrible prayer.
%%%%
_mercenary_guard_
-@The_monster@ looks very unfriendly.
+VISUAL:@The_monster@ looks very unfriendly.
-@The_monster@ looks very cold.
+VISUAL:@The_monster@ looks very cold.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
@The_monster@ says, "Now you've reached the end of your journey."
@@ -179,7 +204,7 @@ ENCHANT:@possessive@ fingertips start to glow.
SPELL:@The_monster@ casts a spell.
__YOU_RESIST
-SPELL:@The_monster@ throws some strange powder towards you.
+VISUAL SPELL:@The_monster@ throws some strange powder towards you.
SPELL:@The_monster@ says, "Argatax netranoch dertex."
@@ -187,9 +212,9 @@ SPELL:@The_monster@ says, "Dogrw nutew berg."
SPELL:@The_monster@ shouts, "Entram moth deg ulag!"
-SPELL:@The_monster@'s eyes start to glow.
+VISUAL SPELL:@The_monster@'s eyes start to glow.
-SPELL:@The_monster@ tries to paralyze you with @possessive@ gaze.
+VISUAL SPELL:@The_monster@ tries to paralyze you with @possessive@ gaze.
@The_monster@ shouts, "You can't withstand my power!"
@@ -198,9 +223,9 @@ SPELL:@The_monster@ tries to paralyze you with @possessive@ gaze.
%%%%
_hostile_adventurer_
-@The_monster@ frowns.
+VISUAL:@The_monster@ frowns.
-@The_monster@ looks very upset.
+VISUAL:@The_monster@ looks very upset.
@The_monster@ screams, "Return home!"
@@ -218,18 +243,18 @@ _hostile_adventurer_
@The_monster@ screams, "First you have to pass me!"
-@The_monster@ scream, "I hate you!"
+@The_monster@ screams, "I hate you!"
## END _hostile_adventurer_ ##
%%%%
_friendly_imp_
-@The_monster@ jumps up and down with excitement.
+VISUAL:@The_monster@ jumps up and down with excitement.
-@The_monster@ grins impishly at you.
+VISUAL:@The_monster@ grins impishly at you.
-@The_monster@ picks up some beetles from the @surface@ and offers them to you.
+VISUAL:@The_monster@ picks up some beetles from the @surface@ and offers them to you.
-@The_monster@ blows smoke rings.
+VISUAL:@The_monster@ blows smoke rings.
@The_monster@ says, "Just tell me who NOT to kill."
@@ -252,25 +277,25 @@ _hostile_imp_
@The_monster@ laughs crazily.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ breathes smoke at you.
+VISUAL:@The_monster@ breathes smoke at you.
-@The_monster@ lashes his tail.
+VISUAL:@The_monster@ lashes his tail.
-@The_monster@ grinds his teeth.
+VISUAL:@The_monster@ grinds his teeth.
@The_monster@ sputters.
-@The_monster@ breathes steam at you.
+VISUAL:@The_monster@ breathes steam at you.
-@The_monster@ spits at you.
+VISUAL:@The_monster@ spits at you.
-@The_monster@ disappears for a moment.
+VISUAL:@The_monster@ disappears for a moment.
-@The_monster@ summons a swarm of flies.
+VISUAL:@The_monster@ summons a swarm of flies.
-@The_monster@ picks up a beetle and eats it.
+VISUAL:@The_monster@ picks up a beetle and eats it.
## END _hostile_imp_ ##
%%%%
_demon_taunt_
@@ -280,9 +305,9 @@ _demon_taunt_
_imp_taunt_
@The_monster@ @says@: @imp_taunt@
-################################################################
+##########################################
# Messages by monster body shape
-################################################################
+##########################################
%%%%
default stupid friendly humanoid
@@ -303,66 +328,67 @@ __NONE
default silenced confused humanoid
w:40
-@The_monster@ gestures wildly.
+VISUAL:@The_monster@ gestures wildly.
w:20
-@The_monster@ says something but you don't hear anything.
-@The_monster@ looks confused.
+VISUAL:@The_monster@ says something but you don't hear anything.
+
+VISUAL:@The_monster@ looks confused.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ smiles happily.
+VISUAL:@The_monster@ smiles happily.
-@The_monster@ cries.
+VISUAL:@The_monster@ cries.
## END silenced confused humanoid ##
%%%%
default fleeing silenced humanoid
w:30
-@The_monster@ glances furtively about.
+VISUAL:@The_monster@ glances furtively about.
w:30
-@The_monster@ seems to say something.
+VISUAL:@The_monster@ seems to say something.
-@The_monster@ opens @possessive@ mouth, as if shouting.
+VISUAL:@The_monster@ opens @possessive@ mouth, as if shouting.
-@The_monster@ looks around.
+VISUAL:@The_monster@ looks around.
-@The_monster@ ponders the situation.
+VISUAL:@The_monster@ ponders the situation.
## END fleeing silenced humanoid ##
%%%%
default friendly silenced humanoid
w:30
-@The_monster@ gives you a thumbs up.
+VISUAL:@The_monster@ gives you the thumbs up.
w:30
-@The_monster@ says something you can't hear.
+VISUAL:@The_monster@ says something you can't hear.
-@The_monster@ looks at you.
+VISUAL:@The_monster@ looks at you.
-@The_monster@ waves at you.
+VISUAL:@The_monster@ waves at you.
-@The_monster@ smiles happily.
+VISUAL:@The_monster@ smiles happily.
-@The_monster@ winks at you.
+VISUAL:@The_monster@ winks at you.
## END friendly silenced humanoid ##
%%%%
default silenced humanoid
w:30
-@The_monster@ says something but you don't hear anything.
+VISUAL:@The_monster@ says something but you don't hear anything.
w:30
-@The_monster@ gestures.
+VISUAL:@The_monster@ gestures.
-@The_monster@ gestures obscenely.
+VISUAL:@The_monster@ gestures obscenely.
-@The_monster@ grins.
+VISUAL:@The_monster@ grins.
-@The_monster@ looks angry.
+VISUAL:@The_monster@ looks angry.
-@The_monster@ seems to be listening.
+VISUAL:@The_monster@ seems to be listening.
## END silenced humanoid ##
%%%%
default friendly confused humanoid
@@ -375,7 +401,7 @@ default friendly confused humanoid
@The_monster@ shouts, "What's happening?!"
-@The_monster@ cries.
+VISUAL:@The_monster@ cries.
@The_monster@ shouts, "Yeah!"
@@ -383,11 +409,11 @@ default friendly confused humanoid
@The_monster@ laughs crazily.
-@The_monster@ ponders the situation.
+VISUAL:@The_monster@ ponders the situation.
-@The_monster@ grins madly.
+VISUAL:@The_monster@ grins madly.
-@The_monster@ looks very confused.
+VISUAL:@The_monster@ looks very confused.
@The_monster@ mumbles something.
@@ -403,7 +429,7 @@ default friendly confused humanoid
default confused humanoid
w:30
-@The_monster@ gestures wildly.
+VISUAL:@The_monster@ gestures wildly.
@The_monster@ yells, "Get them off me!"
@@ -411,7 +437,7 @@ w:30
@The_monster@ shouts, "What's happening?!"
-@The_monster@ cries.
+VISUAL:@The_monster@ cries.
@The_monster@ shouts, "NO!"
@@ -419,11 +445,11 @@ w:30
@The_monster@ laughs crazily.
-@The_monster@ ponders the situation.
+VISUAL:@The_monster@ ponders the situation.
-@The_monster@ grins madly.
+VISUAL:@The_monster@ grins madly.
-@The_monster@ looks very confused.
+VISUAL:@The_monster@ looks very confused.
@The_monster@ mumbles something.
@@ -431,7 +457,7 @@ w:30
@The_monster@ asks, "Where am I?"
-@The_monster@ shakes.
+VISUAL:@The_monster@ shakes.
@The_monster@ asks, "Who are you?"
@@ -443,15 +469,15 @@ w:30
@The_monster@ screams, "NO! I can't bear this much noise."
-@The_monster@ covers @possessive@ eyes.
+VISUAL:@The_monster@ covers @possessive@ eyes.
## END confused humanoid ##
%%%%
default friendly fleeing humanoid
w:30
-@The_monster@ tries to hide somewhere.
+VISUAL:@The_monster@ tries to hide somewhere.
-@The_monster@ @shouts@, "WAIT FOR ME, @your_nam@! Could you help me?"
+@The_monster@ @shouts@, "WAIT FOR ME, @player_name@! Could you help me?"
@The_monster@ screams, "Help!"
@@ -469,7 +495,7 @@ w:30
default fleeing humanoid
w:30
-@The_monster@ gives up.
+VISUAL:@The_monster@ gives up.
w:20
@The_monster@ @yells@, "Help!"
@@ -477,7 +503,7 @@ w:20
@The_monster@ @begs@, "Why can't we all just get along?"
# This one won't work for nagas.
-@The_monster@ @almost@ stumbles in trying to escape.
+VISUAL:@The_monster@ @almost@ stumbles in trying to escape.
@The_monster@ @mutters@, "Of all the rotten luck!"
@@ -499,9 +525,9 @@ w:20
@The_monster@ @begs@, "Please! I have a lot of children..."
-@The_monster@ tries to recover @possessive@ lost courage.
+VISUAL:@The_monster@ tries to recover @possessive@ lost courage.
-@The_monster@ looks really @rattled@.
+VISUAL:@The_monster@ looks really @rattled@.
## END fleeing humanoid ##
%%%%
default friendly humanoid
@@ -512,21 +538,21 @@ default friendly humanoid
@The_monster@ says, "It's nice to have friends."
-@The_monster@ looks at you.
+VISUAL:@The_monster@ looks at you.
-@The_monster@ smiles at you.
+VISUAL:@The_monster@ smiles at you.
@The_monster@ says, "@player_name@, you are my only friend."
@The_monster@ says, "@player_name@, I like you."
-@The_monster@ waves at you.
+VISUAL:@The_monster@ waves at you.
@The_monster@ says, "Be careful!"
@The_monster@ says, "Don't worry. I'm here with you."
-@The_monster@ smiles happily.
+VISUAL:@The_monster@ smiles happily.
@The_monster@ shouts, "No mercy! Kill them all!"
@@ -536,61 +562,63 @@ default friendly humanoid
@The_monster@ shouts, "Beware of monsters!"
-@The_monster@ looks friendly.
+VISUAL:@The_monster@ looks friendly.
## END friendly humanoid ##
%%%%
default insect
-@The_monster@ waves @possessive@ antennas.
+VISUAL:@The_monster@ waves @possessive@ antennas.
%%%%
default confused insect
-@The_monster@ wildly waves @possessive@ antennas.
+VISUAL:@The_monster@ wildly waves @possessive@ antennas.
-@The_monster@ seems to be having trouble coordinating all six of @possessive@ legs.
+VISUAL:@The_monster@ seems to be having trouble coordinating all six of @possessive@ legs.
%%%%
default confused winged insect
-@The_monster@ wildly waves @possessive@ antennas.
+VISUAL:@The_monster@ wildly waves @possessive@ antennas.
-@The_monster@ wobbles in @possessive@ flight.
+VISUAL:@The_monster@ wobbles in @possessive@ flight.
%%%%
default confused arachnid
-@The_monster@ seems to be having trouble coordinating all eight of @possessive@ legs.
+VISUAL:@The_monster@ seems to be having trouble coordinating all eight of @possessive@ legs.
%%%%
centipede
-@The_monster@ waves its antennas.
+VISUAL:@The_monster@ waves its antennas.
%%%%
default confused centipede
-@The_monster@ seems to be having trouble coordinating @possessive@ many legs.
+VISUAL:@The_monster@ seems to be having trouble coordinating @possessive@ many legs.
-@The_monster@ wildly waves @possessive@ antennas.
+VISUAL:@The_monster@ wildly waves @possessive@ antennas.
-####################################################################### Speech strings by monster symbol
-######################################################################%%%%
+#########################################
+# Speech strings by monster symbol
+#########################################
+%%%%
default confused 'b'
-@The_monster@ flutters around in erratic circles.
+VISUAL:@The_monster@ flutters around in erratic circles.
%%%%
default 'cap-G'
-@The_monster@ pulsates ominously.
+VISUAL:@The_monster@ pulsates ominously.
%%%%
default 'cap-J'
-@The_monster@ jiggles.
+VISUAL:@The_monster@ jiggles.
%%%%
default confused 'k'
-@The_monster@ buzzes around in tight circles.
+SOUND:@The_monster@ buzzes around in tight circles.
%%%%
default silenced confused 'k'
-@The_monster@ flies around in tight circles.
+VISUAL:@The_monster@ flies around in tight circles.
%%%%
'l'
@@ -598,16 +626,16 @@ default silenced confused 'k'
%%%%
'r'
-@The_monster@ twitches @possessive@ whiskers.
+VISUAL:@The_monster@ twitches @possessive@ whiskers.
%%%%
default confused 'r'
-@The_monster@ runs around in a circle.
+VISUAL:@The_monster@ runs around in a circle.
%%%%
# Excluding the moth of wrath, which being a moth doesn't buzz.
default confused 'y'
-@The_monster@ buzzes around in tight circles.
+SOUND:@The_monster@ buzzes around in tight circles.
%%%%
# Statues and golems never speak unless assigned a message to their
# specific species.
@@ -680,9 +708,13 @@ __NONE
w:1
@_friendly_imp_@
-##################################################################### Player ghost phrases. Ghosts with different classes can be given
+%%%%
+
+####################################################################
+# Player ghost phrases. Ghosts with different classes can be given
# different messages.
-####################################################################%%%%
+####################################################################
+%%%%
# Only use messages that are explicitly for the player ghost, since
# other messages might seem weird coming out of it.
default player ghost
@@ -691,12 +723,12 @@ __NONE
%%%%
silenced player ghost
-SPELL:@The_monster@ stares at you.
-WARN:You feel cold.
+VISUAL SPELL:@The_monster@ stares at you.
+VISUAL WARN:You feel cold.
-@The_monster@ points at you threateningly.
+VISUAL:@The_monster@ points at you threateningly.
-@The_monster@ stares at you while slowly dragging a finger across @possessive@ throat.
+VISUAL:@The_monster@ stares at you while slowly dragging a finger across @possessive@ throat.
## END silenced player ghost ##
%%%%
player ghost
@@ -710,7 +742,7 @@ WARN:You feel cold.
@The_monster@ laughs crazily.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
@The_monster@ makes a sound of rattling chains.
@@ -718,34 +750,34 @@ WARN:You feel cold.
# mv: ghosts are usually wailing instead of speaking normally,
# aren't they?
-@The_monster@ says, "I have seen your future, and it is all used up."
+@The_monster@ @wails@, "I have seen your future, and it is all used up."
-@The_monster@ says, "They lied to you. The Dungeon just goes down and down forever."
+@The_monster@ @wails@, "They lied to you. The Dungeon just goes down and down forever."
-@The_monster@ says, "Do you think the gods will protect you?"
+@The_monster@ @wails@, "Do you think the gods will protect you?"
-@The_monster@ says "I was like you once."
+@The_monster@ @wails@, "I was like you once."
-@The_monster@ says, "Very impressive. But it won't help. Nothing will."
+@The_monster@ @wails@, "Very impressive. But it won't help. Nothing will."
-@The_monster@ says, "What have you got that I didn't have?"
+@The_monster@ @wails@, "What have you got that I didn't have?"
@The_monster@ says very slowly, "There's no hope."
-@The_monster@ shouts, "You will never get the ORB!"
+@The_monster@ @wails@, "You will never get the ORB!"
-@The_monster@ screams, "You must not succeed where I failed!"
+@The_monster@ @wails@, "You must not succeed where I failed!"
@The_monster@ screams, "I'll kill anyone who wants the ORB!"
@The_monster@ screams, "Don't try to defend! You have no chance!"
-@The_monster@ screams, "You will join me soon!"
+@The_monster@ @wails@, "You will join me soon!"
# Hamlet
@The_monster@ wails, "To die, to sleep, no more."
-@The_monster@ wails, "Death is your only future!"
+@The_monster@ @wails@, "Death is your only future!"
@The_monster@ whispers, "They're coming for you..."
@@ -762,12 +794,14 @@ WARN:You feel cold.
@The_monster@ whispers, "The ORB doesn't exist."
## END player ghost ##
-####################################################################### Unique monsters
-######################################################################%%%%
+#######################################
+# Unique monsters
+#######################################
+%%%%
# She is trying to get money and treasure
Agnes
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
@The_monster@ says, "I need a new robe. I'll buy it with your money."
@@ -790,11 +824,11 @@ Agnes
%%%%
Blork the orc
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ frowns.
+VISUAL:@The_monster@ frowns.
-@The_monster@ looks angry.
+VISUAL:@The_monster@ looks angry.
@The_monster@ screams, "I don't like you!"
@@ -828,14 +862,14 @@ Blork the orc
# An ancient lich
Boris
-SPELL:@The_monster@ stares at you.
-WARN:You feel drained.
+VISUAL SPELL:@The_monster@ stares at you.
+VISUAL WARN:You feel drained.
-SPELL:@The_monster@ stares at you.
-WARN:You feel weakened.
+VISUAL SPELL:@The_monster@ stares at you.
+VISUAL WARN:You feel weakened.
-SPELL:@The_monster@ stares at you.
-WARN:You feel troubled.", MSGCH_WARN
+VISUAL SPELL:@The_monster@ stares at you.
+VISUAL WARN:You feel troubled.
SPELL:@The_monster@ casts a spell.
WARN:Your equipment suddenly seems to weigh more.
@@ -852,7 +886,7 @@ WARN:You have a terrible headache.
SPELL:@The_monster@ casts a spell.
ENCHANT:@The_monster@ speeds up.
-SPELL:@The_monster@ gestures.
+VISUAL SPELL:@The_monster@ gestures.
@The_monster@ laughs.
@@ -903,9 +937,9 @@ Edmund
# A wild tempered adventuress
Erica
-@The_monster@ looks angry.
+VISUAL:@The_monster@ looks angry.
-@The_monster@ drinks a potion.
+VISUAL:@The_monster@ drinks a potion.
@The_monster@ laughs wildly.
@@ -935,7 +969,7 @@ Erolcha
@The_monster@ growls.
-@The_monster@ tries to grin evilly.
+VISUAL:@The_monster@ tries to grin evilly.
@The_monster@ screams, "Eat!"
@@ -965,11 +999,11 @@ Francis
SPELL:@The_monster@ casts a spell.
ENCHANT:@The_monster@'s hands start to glow with a soft light.
-@The_monster@ ponders the situation.
+VISUAL:@The_monster@ ponders the situation.
-@The_monster@ looks for a scalpel.
+VISUAL:@The_monster@ looks for a scalpel.
-@The_monster@ throws something at you.
+VISUAL:@The_monster@ throws something at you.
@The_monster@ asks, "Did you know that corpses are an important natural resource?"
@@ -1002,7 +1036,7 @@ Frederick
# A twisted goblin
Ijyb
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
@The_monster@ screams, "Die!"
@@ -1032,7 +1066,7 @@ Ijyb
# A middle aged man, hired to kill you. He is in a hurry.
Harold
-@The_monster@ looks nervous.
+VISUAL:@The_monster@ looks nervous.
@The_monster@ says, "Stand still. I'm trying to kill you."
@@ -1058,9 +1092,9 @@ Harold
# A sorceress disturbed by player
Jessica
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ looks very angry.
+VISUAL:@The_monster@ looks very angry.
@The_monster@ says, "I'm really upset."
@@ -1081,9 +1115,9 @@ SPELL:@The_monster@ gestures wildly.
%%%%
Joseph
-@The_monster@ smiles happily.
+VISUAL:@The_monster@ smiles happily.
-@The_monster@ tries to grin evilly.
+VISUAL:@The_monster@ tries to grin evilly.
@The_monster@ says, "I'm happy to see you. And I'll be happy to kill you."
@@ -1109,11 +1143,11 @@ Joseph
# An ugly old witch looking for someone to kill
Josephine
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ grins malevolently.
+VISUAL:@The_monster@ grins malevolently.
-@The_monster@ grinds her teeth.
+VISUAL:@The_monster@ grinds her teeth.
@The_monster@ laughs insanely.
@@ -1131,7 +1165,7 @@ Josephine
# A bounty hunter
Jozef
-@The_monster@ looks satisfied.
+VISUAL:@The_monster@ looks satisfied.
@The_monster@ asks, "Did you write a testament? You should."
@@ -1163,7 +1197,7 @@ Jozef
# A powerful sorceress, guarding the ORB
Margery
-SPELL:@The_monster@ gestures.
+VISUAL SPELL:@The_monster@ gestures.
SPELL:@The_monster@ casts a spell.
ENCHANT:@The_monster@ is surrounded with an aura of power.
@@ -1177,22 +1211,22 @@ ENCHANT:@The_monster@'s hands start to glow.
SPELL:@The_monster@ screams, "Ergichanteg reztahaw!"
WARN:You feel really bad.
-SPELL:@The_monster@ gestures.
-WARN:You feel doomed.
+VISUAL SPELL:@The_monster@ gestures.
+VISUAL WARN:You feel doomed.
-SPELL:@The_monster@ gestures.
-WARN:You feel weakened.
+VISUAL SPELL:@The_monster@ gestures.
+VISUAL WARN:You feel weakened.
-SPELL:@The_monster@ throws some purple powder towards you.
-WARN:You feel cursed.
+VISUAL SPELL:@The_monster@ throws some purple powder towards you.
+VISUAL WARN:You feel cursed.
-@The_monster@'s eyes start to glow with a red light.
+VISUAL SPELL:@The_monster@'s eyes start to glow with a red light.
-@The_monster@'s eyes start to glow with a green light.
+VISUAL SPELL:@The_monster@'s eyes start to glow with a green light.
-@The_monster@'s eyes start to glow with a blue light.
+VISUAL SPELL:@The_monster@'s eyes start to glow with a blue light.
-@The_monster@ looks very self-confident.
+VISUAL:@The_monster@ looks very self-confident.
@The_monster@ says, "You are dead."
@@ -1223,9 +1257,9 @@ Louise
# A warrior princess looking for the sword "Entarex".
Maud
-@The_monster@ frowns.
+VISUAL:@The_monster@ frowns.
-@The_monster@ looks upset.
+VISUAL:@The_monster@ looks upset.
@The_monster@ asks, "Will you think of me as you die?"
@@ -1253,18 +1287,18 @@ SPELL:@The_monster@ mumbles some strange words.
SPELL:@The_monster@ gestures wildly.
-SPELL:@The_monster@ points at you.
-__YOU_RESIST
+VISUAL SPELL:@The_monster@ points at you.
+VISUAL:__YOU_RESIST
-@The_monster@ drinks a potion.
+VISUAL:@The_monster@ drinks a potion.
-@The_monster@ looks very angry.
+VISUAL:@The_monster@ looks very angry.
-@The_monster@ frowns.
+VISUAL:@The_monster@ frowns.
-@The_monster@ looks angry.
+VISUAL:@The_monster@ looks angry.
-@The_monster@ shakes with wrath.
+VISUAL:@The_monster@ shakes with wrath.
@The_monster@ says, "You really are a nuisance."
@@ -1275,13 +1309,13 @@ __YOU_RESIST
# A disembodied skull.
Murray
-@The_monster@ rolls in a circle.
+VISUAL:@The_monster@ rolls in a circle.
-@The_monster@ rolls around.
+VISUAL:@The_monster@ rolls around.
-@The_monster@ spins like a top.
+VISUAL:@The_monster@ spins like a top.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
@The_monster@ laughs evilly.
@@ -1306,23 +1340,23 @@ Murray
%%%%
silenced Murray
-@The_monster@ rolls in a circle.
+VISUAL:@The_monster@ rolls in a circle.
-@The_monster@ rolls around.
+VISUAL:@The_monster@ rolls around.
-@The_monster@ spins like a top.
+VISUAL:@The_monster@ spins like a top.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ seems to say something.
+VISUAL:@The_monster@ seems to say something.
-@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.
## END silenced Murray ##
%%%%
# A skilled warrior looking for some fame. More kills = more fame.
Norbert
-@The_monster@ smiles happily.
+VISUAL:@The_monster@ smiles happily.
@The_monster@ asks, "Did you write a will? You should."
@@ -1356,13 +1390,13 @@ Norris
SPELL:@The_monster@ mumbles some mantras.
-@The_monster@ is surrounded with aura of peace.
+VISUAL:@The_monster@ is surrounded with aura of peace.
-@The_monster@ looks very balanced.
+VISUAL:@The_monster@ looks very balanced.
-@The_monster@ smiles at you.
+VISUAL:@The_monster@ smiles at you.
-@The_monster@ looks relaxed.
+VISUAL:@The_monster@ looks relaxed.
@The_monster@ sings "Hare Rama, Hare Krishna!"
@@ -1406,21 +1440,21 @@ SPELL:@The_monster@ mumbles some mantras.
# An insane sorceress
Psyche
-@The_monster@ smiles happily.
+VISUAL:@The_monster@ smiles happily.
@The_monster@ giggles crazily.
-@The_monster@ cries.
+VISUAL:@The_monster@ cries.
-@The_monster@ stares at you for a moment.
+VISUAL:@The_monster@ stares at you for a moment.
@The_monster@ sings.
@The_monster@ sings a strange song.
-@The_monster@ bursts into tears.
+VISUAL:@The_monster@ bursts into tears.
-@The_monster@ sucks her thumb.
+VISUAL:@The_monster@ sucks her thumb.
@The_monster@ says, "Please, could you die a little faster?"
@@ -1449,9 +1483,9 @@ Psyche
# A crazy adventurer
Rupert
-@The_monster@ looks excited.
+VISUAL:@The_monster@ looks excited.
-@The_monster@ looks confused.
+VISUAL:@The_monster@ looks confused.
@The_monster@ asks, "You're a monster, aren't you?"
@@ -1478,9 +1512,9 @@ Sigmund
w:30
@The_monster@ laughs crazily.
-@The_monster@ grinds his teeth.
+VISUAL:@The_monster@ grinds his teeth.
-@The_monster@ tries to bite you.
+VISUAL:@The_monster@ tries to bite you.
@The_monster@ asks, "Do you like me?"
@@ -1517,9 +1551,9 @@ ENCHANT:@The_monster@ is suddenly surrounded by pale green light.
# A fighter who likes to kill
Terence
-@The_monster@ looks scornfully at you.
+VISUAL:@The_monster@ looks scornfully at you.
-@The_monster@ bares @possessive@ teeth.
+VISUAL:@The_monster@ bares @possessive@ teeth.
@The_monster@ asks, "Do you want it fast or slow?"
@@ -1551,7 +1585,7 @@ Terence
# An orc hired to kill you
Urug
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
@The_monster@ roars.
@@ -1582,7 +1616,7 @@ Wayne
# An ancient dragon
Xtahua
-@The_monster@ glares at you.
+VISUAL:@The_monster@ glares at you.
@The_monster@ growls, "YOU BORE ME SO."
@@ -1606,11 +1640,13 @@ Xtahua
You are afraid.
## END Xtahua ##
-####################################################################### Specific non-unique monsters
-######################################################################%%%%
+##########################################
+# Specific non-unique monsters
+##########################################
+%%%%
crystal golem
-@The_monster@ glitters in the dim dungeon light.
+VISUAL:@The_monster@ glitters in the dim dungeon light.
%%%%
death cob
@@ -1630,11 +1666,11 @@ deep elf sorcerer
%%%%
default electric golem
-@The_monster@ crackles and sizzles.
+SOUND:@The_monster@ crackles and sizzles.
%%%%
default ice statue
-@The_monster@ glitters in the dim dungeon light.
+VISUAL:@The_monster@ glitters in the dim dungeon light.
%%%%
imp
@@ -1656,19 +1692,19 @@ Killer Klown
@The_monster@ laughs merrily.
-@The_monster@ beckons to you.
+VISUAL:@The_monster@ beckons to you.
-@The_monster@ does a flip.
+VISUAL:@The_monster@ does a flip.
-@The_monster@ does a somersault.
+VISUAL:@The_monster@ does a somersault.
-@The_monster@ smiles at you.
+VISUAL:@The_monster@ smiles at you.
-@The_monster@ grins with merry abandon.
+VISUAL:@The_monster@ grins with merry abandon.
@The_monster@ howls with blood-lust!
-@The_monster@ pokes out @possessive@ tongue.
+VISUAL:@The_monster@ pokes out @possessive@ tongue.
@The_monster@ says, "Come and play with me!"
## END Killer Klown ##
@@ -1677,11 +1713,11 @@ Killer Klown
# with it being a moth.
default confused moth of wrath
-@The_monster@ flutters around in erratic circles.
+VISUAL:@The_monster@ flutters around in erratic circles.
%%%%
default orange crystal statue
-@The_monster@ glitters in the dim dungeon light.
+VISUAL:@The_monster@ glitters in the dim dungeon light.
%%%%
orc sorcerer
@@ -1701,7 +1737,7 @@ sheep
%%%%
default silver statue
-@The_monster@ glitters in the dim dungeon light.
+VISUAL:@The_monster@ glitters in the dim dungeon light.
%%%%
# A cruel demon
tormentor
@@ -1719,11 +1755,11 @@ w:20
@The_monster@ laughs crazily.
-@The_monster@ grins evilly.
+VISUAL:@The_monster@ grins evilly.
-@The_monster@ grins madly.
+VISUAL:@The_monster@ grins madly.
-@The_monster@ grins malevolently.
+VISUAL:@The_monster@ grins malevolently.
@The_monster@ says, "I am all your nightmares come true."
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index b63df4d115..bdf319fca9 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -2580,10 +2580,10 @@ void debug_make_monster_shout(monsters* mon)
if (type == 's')
{
- if (silenced(mon->x, mon->y))
- mpr("The monster is silenced and likely won't give any shouts.");
if (silenced(you.x_pos, you.y_pos))
mpr("You are silenced and likely won't hear any shouts.");
+ else if (silenced(mon->x, mon->y))
+ mpr("The monster is silenced and likely won't give any shouts.");
for (int i = 0; i < num_times; i++)
force_monster_shout(mon);
@@ -2591,7 +2591,7 @@ void debug_make_monster_shout(monsters* mon)
else
{
if (mon->invisible())
- mpr("The monster is invisble and likely won't speak.");
+ mpr("The monster is invisible and likely won't speak.");
if (silenced(you.x_pos, you.y_pos) && !silenced(mon->x, mon->y))
mpr("You are silenced but the monster isn't; you will "
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 49a92b0f9d..c09c1056b1 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -273,6 +273,7 @@ int channel_to_colour( msg_channel_type channel, int param )
break;
case MSGCH_TALK:
+ case MSGCH_TALK_VISUAL:
ret = WHITE;
break;
@@ -485,7 +486,8 @@ static void mpr_check_patterns(const std::string& message,
// reusing travel_stop_message here
if (channel != MSGCH_DIAGNOSTICS && channel != MSGCH_EQUIPMENT
- && channel != MSGCH_SOUND && channel != MSGCH_TALK)
+ && channel != MSGCH_TALK && channel != MSGCH_TALK_VISUAL
+ && channel != MSGCH_SOUND)
{
interrupt_activity( AI_MESSAGE, channel_to_str(channel) + ":" + message );
}
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index fc70f66c00..0340f2aaa1 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -4080,7 +4080,7 @@
0, 15, MONS_PHANTOM, MONS_PLAYER_GHOST, MH_UNDEAD, -5,
{ {AT_HIT, AF_PLAIN, 5}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 4, 2, 3, 0 },
- 1, 2, 10, 7, MST_GHOST, CE_CONTAMINATED, Z_NOZOMBIE, S_SILENT, I_HIGH,
+ 1, 2, 10, 7, MST_GHOST, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT, I_HIGH,
MONUSE_OPEN_DOORS, SIZE_MEDIUM
}
,
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index fd097c2963..d773f0032d 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -4860,10 +4860,14 @@ std::string do_mon_str_replacements(const std::string in_msg,
msg = replace_all(msg, "@A_monster@", monster->name(DESC_CAP_A));
msg = replace_all(msg, "@The_monster@", monster->name(cap));
- msg = replace_all(msg, "@possessive@",
- mons_pronoun(monster->type, 3));
msg = replace_all(msg, "@pronoun@",
mons_pronoun(monster->type, 0));
+ msg = replace_all(msg, "@pronoun@",
+ mons_pronoun(monster->type, 1));
+ msg = replace_all(msg, "@Possessive@",
+ mons_pronoun(monster->type, 2));
+ msg = replace_all(msg, "@possessive@",
+ mons_pronoun(monster->type, 3));
msg = replace_all(msg, "@imp_taunt@", imp_taunt_str());
msg = replace_all(msg, "@demon_taunt@", demon_taunt_str());
diff --git a/crawl-ref/source/monspeak.cc b/crawl-ref/source/monspeak.cc
index 04da8f22fe..f1230a6fbd 100644
--- a/crawl-ref/source/monspeak.cc
+++ b/crawl-ref/source/monspeak.cc
@@ -42,21 +42,30 @@
static std::string get_speak_string(const std::vector<std::string> prefixes,
const std::string key,
- const monsters *monster)
+ const monsters *monster,
+ bool ignore_silenced = false)
{
std::string prefix = "";
+ bool silenced = false;
const int size = prefixes.size();
for (int i = 0; i < size; i++)
{
+ if (prefixes[i] == "silenced")
+ {
+ if (ignore_silenced)
+ continue;
+ silenced = true;
+ }
prefix += prefixes[i];
prefix += " ";
}
std::string msg = "";
+ // try string of all prefixes
msg = getSpeakString(prefix + key);
if (msg != "")
return msg;
-
+
// Combinations of prefixes by threes
if (size >= 3)
{
@@ -105,6 +114,10 @@ static std::string get_speak_string(const std::vector<std::string> prefixes,
// No prefixes
msg = getSpeakString("default " + key);
+ // try the same ignoring silence
+ if (msg == "" && silenced)
+ return get_speak_string(prefixes, key, monster, true);
+
return msg;
}
@@ -150,18 +163,23 @@ bool mons_speaks(const monsters *monster)
// *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()
// replacing S_RANDOM with a random value.
if (silenced(monster->x, monster->y)
&& get_monster_data(monster->type)->shouts != S_SILENT)
+ {
if (!one_chance_in(3))
return false;
+ }
// charmed monsters aren't too expressive
if (monster->has_ench(ENCH_CHARM))
@@ -178,8 +196,12 @@ bool mons_speaks(const monsters *monster)
if (monster->behaviour == BEH_FLEE)
prefixes.push_back("fleeing");
+ bool silence = silenced(you.x_pos, you.y_pos);
if (silenced(monster->x, monster->y))
+ {
+ silence = true;
prefixes.push_back("silenced");
+ }
if (monster->has_ench(ENCH_CONFUSION))
prefixes.push_back("confused");
@@ -327,47 +349,37 @@ bool mons_speaks(const monsters *monster)
for (int i = 0, size = lines.size(); i < size; i++)
{
std::string line = lines[i];
-
- if (line == "__YOU_RESIST")
- {
- canned_msg( MSG_YOU_RESIST );
- continue;
- }
- else if (line == "__NOTHING_HAPPENS")
- {
- canned_msg( MSG_NOTHING_HAPPENS );
- continue;
- }
- else if (line == "__MORE")
- {
- more();
- continue;
- }
-
+
// This function is a little bit of a problem for the message
// channels since some of the messages it generates are "fake"
// warning to scare the player. In order to accomidate this
// intent, we're falsely categorizing various things in the
// function as spells and danger warning... everything else
// just goes into the talk channel -- bwr
+ // [jpeg] Added MSGCH_TALK_VISUAL for silent "chatter"
msg_channel_type msg_type = MSGCH_TALK;
+ std::string param = "";
std::string::size_type pos = line.find(":");
if (pos != std::string::npos)
+ param = line.substr(0, pos);
+
+ if (!param.empty())
{
- std::string param = line.substr(0, pos);
- bool match = true;
+ bool match = true;
if (param == "DANGER")
msg_type = MSGCH_DANGER;
- else if (param == "WARN")
+ else if (param == "WARN" && !silence || param == "VISUAL WARN")
msg_type = MSGCH_WARN;
else if (param == "SOUND")
msg_type = MSGCH_SOUND;
- else if (param == "SPELL")
+ else if (param == "VISUAL")
+ msg_type = MSGCH_TALK_VISUAL;
+ else if (param == "SPELL" && !silence || param == "VISUAL SPELL")
msg_type = MSGCH_MONSTER_SPELL;
- else if (param == "ENCHANT")
+ else if (param == "ENCHANT" && !silence || param == "VISUAL ENCHANT")
msg_type = MSGCH_MONSTER_ENCHANT;
else if (param == "PLAIN")
msg_type = MSGCH_PLAIN;
@@ -378,6 +390,23 @@ bool mons_speaks(const monsters *monster)
line = line.substr(pos + 1);
}
+ // except for VISUAL none of the above influence these
+ if (line == "__YOU_RESIST" && (!silence || param == "VISUAL"))
+ {
+ canned_msg( MSG_YOU_RESIST );
+ continue;
+ }
+ else if (line == "__NOTHING_HAPPENS" && (!silence || param == "VISUAL"))
+ {
+ canned_msg( MSG_NOTHING_HAPPENS );
+ continue;
+ }
+ else if (line == "__MORE" && (!silence || param == "VISUAL"))
+ {
+ more();
+ continue;
+ }
+
mpr(line.c_str(), msg_type);
}
diff --git a/crawl-ref/source/mpr.h b/crawl-ref/source/mpr.h
index 34094e3a14..02772989e0 100644
--- a/crawl-ref/source/mpr.h
+++ b/crawl-ref/source/mpr.h
@@ -31,6 +31,7 @@ enum msg_channel_type
MSGCH_RECOVERY, // recovery from disease/stat/poison condition
MSGCH_SOUND, // messages about things the player hears
MSGCH_TALK, // monster talk (param is monster type)
+ MSGCH_TALK_VISUAL, // silent monster "talk" (not restricted by silence)
MSGCH_INTRINSIC_GAIN, // player level/stat/species-power gains
MSGCH_MUTATION, // player gain/lose mutations
MSGCH_MONSTER_SPELL, // monsters casting spells
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index c44639b141..3c2db65d08 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -938,11 +938,23 @@ static void handle_monster_shouts(monsters* monster, bool force = false)
else
{
msg = do_mon_str_replacements(msg, monster);
+ msg_channel_type channel = MSGCH_TALK;
+
+ std::string param = "";
+ std::string::size_type pos = msg.find(":");
- if (mons_shouts(monster->type) == S_SILENT)
- msg::streams(MSGCH_TALK) << msg << std::endl;
- else
- msg::streams(MSGCH_SOUND) << msg << std::endl;
+ if (pos != std::string::npos)
+ {
+ param = msg.substr(0, pos);
+ msg = msg.substr(pos + 1);
+ }
+
+ if (mons_shouts(monster->type) == S_SILENT || param == "VISUAL")
+ channel = MSGCH_TALK_VISUAL;
+ else if (param == "SOUND")
+ channel = MSGCH_SOUND;
+
+ msg::streams(channel) << msg << std::endl;
}
if (noise_level > 0)