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.
76 lines
1.0 KiB
Lua
76 lines
1.0 KiB
Lua
|
|
-- Test all of the special levels
|
|
|
|
local special_levels = {
|
|
"air",
|
|
"asmodeus",
|
|
"astral",
|
|
"baalz",
|
|
"bigrm-10",
|
|
"bigrm-1",
|
|
"bigrm-2",
|
|
"bigrm-3",
|
|
"bigrm-4",
|
|
"bigrm-5",
|
|
"bigrm-6",
|
|
"bigrm-7",
|
|
"bigrm-8",
|
|
"bigrm-9",
|
|
"castle",
|
|
"earth",
|
|
"fakewiz1",
|
|
"fakewiz2",
|
|
"fire",
|
|
"juiblex",
|
|
"knox",
|
|
"medusa-1",
|
|
"medusa-2",
|
|
"medusa-3",
|
|
"medusa-4",
|
|
"minefill",
|
|
"minend-1",
|
|
"minend-2",
|
|
"minend-3",
|
|
"minetn-1",
|
|
"minetn-2",
|
|
"minetn-3",
|
|
"minetn-4",
|
|
"minetn-5",
|
|
"minetn-6",
|
|
"minetn-7",
|
|
"oracle",
|
|
"orcus",
|
|
"sanctum",
|
|
"soko1-1",
|
|
"soko1-2",
|
|
"soko2-1",
|
|
"soko2-2",
|
|
"soko3-1",
|
|
"soko3-2",
|
|
"soko4-1",
|
|
"soko4-2",
|
|
"tower1",
|
|
"tower2",
|
|
"tower3",
|
|
"valley",
|
|
"water",
|
|
"wizard1",
|
|
"wizard2",
|
|
"wizard3"
|
|
}
|
|
|
|
local roles = { "Arc", "Bar", "Cav", "Hea", "Kni", "Mon", "Pri", "Ran", "Rog", "Sam", "Tou", "Val", "Wiz" }
|
|
local questlevs = { "fila", "filb", "goal", "loca", "strt" }
|
|
|
|
for _,role in ipairs(roles) do
|
|
for _,qlev in ipairs(questlevs) do
|
|
local lev = role .. "-" .. qlev
|
|
table.insert(special_levels, lev)
|
|
end
|
|
end
|
|
|
|
for _,lev in ipairs(special_levels) do
|
|
des.reset_level();
|
|
require(lev)
|
|
end
|