From 9c21832cf24699633e80635178ced923045377c2 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 24 Jan 2023 08:34:27 +0200 Subject: [PATCH] Gehennom tweaks: replace some walls with boulders --- dat/nhlib.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) 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