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.
134 lines
4.8 KiB
Lua
134 lines
4.8 KiB
Lua
-- NetHack 3.6 mines.des $NHDT-Date: 1548631704 2019/01/27 23:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $
|
|
-- Copyright (c) 1989-95 by Jean-Christophe Collet
|
|
-- Copyright (c) 1991-95 by M. Stephenson
|
|
-- NetHack may be freely redistributed. See license for details.
|
|
--
|
|
-- Minetown variant 4 by Kelly Bailey
|
|
-- "College Town"
|
|
|
|
des.room({ type = "ordinary", lit=1, x=3,y=3,
|
|
xalign="center", yalign="center", w=30, h=15,
|
|
contents = function()
|
|
des.feature("fountain", 08,07)
|
|
des.feature("fountain", 18,07)
|
|
|
|
des.room({ type = "book shop", lit=1, x=4, y=2, w=3, h=3,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="south" })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary", x=8, y=2, w=2, h=2,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="south" })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "temple", lit=1, x=11, y=3, w=5, h=4,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="south" })
|
|
des.altar({ x=2,y=1,align=align[1], type="shrine" })
|
|
des.monster("gnomish wizard")
|
|
des.monster("gnomish wizard")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary", x=19, y=2, w=2, h=2,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="south" })
|
|
des.monster("G")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "candle shop", lit=1, x=22, y=2, w=3, h=3,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="south" })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary", x=26, y=2, w=2, h=2,
|
|
contents = function()
|
|
des.door({ state = "locked", wall="east" })
|
|
des.monster("G")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "tool shop", chance=90, lit=1, x=4,y=10, w=3,h=3,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="north" })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary", x=8, y=11, w=2, h=2,
|
|
contents = function()
|
|
des.door({ state = "locked", wall="south" })
|
|
des.monster("kobold shaman")
|
|
des.monster("kobold shaman")
|
|
des.monster("kitten")
|
|
des.monster("f")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "food shop", chance=90, lit=1, x=11, y=11, w=3, h=2,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="east" })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary", x=17, y=11, w=2, h=2,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="west" })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary", x=20, y=10, w=2, h=2,
|
|
contents = function()
|
|
des.door({ state = "locked", wall="north" })
|
|
des.monster("G")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "shop", chance=90, lit=1, x=23, y=10, w=3, h=3,
|
|
contents = function()
|
|
des.door({ state = "closed", wall="north" })
|
|
end
|
|
})
|
|
|
|
des.monster({ id = "watchman", peaceful = 1 })
|
|
des.monster({ id = "watchman", peaceful = 1 })
|
|
des.monster({ id = "watchman", peaceful = 1 })
|
|
des.monster({ id = "watchman", peaceful = 1 })
|
|
des.monster({ id = "watch captain", peaceful = 1 })
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary",
|
|
contents = function()
|
|
des.stair("up")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary",
|
|
contents = function()
|
|
des.stair("down")
|
|
des.trap()
|
|
des.monster("gnome")
|
|
des.monster("gnome")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary",
|
|
contents = function()
|
|
des.monster("dwarf")
|
|
end
|
|
})
|
|
|
|
des.room({ type = "ordinary",
|
|
contents = function()
|
|
des.trap()
|
|
des.monster("gnome")
|
|
end
|
|
})
|
|
|
|
des.random_corridors()
|