diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-05 11:35:08 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-05 11:49:30 +1000 |
commit | a9553d73ed4212fedbdb6a1fa40c545de1f97dc2 (patch) | |
tree | 0845fb1cb8649861b732213d175ed5082668d1d1 /crawl-ref/source/dat | |
parent | ebce0ae5a24d6af41ebb888c50cb14b770d22f89 (diff) | |
download | crawl-ref-a9553d73ed4212fedbdb6a1fa40c545de1f97dc2.tar.gz crawl-ref-a9553d73ed4212fedbdb6a1fa40c545de1f97dc2.zip |
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.
Diffstat (limited to 'crawl-ref/source/dat')
-rw-r--r-- | crawl-ref/source/dat/rooms.des | 15 |
1 files changed, 14 insertions, 1 deletions
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 }} |