summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dat/rooms.des29
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