From 999222a8a4c8e432e2f83351d0af673e7aadc9e1 Mon Sep 17 00:00:00 2001 From: copperwater Date: Wed, 13 May 2020 20:52:33 -0400 Subject: [PATCH] Add minimum difficulty cutoffs to two themed rooms This sets the minimum level depth of "Spider nest" to 10, somewhat above the difficulty of an individual giant spider, because a whole room full of them is a tougher challenge. Note that this isn't the only possible fix to this problem; another solution would be to alter the special case in mktrap that hardcodes a giant spider to generate with each web to produce cave spiders if giant spiders would be too tough. Even then, a lower difficulty cutoff is probably still warranted for this room, since a large number of cave spiders might be too tough for level 1 or 2. This also sets the minimum level depth of "Boulder room" to 4, based on the fact that individual rolling boulder traps normally can't appear until level 2, and having a bunch of them in one place which may be required to reach the downstairs could be problematic. This doesn't do anything to address the "Mausoleum" room problem, in which a master or arch-lich can generate and immediately warp out and attack the player. Even with a high difficulty threshold, it won't fix the problem of these liches generating out of their normal difficulty and Gehennom constraints. Other potential candidates for difficulty thresholds: - "Trap room": This room might be perilous on the first few levels, especially if the level generates with it blocking the way to the downstairs. - "Massacre": Doesn't have any particular hazards, but might be interesting if it only generated at deeper levels. --- dat/themerms.lua | 68 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/dat/themerms.lua b/dat/themerms.lua index db831a496..73d6e8367 100644 --- a/dat/themerms.lua +++ b/dat/themerms.lua @@ -16,7 +16,7 @@ -- to generate a single themed room. themerooms = { - { + { -- the "default" room frequency = 1000, contents = function() @@ -79,38 +79,44 @@ themerooms = { end, -- Boulder room - function() - des.room({ type = "themed", - contents = function(rm) - for x = 0, rm.width - 1 do - for y = 0, rm.height - 1 do - if (percent(30)) then - if (percent(50)) then - des.object("boulder"); - else - des.trap("rolling boulder"); - end - end - end - end - end - }); - end, + { + mindiff = 4, + contents = function() + des.room({ type = "themed", + contents = function(rm) + for x = 0, rm.width - 1 do + for y = 0, rm.height - 1 do + if (percent(30)) then + if (percent(50)) then + des.object("boulder"); + else + des.trap("rolling boulder"); + end + end + end + end + end + }); + end + }, -- Spider nest - function() - des.room({ type = "themed", - contents = function(rm) - for x = 0, rm.width - 1 do - for y = 0, rm.height - 1 do - if (percent(30)) then - des.trap("web", x, y); - end - end - end - end - }); - end, + { + mindiff = 10, + contents = function() + des.room({ type = "themed", + contents = function(rm) + for x = 0, rm.width - 1 do + for y = 0, rm.height - 1 do + if (percent(30)) then + des.trap("web", x, y); + end + end + end + end + }); + end + }, -- Trap room function()