Game is playable, and should compile on linux and Windows. Assumes you have a lua 5.3 library available. Removes level compiler and associated files. Replaces special level des-files with lua scripts. Exposes some NetHack internals to lua: - des-table with commands to create special levels - nh-table with NetHack core commands - nhc-table with some constants - u-table with some player-specific data (u-struct) - selection userdata Adds some rudimentary tests. Adds new extended command #wizloadlua to run a specific script, and #wizloaddes to run a specific level-creation script. nhlib.lua is loaded for every lua script. Download and untar lua: mkdir lib cd lib curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz tar zxf lua-5.3.5.tar.gz Then make nethack normally.
86 lines
2.4 KiB
Lua
86 lines
2.4 KiB
Lua
-- NetHack 3.6 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 = " " });
|
|
|
|
des.level_flags("mazelevel", "hardfloor", "icedpools")
|
|
|
|
des.level_init({ style="mines", fg=".", bg="I", smoothed=true, joined=false, lit=1, walled=false })
|
|
|
|
des.map([[
|
|
PPPPxxxx xxxxPPPPPx
|
|
PLPxxx xPPLLLPP
|
|
PPP ....................... PPPLLP
|
|
xx ............................ PPPP
|
|
x ............................... xxxx
|
|
................................. xx
|
|
.................................... x
|
|
...................................
|
|
x .................................. x
|
|
xx .............................. PP
|
|
xPPP .......................... PLP
|
|
xPLLP xxPLLP
|
|
xPPPPxx xxxxPPPP
|
|
]]);
|
|
-- Dungeon Description
|
|
des.region(selection.area(00,00,39,12), "lit")
|
|
-- Stairs
|
|
des.stair("up", 48,14)
|
|
des.stair("down", 20,06)
|
|
-- Non diggable walls
|
|
des.non_diggable(selection.area(00,00,39,12))
|
|
-- Objects
|
|
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()
|
|
des.object()
|
|
-- Random traps
|
|
des.trap("fire")
|
|
des.trap("fire")
|
|
des.trap("fire")
|
|
des.trap("fire")
|
|
des.trap()
|
|
des.trap()
|
|
-- Random monsters.
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("fire ant")
|
|
des.monster("a")
|
|
des.monster({ class = "H", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ id = "fire giant", peaceful = 0 })
|
|
des.monster({ class = "H", peaceful = 0 })
|
|
|