summaryrefslogtreecommitdiffstats
path: root/crawl-ref/docs
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-12-07 03:04:10 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-12-07 03:04:10 -0800
commite0d592b0a5e032d7d35551907c4af69014e48b10 (patch)
tree8d8d3f1c0d1e75b05b184a04815b66b2ef709139 /crawl-ref/docs
parenta2285dbfa468cca31b2d724db38ccb102c487675 (diff)
downloadcrawl-ref-e0d592b0a5e032d7d35551907c4af69014e48b10.tar.gz
crawl-ref-e0d592b0a5e032d7d35551907c4af69014e48b10.zip
New monster props "speech_func" and "shout_func"
MonPropsMarker can be used to set "speech_func" and "shout_func" on a monster, functions which return a string to be used as the monster's speech/shout message.
Diffstat (limited to 'crawl-ref/docs')
-rw-r--r--crawl-ref/docs/develop/levels/advanced.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/docs/develop/levels/advanced.txt b/crawl-ref/docs/develop/levels/advanced.txt
index f9cd653809..f5ffffe725 100644
--- a/crawl-ref/docs/develop/levels/advanced.txt
+++ b/crawl-ref/docs/develop/levels/advanced.txt
@@ -779,6 +779,18 @@ the marker is placed upon. The options currently available are:
* monster_dies_lua_key: If this property is set to a function, that function
will be executed upon the monster's death.
+* shout_func: If this property is set to a function, that function will be
+ called if the monster shouts, and the string returned by the function
+ will be used as the text of the message. can return "__NONE" to
+ make the monster not shout, or "__NEXT" to proceed as if there was no
+ speech_func property.
+
+* speech_func: If this property is set to a function, that function will be
+ called if the monster speaks, and the string returned by the function
+ will be used as the text of the message. can return "__NONE" to
+ make the monster not talk, or "__NEXT" to proceed as if there was no
+ speech_func property.
+
* speech_key: This will override the initial key searched for in the speech
database. Setting this to "Edmund", for example, will give the relevant
monster Edmund's speech.
@@ -792,6 +804,9 @@ An example of MonPropsMarker to replace the description and quote of a monster:
MARKER: 8 = lua:MonPropsMarker:new {description="What a horrible sight!\n", \
quote='"They were filled with fear!'\n"}
+Note that all of the speech related properties will be reset if the monster
+polymorphs.
+
Lua API reference
-----------------
a. The Map.