From a9553d73ed4212fedbdb6a1fa40c545de1f97dc2 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 5 Nov 2009 11:35:08 +1000 Subject: Give Jelly rooms the chance of having a Jiyva altar. Current chance is 1-in-30 per square. The larger the room (and thus, the more jellies), the higher the chance of getting an altar. Shouldn't leave behind erroneous altars when vetoed. --- crawl-ref/source/dat/rooms.des | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/dat/rooms.des') diff --git a/crawl-ref/source/dat/rooms.des b/crawl-ref/source/dat/rooms.des index 24d21cdfb8..6380dd98f8 100644 --- a/crawl-ref/source/dat/rooms.des +++ b/crawl-ref/source/dat/rooms.des @@ -134,7 +134,7 @@ function sroom_morgue() end function sroom_jelly_pit() - local level = dgn.get_special_room_info() + 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 @@ -156,6 +156,19 @@ function sroom_jelly_pit() mons[6] = "acid blob w:" .. (1 + math.floor((level - 15) / 4)) end + -- XXX: This may leave behind random Jiyva altars when the vault is veto'd. + -- It really shouldn't, though! + local jiyva_placed = false + local jiyva_altar = dgn.fnum("altar_jiyva") + for x = tl_x, br_x do + for y = tl_y, br_y do + if not jiyva_placed and crawl.one_chance_in(30) then + dgn.grid(x, y, jiyva_altar) + jiyva_placed = true + end + end + end + fill_special_room(mons, nil, true) end }} -- cgit v1.2.3-54-g00ecf