Allow defining random-teleport exclusion zones in lua

Adds a new lua command

  des.exclusion({ type = "teleport", region = { x1,y1, x2,y2 } });

which allows defining "exclusion zones" in the level, areas where
random teleports (or falling into the level) will never place the hero.
Does not prevent targeted teleportation into the area.

Breaks saves and bones.
This commit is contained in:
Pasi Kallinen
2023-08-24 17:42:06 +03:00
parent 0794a64b9d
commit e407af4477
15 changed files with 143 additions and 3 deletions

View File

@@ -662,6 +662,7 @@ xx|.....|xx
shuffle(nasty_undead);
des.monster(nasty_undead[1], 2, 2);
des.exclusion({ type = "teleport", region = { 2,2, 3,3 } });
end });
end,