More interesting Gehennom levels

Instead of just plain old boring mazes, spice up Gehennom by
occasionally adding lava, iron bars, or even mines-style levels
(with lava, of course).

Of the fixed Gehennom levels, only Asmodeus' lair has been changed
to add some random lava pools.

Also some lua fixes and changes:
- Fixed a selection negation bounding box being wrong.
- Fixed a selection negated and ORed returning wrong results.
- des.map now returns a selection of the map grids it touched.
- When using des.map contents-function the commands following the
  map are not relative to it.
This commit is contained in:
Pasi Kallinen
2023-01-09 22:25:23 +02:00
parent 7c72c1f141
commit 4af086be73
13 changed files with 310 additions and 65 deletions

View File

@@ -243,9 +243,9 @@ III]] })
...]], contents = function(map)
des.terrain(0,0, "L");
des.terrain(map.width-1,map.height-1, "T");
check_loc_name(0, 0, "lava pool");
check_loc_name(2, 2, "tree");
end});
check_loc_name(0, 0, "lava pool");
check_loc_name(2, 2, "tree");
end
function test_feature()

View File

@@ -483,6 +483,18 @@ function test_sel_bounds()
end
end
-- test des.map returning a selection
function test_sel_map()
local __func__ = "test_sel_map";
des.reset_level();
des.level_init({ style = "solidfill", fg = " " });
local sela = des.map([[LLL]]);
sel_has_n_points(sela, 3, __func__);
local selb = selection.match("L");
sel_are_equal(sela, selb, __func__);
end
nh.debug_flags({mongen = false, hunger = false, overwrite_stairs = true });
test_selection_params();
test_sel_negate();
@@ -502,3 +514,4 @@ test_sel_flood();
test_sel_match();
test_sel_iterate();
test_sel_bounds();
test_sel_map();