Files
nethack/dat/Arc-goal.lua
copperwater 0fef8fce9f Unify all special level filling options
The existing system was a confusing mess of competing names (filled,
needfill, prefilled, etc) that had varying semantics, with prefilled
being the worst offender as it meant at least three different things in
various contexts. This commit unifies everything in the code under
"needfill", and everything in Lua under "filled", which defaults to 0
everywhere.

This also removes the second argument to fill_special_room; that
function now just checks the needfill of the room it's passed. As
before, a filled == 2 value is used for a special room to indicate that
the room should set the appropriate level flag, but shouldn't actually
be stocked with anything (for instance, King Arthur's throne room); the
difference is that this now comes directly from the lua script instead
of being manipulated within sp_lev.c.

The prefilled argument had one use case that is occasionally used in the
level files: if the level designer had specified an ordinary region with
prefilled = 1, it would become a room to control monster arrivals on a
level -- monsters that arrive within the bounds of a room are supposed
to stay there.
However, not all of the places where the comments indicated this was
being used were using it correctly; I tested this by letting a few
monsters fall through the knox portal (they're supposed to be
constrained to the entry room) and waiting a hundred turns, then going
through the portal; they were not constrained to the room and had
"wandered" through its walls.
Instead of trying to maintain this special case, I have added an
optional "arrival_room" boolean argument to des.region, which forces it
to create a room for the purposes of constraining monster arrival.

I have gone through and replaced occurrences of prefilled in lua files
with the appropriate filled option (or arrival, as needed). In some
cases, that resulted in questionable regions such as a filled ordinary
area in a non-themeroom (I just dropped the filled=1), or an area which
didn't do anything, not even lighting (which I deleted).
2020-09-27 18:54:15 +03:00

116 lines
4.2 KiB
Lua

-- NetHack 3.7 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
--
des.level_init({ style = "solidfill", fg = " " });
des.level_flags("mazelevel");
des.map([[
---------
|..|.|..|
-----------|..S.S..|-----------
|.|........|+-|.|-+|........|.|
|.S........S..|.|..S........S.|
|.|........|..|.|..|........|.|
------------------+------------------
|..|..........|.......|..........|..|
|..|..........+.......|..........S..|
|..S..........|.......+..........|..|
|..|..........|.......|..........|..|
------------------+------------------
|.|........|..|.|..|........|.|
|.S........S..|.|..S........S.|
|.|........|+-|.|-+|........|.|
-----------|..S.S..|-----------
|..|.|..|
---------
]]);
-- Dungeon Description
des.region(selection.area(00,00,75,19), "lit")
des.region(selection.area(35,02,36,03), "unlit")
des.region(selection.area(40,02,41,03), "unlit")
des.region(selection.area(24,04,24,06), "unlit")
des.region(selection.area(26,04,33,06), "lit")
des.region(selection.area(38,02,38,06), "unlit")
des.region(selection.area(43,04,50,06), "lit")
des.region(selection.area(52,04,52,06), "unlit")
des.region(selection.area(35,05,36,06), "unlit")
des.region(selection.area(40,05,41,06), "unlit")
des.region(selection.area(21,08,22,11), "unlit")
des.region(selection.area(24,08,33,11), "lit")
des.region(selection.area(35,08,41,11), "unlit")
des.region(selection.area(43,08,52,11), "lit")
des.region(selection.area(54,08,55,11), "unlit")
des.region(selection.area(24,13,24,15), "unlit")
des.region(selection.area(26,13,33,15), "unlit")
des.region(selection.area(35,13,36,14), "unlit")
des.region(selection.area(35,16,36,17), "unlit")
des.region(selection.area(38,13,38,17), "unlit")
des.region(selection.area(40,13,41,14), "unlit")
des.region(selection.area(40,16,41,17), "unlit")
des.region({ region={43,13, 50,15}, lit=0, type="temple", filled=2 })
des.region(selection.area(52,13,52,15), "unlit")
-- Stairs
des.stair("up", 38,10)
-- Non diggable walls
des.non_diggable(selection.area(00,00,75,19))
-- The altar of Huhetotl. Unattended.
des.altar({ x=50,y=14,align="chaos",type="altar" })
-- Objects
des.object({ id = "crystal ball", x=50, y=14,buc="blessed",spe=5,name="The Orb of Detection" })
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
des.object()
-- Random traps
des.trap()
des.trap()
des.trap()
des.trap()
des.trap()
des.trap()
des.trap("rolling boulder",46,14)
-- Random monsters.
des.monster("Minion of Huhetotl", 50, 14)
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("S")
des.monster("human mummy")
des.monster("human mummy")
des.monster("human mummy")
des.monster("human mummy")
des.monster("human mummy")
des.monster("human mummy")
des.monster("human mummy")
des.monster("human mummy")
des.monster("M")