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.
This commit is contained in:
102
dat/water.lua
Normal file
102
dat/water.lua
Normal file
@@ -0,0 +1,102 @@
|
||||
-- NetHack 3.6 endgame.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1992,1993 by Izchak Miller, David Cohrs,
|
||||
-- and Timo Hakulinen
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor", "shortsighted")
|
||||
des.message("You find yourself suspended in an air bubble surrounded by water.")
|
||||
-- The player lands upon arrival to an air bubble
|
||||
-- within the leftmost third of the level. The
|
||||
-- portal to the next level is randomly located in an air
|
||||
-- bubble within the rightmost third of the level.
|
||||
-- Bubbles are generated by special code in mkmaze.c for now.
|
||||
des.map([[
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW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WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
]]);
|
||||
des.teleport_region({ region = {0,0,25,19} })
|
||||
des.levregion({ type="portal", region={51,0,75,19}, name="astral" })
|
||||
-- A fisherman's dream...
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("electric eel")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("kraken")
|
||||
des.monster("shark")
|
||||
des.monster("shark")
|
||||
des.monster("shark")
|
||||
des.monster("shark")
|
||||
des.monster("piranha")
|
||||
des.monster("piranha")
|
||||
des.monster("piranha")
|
||||
des.monster("piranha")
|
||||
des.monster("jellyfish")
|
||||
des.monster("jellyfish")
|
||||
des.monster("jellyfish")
|
||||
des.monster("jellyfish")
|
||||
des.monster(";")
|
||||
des.monster(";")
|
||||
des.monster(";")
|
||||
des.monster(";")
|
||||
-- These guys feel like home here
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
des.monster({ id = "water elemental", peaceful = 0 })
|
||||
|
||||
Reference in New Issue
Block a user