Files
nethack/dat/Val-goal.lua
PatR 554ebc0f4c temporary? fix for github issue #730 - stairs \
placed on lava spot on Valkyrie goal level

Reported by k2, arriving at the final level of the Valkyrie quest
can issue a recently added impossible
| mkstairs: placing stairs up on molten lava at <68,13>
The report said it was easy to reproduce, but it took me multiple
tries (so not hard to do, but not a sure thing on any given attempt).

The stairs on that level are placed at specific coordinates that
are outside the pre-mapped area, so there's no guarantee that their
spot will be suitable for stairs.  The underlying terrian changes
from lava to stair, but only after the warning about molten lava.

This hack solves that particular level but is not a general solution
for this type of thing.  When about to make stairs on a lava spot,
change that spot to normal floor first.  Plus 50:50 chance to change
each adjacent lava spot to floor too so that there's decent chance
for some elbow room upon arrival.

Also, turn the no-flip attribute off for that level so that 'fixed'
location of the stairs can occur in four different places.

Fixes #730
2022-04-14 10:50:23 -07:00

103 lines
3.3 KiB
Lua

-- NetHack 3.7 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991-2 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
--
des.level_init({ style = "solidfill", fg = "L" });
des.level_flags("mazelevel", "icedpools")
des.level_init({ style="mines", fg=".", bg="L", smoothed=true, joined=true, lit=1, walled=false })
des.map([[
xxxxxx.....................xxxxxxxx
xxxxx.......LLLLL.LLLLL......xxxxxx
xxxx......LLLLLLLLLLLLLLL......xxxx
xxxx.....LLL|---------|LLL.....xxxx
xxxx....LL|--.........--|LL.....xxx
x......LL|-...LLLLLLL...-|LL.....xx
.......LL|...LL.....LL...|LL......x
......LL|-..LL.......LL..-|LL......
......LL|.................|LL......
......LL|-..LL.......LL..-|LL......
.......LL|...LL.....LL...|LL.......
xx.....LL|-...LLLLLLL...-|LL......x
xxx.....LL|--.........--|LL.....xxx
xxxx.....LLL|---------|LLL...xxxxxx
xxxxx.....LLLLLLLLLLLLLLL...xxxxxxx
xxxxxx......LLLLL.LLLLL.....xxxxxxx
xxxxxxxxx..................xxxxxxxx
]]);
-- Dungeon Description
des.region(selection.area(00,00,34,16), "lit")
-- Stairs
-- Note: The up stairs are *intentionally* off of the map.
des.stair("up", 45,10)
-- Non diggable walls
des.non_diggable(selection.area(00,00,34,16))
-- Drawbridges; northern one opens from the south (portcullis) to further
-- north (lowered span), southern one from the north to further south
des.drawbridge({ x=17, y=02, dir="south", state="random" })
if percent(75) then
des.drawbridge({ x=17, y=14, dir="north", state="open" })
else
des.drawbridge({ x=17, y=14, dir="north", state="random" })
end
-- Objects
des.object({ id = "crystal ball", x=17, y=08, buc="blessed", spe=5, name="The Orb of Fate" })
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()
-- Traps
des.trap("board",13,08)
des.trap("board",21,08)
-- Random traps
des.trap("fire")
des.trap("fire")
des.trap("fire")
des.trap("fire")
des.trap("board")
des.trap()
des.trap()
-- Random monsters.
des.monster("Lord Surtur", 17, 08)
des.monster("fire ant")
des.monster("fire ant")
des.monster("fire ant")
des.monster("fire ant")
des.monster("a")
des.monster("a")
des.monster({ id = "fire giant", x=10, y=06, peaceful = 0 })
des.monster({ id = "fire giant", x=10, y=07, peaceful = 0 })
des.monster({ id = "fire giant", x=10, y=08, peaceful = 0 })
des.monster({ id = "fire giant", x=10, y=09, peaceful = 0 })
des.monster({ id = "fire giant", x=10, y=10, peaceful = 0 })
des.monster({ id = "fire giant", x=24, y=06, peaceful = 0 })
des.monster({ id = "fire giant", x=24, y=07, peaceful = 0 })
des.monster({ id = "fire giant", x=24, y=08, peaceful = 0 })
des.monster({ id = "fire giant", x=24, y=09, peaceful = 0 })
des.monster({ id = "fire giant", x=24, y=10, peaceful = 0 })
des.monster({ id = "fire giant", peaceful = 0 })
des.monster({ id = "fire giant", peaceful = 0 })
des.monster({ class = "H", peaceful = 0 })
--
-- The "fill" levels for the quest.
--
-- These levels are used to fill out any levels not occupied by specific
-- levels as defined above. "filla" is the upper filler, between the
-- start and locate levels, and "fillb" the lower between the locate
-- and goal levels.
--