diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-09 01:21:44 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-09 01:47:09 +0530 |
commit | 9841ce45ea91c1ad394d706fd748ffc1fd9d9de0 (patch) | |
tree | 047cbb69276a6b8c55d9b22c1e01442a8bd7d173 /crawl-ref/source/test/snake-rune.lua | |
parent | 915b92e5527c1300fa701a31e3dcbc070b48d177 (diff) | |
download | crawl-ref-9841ce45ea91c1ad394d706fd748ffc1fd9d9de0.tar.gz crawl-ref-9841ce45ea91c1ad394d706fd748ffc1fd9d9de0.zip |
Add -script option to Crawl to run a Lua script. Scripts are similar to tests, but can be parameterised.
Add a script to generate 150 level at a named place and report on all the monsters generated there.
Diffstat (limited to 'crawl-ref/source/test/snake-rune.lua')
-rw-r--r-- | crawl-ref/source/test/snake-rune.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/test/snake-rune.lua b/crawl-ref/source/test/snake-rune.lua index 56ea8b8273..dbf973afa7 100644 --- a/crawl-ref/source/test/snake-rune.lua +++ b/crawl-ref/source/test/snake-rune.lua @@ -1,3 +1,7 @@ +-- Walks down the dungeon to Snake:$ and tests for the existence of the rune. +-- This is a more exhaustive test than rune-gen.lua since it generates all +-- intermediate levels and activates the dungeon connectivity code. + local niters = 500 local current_iter = 0 @@ -7,9 +11,6 @@ local branch_entrance_feats = { } local junk_feat_fn = dgn.feature_set_fn("rock_wall", "floor", "stone_wall") -local down_stair_fn = dgn.feature_set_fn("stone_stairs_down_i", - "stone_stairs_down_ii", - "stone_stairs_down_iii") local function thing_exists_fn(thing) return function() @@ -38,7 +39,7 @@ local function visit_branch_end_from(start, stair_places, final_predicate) end end - if down_stair_fn(dfeat) then + if test.is_down_stair(dfeat) then table.insert(downstairs, dgn.point(x, y)) end end |