From 0bfd6b22f1d5e1ab6943079eab94053267bf7e6f Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 24 Jan 2023 09:00:43 +0200 Subject: [PATCH] Gehennom tweaks: replace some walls with iron bars --- dat/nhlib.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dat/nhlib.lua b/dat/nhlib.lua index 4d3aac38c..9ec107a6e 100644 --- a/dat/nhlib.lua +++ b/dat/nhlib.lua @@ -112,6 +112,15 @@ function hell_tweaks(protected_area) des.object("boulder", x, y); end); end + + -- replacing some walls with iron bars + if (percent(20)) then + local amount = 3 * math.random(1, 8); + local fwalls = selection.match([[.w.]]):percentage(amount) | selection.match(".\nw\n."):percentage(amount); + fwalls = fwalls:grow() & selection.match("w") & prot; + des.terrain(fwalls, "F"); + end + end -- pline with variable number of arguments