diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-26 04:49:33 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-26 04:49:33 +0000 |
commit | 9629076ee9f0b7a88048c0eb6d979c5d86a7a3d2 (patch) | |
tree | cb7381ef2ff5a76c88624a951070e3495b15e5fb /crawl-ref/source/dat/rooms.des | |
parent | 300286dd913491e4869d56078d42bab7c47c40db (diff) | |
download | crawl-ref-9629076ee9f0b7a88048c0eb6d979c5d86a7a3d2.tar.gz crawl-ref-9629076ee9f0b7a88048c0eb6d979c5d86a7a3d2.zip |
Start of moving special room definitions (monster lairs and monster pits)
to lua. As of now all special rooms are filled with rats.
Introduces two new members to map_def, weight_depth_mult and weight_depth_div,
which change a map's weight based on the absolute dungeon depth (not yet
accesible via lua or vault definitions). This needs to be done in C++
rather than in lua since a map's lua isn't re-invoked every time a random
map is chosen, but only when the map is placed.
NOTE: When I first made this change crawl started crashing until I manually
forced the recompilation of util/levcomp.lex.o and util/levcomp.tab.o;
if crawl starts crashing after this change, try doing that.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7629 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/rooms.des')
-rw-r--r-- | crawl-ref/source/dat/rooms.des | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/dat/rooms.des b/crawl-ref/source/dat/rooms.des new file mode 100644 index 0000000000..960426f671 --- /dev/null +++ b/crawl-ref/source/dat/rooms.des @@ -0,0 +1,19 @@ +NAME: special_room_test +TAGS: special_room allow_dup + +{{ + local level, tl_x, tl_y, br_x, br_y = dgn.get_special_room_info() + + -- Return early if we're being called during map validation. + if not level then + return + end + + for x = tl_x, br_x do + for y = tl_y, br_y do + dgn.create_monster(x, y, "rat") + end + end +}} +MAP +ENDMAP |