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.
49 lines
1.9 KiB
Lua
49 lines
1.9 KiB
Lua
|
|
des.level_init({ style = "solidfill", fg = " " });
|
|
des.level_flags("mazelevel");
|
|
|
|
des.map([[
|
|
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}......................................................}}}}}}}}}}
|
|
}}}}}}}............................................................}}}}}}}
|
|
}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}}
|
|
}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}}
|
|
}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................}
|
|
}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................}
|
|
}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................}
|
|
}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}}
|
|
}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}}
|
|
}}}}}}}............................................................}}}}}}}
|
|
}}}}}}}}}}......................................................}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
|
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
|
]]);
|
|
|
|
-- Unlit, except 3 mapgrids around the "pupil"
|
|
des.region(selection.area(00,00,73,18),"unlit");
|
|
des.region(selection.area(26,04,47,14),"lit");
|
|
des.region(selection.area(21,05,51,13),"lit");
|
|
des.region(selection.area(19,06,54,12),"lit");
|
|
|
|
des.stair("up");
|
|
des.stair("down");
|
|
|
|
des.non_diggable();
|
|
|
|
for i = 1,15 do
|
|
des.object();
|
|
end
|
|
|
|
for i = 1,6 do
|
|
des.trap();
|
|
end
|
|
|
|
for i = 1,28 do
|
|
des.monster();
|
|
end
|