diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-27 07:58:15 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-27 07:58:15 +0000 |
commit | 2b793343f9c43103ee152886353c2988e4434def (patch) | |
tree | a875175252e45b1f157e16968a1aca01194ffea0 /crawl-ref/source/dat/rooms.des | |
parent | 29287f79ef97dc85c1c45fb6d566ca9e727bc4d0 (diff) | |
download | crawl-ref-2b793343f9c43103ee152886353c2988e4434def.tar.gz crawl-ref-2b793343f9c43103ee152886353c2988e4434def.zip |
Make beehives in the Lair occur at the same absolute frequency as in 0.4 by
making the functions for special rooms innapropriate for the Lair do nothing.
Can't do this via dummy vaults since special rooms are chosen based on absolute
depth, not branch depth.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7991 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/rooms.des')
-rw-r--r-- | crawl-ref/source/dat/rooms.des | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/crawl-ref/source/dat/rooms.des b/crawl-ref/source/dat/rooms.des index 74bfd1e8a5..24d21cdfb8 100644 --- a/crawl-ref/source/dat/rooms.des +++ b/crawl-ref/source/dat/rooms.des @@ -12,6 +12,10 @@ function fill_special_room(mon, lord_mon, pack) mon = util.join(" / ", mon) end + if type(mon) == "string" then + mon = dgn.monster_spec(mon) + end + local lord_x, los_y = -1, -1 if lord_mon then lord_x = crawl.random_range(tl_x, br_x) @@ -33,6 +37,15 @@ function fill_special_room(mon, lord_mon, pack) end end +-- NOTE: To make beehives occur in the Lair with the same absolute frequency +-- as in 0.4, the special room definitions which don't fit there should +-- just do nothing. Can't use dummy vaults to do this since vault +-- frequency is controlled by absolute depth rather than by branch depth. +function is_in_lair() + local l_name = dgn.level_name(dgn.level_id()) + return string.find(dgn.level_name(dgn.level_id()), "Lair") +end + function sroom_kobold_lair() local level = dgn.get_special_room_info() @@ -41,6 +54,10 @@ function sroom_kobold_lair() return end + if is_in_lair() then + return + end + local level_mons = 3 if level < 4 then @@ -67,6 +84,10 @@ function sroom_orc_lair() return end + if is_in_lair() then + return + end + local mon if level > 24 then mon = "orc w:2 / orc warrior w:3 / orc knight w:2 / ogre w:2 / " @@ -89,21 +110,25 @@ function sroom_beehive() if not level then return end - fill_special_room("patrolling killer bee larva w:1 / " .. "patrolling killer bee w:6", "patrolling queen bee", true) + local food = dgn.item_spec("royal jelly w:1 / honeycomb w:24") for x = tl_x, br_x do for y = tl_y, br_y do if crawl.one_chance_in(2) then - dgn.create_item(x, y, "royal jelly w:1 / honeycomb w:24") + dgn.create_item(x, y, food) end end end end function sroom_morgue() + if is_in_lair() then + return + end + fill_special_room("small zombie w:500 / wight w:167 / necrophage w:167 / " .. "wraith w:125 / vampire w:42", nil, true) end |