Files
nethack/dat/Wiz-fila.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

60 lines
1.5 KiB
Lua

-- NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $
-- Copyright (c) 1992 by David Cohrs
-- NetHack may be freely redistributed. See license for details.
--
--
des.room({ type = "ordinary",
contents = function()
des.stair("up")
des.object()
des.monster({ class = "i", peaceful=0 })
end
})
des.room({ type = "ordinary",
contents = function()
des.object()
des.object()
des.monster({ class = "i", peaceful=0 })
end
})
des.room({ type = "ordinary",
contents = function()
des.object()
des.trap()
des.object()
des.monster("vampire bat")
des.monster("vampire bat")
end
})
des.room({ type = "ordinary",
contents = function()
des.stair("down")
des.object()
des.trap()
des.monster({ class = "i", peaceful=0 })
des.monster("vampire bat")
end
})
des.room({ type = "ordinary",
contents = function()
des.object()
des.object()
des.trap()
des.monster({ class = "i", peaceful=0 })
end
})
des.room({ type = "ordinary",
contents = function()
des.object()
des.trap()
des.monster("vampire bat")
end
})
des.random_corridors()