diff options
author | evktalo <evktalo@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-20 11:20:55 +0000 |
---|---|---|
committer | evktalo <evktalo@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-20 11:20:55 +0000 |
commit | d37b37e5631e98f098463195606d13467c334349 (patch) | |
tree | cc3f4822afcb805639dd123522edd50e37c3d01a /crawl-ref/docs | |
parent | bb40b309944e95aa6d7b73605a3108d17b7db740 (diff) | |
download | crawl-ref-d37b37e5631e98f098463195606d13467c334349.tar.gz crawl-ref-d37b37e5631e98f098463195606d13467c334349.zip |
Commit r10308 to 0.5: Milestones for entering Ice Caves, Minitombs and Sewers.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10350 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/docs')
-rw-r--r-- | crawl-ref/docs/level_design.txt | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/crawl-ref/docs/level_design.txt b/crawl-ref/docs/level_design.txt index a20d4e747a..91df249b33 100644 --- a/crawl-ref/docs/level_design.txt +++ b/crawl-ref/docs/level_design.txt @@ -1502,6 +1502,28 @@ You can then use this line in the map definition to execute the lua block: You can also set env.spawn_random_rate() to have monsters generated from the list during play. +Milestones for portal vaults +---------------------------- + +This example is from icecave.des, defined in the lua preludes: + +{{ +function ice_cave_milestone(e) + crawl.mark_milestone("br.enter", "entered an Ice Cave.") +end +}} + +The function is called from each of the destination map definitions: + +: ice_cave_milestone(_G) + +This marks down entering the portal vault in the milestones. When the portal +is entered, the destination map is chosen and the call to crawl.mark_milestone +is executed along with the rest of the map definition. + +Adding milestones in a .des does have the slight catch of creating multiple +milestones if the map fails validation for some reason, so it's best used +in maps that will never fail validation. I. Lua reference =================== @@ -1808,7 +1830,8 @@ provide utility methods. mpr, mesclr, random2, coinflip, one_chance_in, redraw_screen, input_line, c_input_line, getch, kbhit, flush_input, sendkeys, playsound, runmacro, bindkey, setopt, msgch_num, msgch_name, regex, -message_filter, trim, split, game_started, err_trace, args +message_filter, trim, split, game_started, err_trace, args, +mark_milestone Lua API - character information |