From: Pasi Kallinen Date: Tue, 24 Jan 2023 06:34:27 +0000 (+0200) Subject: Gehennom tweaks: replace some walls with boulders X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c21832cf24699633e80635178ced923045377c2;p=nethack Gehennom tweaks: replace some walls with boulders --- diff --git a/dat/nhlib.lua b/dat/nhlib.lua index 74f94cb4c..4d3aac38c 100644 --- a/dat/nhlib.lua +++ b/dat/nhlib.lua @@ -101,6 +101,17 @@ function hell_tweaks(protected_area) lavariver = lavariver & prot; des.terrain(lavariver, liquid); end + + -- replacing some walls with boulders + if (percent(20)) then + local amount = 3 * math.random(1, 8); + local bwalls = selection.match([[.w.]]):percentage(amount) | selection.match(".\nw\n."):percentage(amount); + bwalls = bwalls & prot; + bwalls:iterate(function (x,y) + des.terrain(x, y, "."); + des.object("boulder", x, y); + end); + end end -- pline with variable number of arguments