diff options
author | evktalo <evktalo@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-20 09:59:17 +0000 |
---|---|---|
committer | evktalo <evktalo@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-20 09:59:17 +0000 |
commit | 7ed0be12c00bbee1bd159af4e704eb62a3cd802c (patch) | |
tree | 4245fa4d814ac768e39a67ec8253cd95f94c0c78 /crawl-ref/docs | |
parent | 2e507b0064aca5b5cd9256f2837cf6178055670b (diff) | |
download | crawl-ref-7ed0be12c00bbee1bd159af4e704eb62a3cd802c.tar.gz crawl-ref-7ed0be12c00bbee1bd159af4e704eb62a3cd802c.zip |
Milestones for entering Ice Cave, Sewer and Ossuary. Document making these for portal vaults in level_design.txt.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10348 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 6bb1e88430..922774ba6a 100644 --- a/crawl-ref/docs/level_design.txt +++ b/crawl-ref/docs/level_design.txt @@ -1504,6 +1504,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 =================== @@ -1810,7 +1832,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 |