From e0d592b0a5e032d7d35551907c4af69014e48b10 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Mon, 7 Dec 2009 03:04:10 -0800 Subject: 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. --- crawl-ref/docs/develop/levels/advanced.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crawl-ref/docs') 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. -- cgit v1.2.3-54-g00ecf