Files
nethack/dat/fakewiz1.lua
Pasi Kallinen fd55d9118e Use lua for special level files
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.
2019-11-06 18:43:20 +02:00

36 lines
1.2 KiB
Lua

-- NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1992 by M. Stephenson and Izchak Miller
-- NetHack may be freely redistributed. See license for details.
--
des.level_init({ style="mazegrid", bg ="-" });
des.level_flags("mazelevel");
des.map([[
.........
.}}}}}}}.
.}}---}}.
.}--.--}.
.}|...|}.
.}--.--}.
.}}---}}.
.}}}}}}}.
]]);
des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="stair-up" })
des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="stair-down" })
des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="branch" });
des.teleport_region({ region={01,00,79,20}, region_islev=1,exclude={2,2,6,6} })
des.levregion({ region={4,4,4,4}, type="portal", name="wizard3" })
des.mazewalk(08,05,"east")
des.region({ region={04,03,06,06},lit=0,type="ordinary",prefilled=0,irregular=1 })
des.monster("L",04,04)
des.monster("vampire lord",03,04)
des.monster("kraken",06,06)
-- And to make things a little harder.
des.trap("board",04,03)
des.trap("board",04,05)
des.trap("board",03,04)
des.trap("board",05,04)