parent
5cedf96342
commit
6e2b9747b9
@ -1,64 +0,0 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: true
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AlwaysBreakAfterDefinitionReturnType: true
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BinPackParameters: true
|
||||
BinPackArguments: true
|
||||
ColumnLimit: 78
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
DerivePointerAlignment: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
IndentCaseLabels: false
|
||||
IndentWrappedFunctionNames: false
|
||||
IndentFunctionDeclarationAfterType: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 100
|
||||
PointerAlignment: Right
|
||||
SpacesBeforeTrailingComments: 1
|
||||
Cpp11BracedListStyle: false
|
||||
Standard: Cpp03
|
||||
IndentWidth: 4
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
BreakBeforeBraces: Linux
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
SpacesInAngles: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpaceAfterCStyleCast: true
|
||||
SpacesInContainerLiterals: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
ContinuationIndentWidth: 4
|
||||
CommentPragmas: '^ NetHack 3'
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
SpaceBeforeParens: ControlStatements
|
||||
DisableFormat: false
|
||||
...
|
@ -1,17 +0,0 @@
|
||||
*.[ch] NHSUBST
|
||||
*.cpp NHSUBST
|
||||
*.sh NHSUBST
|
||||
*.pl NHSUBST
|
||||
Porting NHSUBST
|
||||
README NHSUBST
|
||||
* text=auto
|
||||
*.hqx -text
|
||||
*.sln -text
|
||||
*.vcxproj -text
|
||||
*.doc !diff
|
||||
*.DOC !diff
|
||||
*.uu NH_header=no
|
||||
*.xpm NH_header=no
|
||||
.git* NH_header=no
|
||||
* NH_filestag=(file%s_in_top_directory)
|
||||
NetHack.dsw NH_filestag=(file%s_for_win32_that_are_moved_into_._at_compile_time)
|
@ -1,93 +0,0 @@
|
||||
# CVS default ignores begin
|
||||
tags
|
||||
TAGS
|
||||
.make.state
|
||||
.nse_depinfo
|
||||
*~
|
||||
\#*
|
||||
.#*
|
||||
,*
|
||||
_$*
|
||||
*$
|
||||
*.old
|
||||
*.bak
|
||||
*.BAK
|
||||
*.orig
|
||||
*.rej
|
||||
.del-*
|
||||
*.a
|
||||
*.olb
|
||||
*.o
|
||||
*.obj
|
||||
*.so
|
||||
*.exe
|
||||
*.Z
|
||||
*.elc
|
||||
*.ln
|
||||
core
|
||||
# CVS default ignores end
|
||||
.*.swp
|
||||
|
||||
# We generate makefiles by shell script
|
||||
Makefile
|
||||
|
||||
# Win32-specific ignores
|
||||
Debug/
|
||||
Release/
|
||||
binary/
|
||||
build/
|
||||
ipch/
|
||||
lib/*
|
||||
Nethack.sln
|
||||
Nethack.sdf
|
||||
Nethack.opensdf
|
||||
Makefile.bcc
|
||||
Makefile.gcc
|
||||
Makefile-orig
|
||||
Makefile.bcc-orig
|
||||
Makefile.gcc-orig
|
||||
*.suo
|
||||
*.pdb
|
||||
*.ilk
|
||||
# VS2013 extension to auto-whine about questionable code generates these
|
||||
*.lastcodeanalysissucceeded
|
||||
# VS 2017 caches data into the hidden directory .vs
|
||||
.vs
|
||||
# Win32-specific ignores end
|
||||
.DS_Store
|
||||
# ms-dos
|
||||
# resulting zip
|
||||
NH*DOS.ZIP
|
||||
# 8.3 versions
|
||||
dat/data.bas
|
||||
sys/share/posixreg.c
|
||||
include/patchlev.h
|
||||
doc/guidebk.txt
|
||||
# folders compiler, target objs, binary results
|
||||
djgpp/
|
||||
src/msdos_o/
|
||||
msdos-binary/
|
||||
dat/NHTILES.BMP
|
||||
dat/msdoshlp.txt
|
||||
src/host_o/
|
||||
util/djgpp-linux64-gcc550.tar.bz2
|
||||
util/djgpp-osx-gcc550.tar.bz2
|
||||
util/djgpp-mingw-gcc550-standalone.zip
|
||||
util/dlb_main
|
||||
util/thintile
|
||||
util/til2bin2
|
||||
util/tile2bin
|
||||
win/share/monthin.txt
|
||||
win/share/objthin.txt
|
||||
win/share/oththin.txt
|
||||
# end of ms-dos
|
||||
|
||||
#libnethack
|
||||
targets/*
|
||||
bundle/*
|
||||
#test.js
|
||||
#sys/lib/npm-package/build/nethack.js
|
||||
#sys/lib/npm-package/build/nethack.wasm
|
||||
*.user
|
||||
util/*.lib
|
||||
util/*.exp
|
@ -1,9 +0,0 @@
|
||||
[submodule "submodules/lua"]
|
||||
path = submodules/lua
|
||||
url = https://github.com/lua/lua.git
|
||||
[submodule "submodules/pdcurses"]
|
||||
path = submodules/pdcurses
|
||||
url = https://github.com/wmcbrine/PDCurses.git
|
||||
[submodule "submodules/pdcursesmod"]
|
||||
path = submodules/pdcursesmod
|
||||
url = https://github.com/Bill-Gray/PDCursesMod.git
|
@ -1,696 +0,0 @@
|
||||
Cross-compiling NetHack 3.7 Last edit: February 18, 2023
|
||||
|
||||
The NetHack 3.7 build process differs from the build process of previous
|
||||
versions in some important ways. Those differences make it possible to use
|
||||
a cross-compiler running on one platform (the "host" platform of the build)
|
||||
to produce a binary NetHack package that can execute on an entirely different
|
||||
platform.
|
||||
|
||||
Part A Contents:
|
||||
A1. Why cross-compile?
|
||||
A2. Building NetHack 3.6 (before)
|
||||
A3. Building NetHack 3.7 (going forward)
|
||||
A4. How was the build procedure reduced to 5 steps?
|
||||
A5. How can I help with the cross-compiling initiative?
|
||||
|
||||
Part B Contents:
|
||||
B1. Two sets of compiles and procedures
|
||||
B2. What needs to be built and executed on the HOST?
|
||||
B3. What needs to be built for the TARGET?
|
||||
B4. Case sample: msdos
|
||||
B5. Case sample: amiga (started but incomplete)
|
||||
B6. Case sample: Web Assembly, libnh
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Part A - Cross-compiling NetHack
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
+--------------------------+
|
||||
| A1. Why cross-compile? |
|
||||
+--------------------------+
|
||||
|
||||
By using cross-compilers on host platforms with fast processors, plenty of RAM
|
||||
and storage resources, and an available cross-compiler, it may be possible to
|
||||
keep or resurrect a working version of NetHack on platforms that are now too
|
||||
constrained to carry out the build process natively on the platform anymore.
|
||||
|
||||
Some of the constraints in carrying out a native build on the desired target
|
||||
may include, but not necessarily be limited to, any of the following:
|
||||
|
||||
o Access: Somebody with a working knowledge of the NetHack build process may
|
||||
not have the desired target build platform available to them. Conversely,
|
||||
somebody with a keen knowledge of the target platform, and access to it,
|
||||
may not be all that familiar with the NetHack build process.
|
||||
|
||||
o Resources: Address space limitations, insufficient RAM, low amounts of disk
|
||||
storage, slow processor performance, may impede the ability to execute the
|
||||
compile process on the target platform.
|
||||
|
||||
o Compilers: Some of the native compilers on historical platforms may only
|
||||
support the dialect of C that was popular when the platform and compiler
|
||||
were in their prime.
|
||||
|
||||
Another useful potential result of cross-compiling, is that it paves the way
|
||||
for carrying out test and production builds of NetHack for multiple target
|
||||
platforms through automated steps carried out on the host platform(s).
|
||||
|
||||
|
||||
+-------------------------------------+
|
||||
| A2. Building NetHack 3.6 (before) |
|
||||
+-------------------------------------+
|
||||
|
||||
Very generally, the build of NetHack in past versions required the following
|
||||
steps to be carried out:
|
||||
|
||||
1. Compile and link util/makedefs.
|
||||
2. Run makedefs repeatedly with different command line options to produce
|
||||
several output files that are required for:
|
||||
(a) additional build steps to follow, including some header
|
||||
files: pm.h, onames.h, date.h.
|
||||
(b) creation of files, containing information required by,
|
||||
or about the game during its execution, that are stored in a
|
||||
portable, platform-independent way, that need to be inserted
|
||||
into the game package.
|
||||
(c) creation of files containing information required by, or about
|
||||
the game during its execution, that are stored in an architecture
|
||||
and/or platform and/or operating system dependent way, that need
|
||||
to be inserted into the game package (the quest text format is
|
||||
one example).
|
||||
3. Compile and link the level compiler. This step needs to execute
|
||||
work-alike tools to lex and yacc, or needs to build pre-built lex and
|
||||
yacc output (.c, .h files) that are provided in the sys/share part of
|
||||
the NetHack source code tree.
|
||||
4. Execute the level compiler to read dat/*.des files and create
|
||||
a set of binary output files that are architecture and/or operating
|
||||
system dependent on the build platform, for use by the game during
|
||||
its execution.
|
||||
5. Compile and link the dungeon compiler. Like the level compiler, this
|
||||
step needs to execute work-alike tools to lex and yacc, or needs to
|
||||
build pre-built lex and yacc output (.c, .h files) that are provided
|
||||
in the sys/share part of the NetHack source code tree.
|
||||
6. Execute the dungeon compiler to read dat/dungeon.def and create
|
||||
a set of binary output files that are architecture and/or operating
|
||||
system dependent on the build platform, for use by the game during
|
||||
its execution.
|
||||
7. Compile and link several less critical utilities such as uudecode,
|
||||
tile-generation utilities, and so forth, all of which need to execute
|
||||
on the build platform during the build process to produce output files
|
||||
for use during the game, that are reasonably portable (not architecture
|
||||
and/or operating system dependent; only the output of the utilities
|
||||
becomes part of the game package, not the executable utilities
|
||||
themselves.
|
||||
8. Compile and link the game itself.
|
||||
9. Package the game and its required files including the output from
|
||||
previous steps 2b, 2c, 4, 6, 7 and 8 above.
|
||||
|
||||
Steps 1, 2a, 2b, 7, and 9 above are not impediments to cross-compiling NetHack.
|
||||
|
||||
Steps 2c, 3, 4, 5, 6 and 8 above are impediments to cross-compiling NetHack.
|
||||
|
||||
That's because the files that those steps produce are very much tied to the
|
||||
platform where the build of NetHack is being carried out. Variations between
|
||||
platforms (such as 32-bit vs 64-bit, integer sizes, pointer sizes, processor
|
||||
byte order, data alignment requirements, struct padding and the way bitfields
|
||||
are stored) impact the portability of those data files between different
|
||||
platforms and operating systems. If all those things happen to match, the files
|
||||
might, just might, be usable across platforms, but the chances are against it,
|
||||
and that certainly cannot be counted on.
|
||||
|
||||
+------------------------------------------+
|
||||
| A3. Building NetHack 3.7 (going forward) |
|
||||
+------------------------------------------+
|
||||
|
||||
Again, very generally, the build of NetHack in 3.7 requires the following
|
||||
steps to be carried out:
|
||||
|
||||
1. Compile and link util/makedefs.
|
||||
2. Run makedefs repeatedly with different command line options to produce
|
||||
several required output files that contain information required by the
|
||||
game, or contain information about the game during its execution, that
|
||||
are stored in a portable, platform-independent way, that need to be
|
||||
inserted into the game package (makedefs -d, -o, -r, -h, -s).
|
||||
3. Compile and link several less critical utilities such as uudecode,
|
||||
tile-generation utilities, and so forth, all of which need to execute
|
||||
on the build platform during the build process to produce output files
|
||||
for use during the game, that are reasonably portable (not architecture
|
||||
and/or operating system dependent; only the output of the utilities
|
||||
becomes part of the game package, not the executable utilities
|
||||
themselves.
|
||||
4. Compile and link the game components for the TARGET; that includes
|
||||
NetHack itself, Lua, and any optional regular-expression or window port
|
||||
libraries that you plan to link into the NetHack game executable.
|
||||
5. Package the game and its required files including the output from
|
||||
previous steps 2, 3 and 4 above.
|
||||
|
||||
Step 4 is now the only impediment to cross-compiling NetHack. That impediment
|
||||
is resolved by executing step 4 using a cross-compiler that runs on the build (host)
|
||||
platform to produce a resulting binary for the target platform, instead of
|
||||
executing the native compiler.
|
||||
|
||||
+-----------------------------------------------------+
|
||||
| A4. How was the build procedure reduced to 5 steps? |
|
||||
+-----------------------------------------------------+
|
||||
|
||||
The following are among several design changes planned in NetHack 3.7,
|
||||
and these specific changes are what altered the build process to make
|
||||
cross-compiling possible:
|
||||
|
||||
o There is no creation of platform-dependent files, such as the quest
|
||||
text files, by makedefs during the build process. Instead, the quest
|
||||
text files have been converted to Lua and are inserted into the game
|
||||
package for processing by the embedded Lua during execution of NetHack.
|
||||
|
||||
o There is no build-time level compiler involved. Instead, the level
|
||||
descriptions have been converted to Lua and are inserted into the game
|
||||
package for processing by the embedded Lua during execution of NetHack.
|
||||
|
||||
o There is no build-time dungeon compiler involved. Instead, the dungeon
|
||||
description has been converted to Lua and is inserted into the game
|
||||
package for processing by the embedded Lua during execution of NetHack.
|
||||
|
||||
o Some of the build and option information that was formerly produced
|
||||
during build time by makedefs, and contained information about the
|
||||
build-platform specifically, is now produced at runtime within the
|
||||
game under a cross-compiled build. As such, it now produces information
|
||||
applicable to the target NetHack environment, not the build environment.
|
||||
|
||||
+------------------------------------------------------------+
|
||||
| A5. How can I help with the cross-compiling initiative? |
|
||||
+------------------------------------------------------------+
|
||||
|
||||
o If you have a favourite target platform (let's call it XX-Platform for
|
||||
example purposes) that you'd like to see NetHack be able to run on, do
|
||||
some research to find out if a cross-compiler exists that:
|
||||
- produces output for XX-Platform.
|
||||
- executes on a platform that you use and love (Linux, Windows,
|
||||
macOS are some examples of platforms that have cross-compilers
|
||||
for other targets available)
|
||||
|
||||
o Then, make the community, devteam, and others aware that you're starting
|
||||
a cross-compile of NetHack for XX-Platform. You might need to ask some
|
||||
"starting out" questions initially, and as you get deeper into it, you
|
||||
might need to ask some tougher questions.
|
||||
|
||||
o Perhaps consider forking from NetHack on GitHub, and do the
|
||||
cross-compiler work there in your fork. Strive to get it to a point where
|
||||
it's ready to play-test on XX-Platform, or perhaps even use an emulator
|
||||
of XX-Platform if one is available. We live in a time where plenty do.
|
||||
|
||||
Doing your work on a GitHub fork has the following advantages:
|
||||
- It will make it really simple to integrate your work back into
|
||||
the NetHack source tree if that's one of your goals.
|
||||
- It will make it possible and straightforward to merge upstream
|
||||
NetHack changes into your work for the XX-Platform cross-compile
|
||||
so that it stays current with the game as it evolves.
|
||||
- You may get help from others in the form of suggestions, or
|
||||
pull-requests, or offers to join the development. Chances are,
|
||||
you aren't the only person out there that would like to
|
||||
establish/resurrect/maintain NetHack on XX-Platform.
|
||||
|
||||
Have fun!
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Part B - Cross-compiling details
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Part B Contents:
|
||||
B1. Two sets of compiles and procedures
|
||||
B2. What needs to be built and executed on the HOST?
|
||||
B3. What needs to be built for the TARGET?
|
||||
B4. Case sample: msdos
|
||||
|
||||
+-----------------------------------------+
|
||||
| B1. Two sets of compiles and procedures |
|
||||
+-----------------------------------------+
|
||||
|
||||
The HOST is the platform/place that you're running the build procedures using
|
||||
the native compiler/linker, and the cross-compiler/linker that runs on the HOST
|
||||
to build the game for a TARGET platform.
|
||||
|
||||
You have to:
|
||||
1. Build mandatory utilities on the HOST.
|
||||
2. Execute the mandatory utilities to generate components that will be used
|
||||
during step 4 to build the game itself, or that will generate components
|
||||
that will become part of the TARGET game package.
|
||||
3. Build optional or enhancing utilities on the HOST, execute those
|
||||
optional or enhancing utilities on the HOST to generate components that
|
||||
will become part of the TARGET game package.
|
||||
4. Execute a supported cross-compiler to compile the rest of the game
|
||||
components like NetHack, Lua, and any optional libraries (the word
|
||||
"supported", in this sense, means a compiler that runs on your HOST
|
||||
build platform, and generates output executable files for the TARGET
|
||||
platform).
|
||||
|
||||
It should be mentioned that you can execute the cross-compile build approach
|
||||
to generate binaries for the same platform as the host, where the HOST
|
||||
compiler and the TARGET compiler are the same.
|
||||
|
||||
|
||||
+------------------------------------------------------+
|
||||
| B2. What needs to be built and executed on the HOST? |
|
||||
+------------------------------------------------------+
|
||||
|
||||
On the HOST, here are the mandatory things that have to be built.
|
||||
|
||||
a) Using the HOST native compiler, build HOST native utility makedefs
|
||||
|
||||
Compile and link the following with these compiler switches:
|
||||
-DCROSSCOMPILE
|
||||
from sources: util/makedefs.c, src/mdlib.c, src/monst.c, src/objects.c
|
||||
src/date.c, src/alloc.c
|
||||
|
||||
b) Execute HOST native makedefs utility, util/makedefs, as follows:
|
||||
Required for complete packaging of the game, but not the C source
|
||||
game compile:
|
||||
util/makedefs -d
|
||||
util/makedefs -r
|
||||
util/makedefs -h
|
||||
util/makedefs -s
|
||||
|
||||
c) Using the HOST native compiler, build these additional utilities if your
|
||||
target platform requires components that they produce. It is important
|
||||
to note that all of the required source files need to be compiled to
|
||||
native obj files for linking into the HOST-side utility. Some of the
|
||||
source files (src/monst.c, src/objects.c) were likely already compiled
|
||||
as native HOST-side obj files in order to build the native HOST utility
|
||||
'makedefs' HOST utility above, and you don't need to compile them again
|
||||
for use in linking other HOST utilities if the HOST-native obj files
|
||||
produced from them are still around.
|
||||
|
||||
NOTE: There are some source files that need to be compiled for linking
|
||||
into utilities that are needed on the HOST side, but that are also
|
||||
needed again later as TARGET obj files for linking into the TARGET
|
||||
executable, and therefore must be compiled twice.
|
||||
They include: src/drawing.c, src/objects.c, src/monst.c,
|
||||
src/alloc.c, util/panic.c. It is important to keep the compiled
|
||||
HOST-side obj files produced by the HOST native compiler distinct from
|
||||
the TARGET-side obj files produced by the cross-compiler. That can be
|
||||
accomplished either by naming the generated object files a little
|
||||
differently (perhaps with a suffix) between the HOST-side and the
|
||||
TARGET-side, or by placing the HOST-side obj files and the TARGET-side
|
||||
obj files into distinct, different directories during the build process.
|
||||
Use whatever method works best for your cross-compile effort and tools.
|
||||
|
||||
util/dlb
|
||||
|
||||
from sources: src/dlb.c, src/dlb_main.c, src/alloc.c,
|
||||
util/panic.c
|
||||
purpose: For packaging up many files that are
|
||||
required components of the TARGET game
|
||||
into a single nhdat or nhdat370 combined
|
||||
file
|
||||
|
||||
util/uudecode
|
||||
|
||||
from sources: sys/share/uudecode.c
|
||||
purpose: convert some binary files, that are
|
||||
distributed in the NetHack sources in
|
||||
uuencoded format, back into their
|
||||
original binary state
|
||||
util/tilemap
|
||||
|
||||
from sources: win/share/tilemap.c
|
||||
purpose: produce output file src/tile.c that is
|
||||
required for building TARGET packages with
|
||||
tile support
|
||||
|
||||
util/tile2bmp
|
||||
|
||||
from sources: win/share/tile2bmp.c, win/share/tiletext.c,
|
||||
win/share/tilemap.c, src/drawing.c,
|
||||
src/monst.c, src/objects.c
|
||||
purpose: Read win/share/monsters.txt,
|
||||
win/share/objects.txt and win/share/other.txt
|
||||
files and produce a .bmp file.
|
||||
|
||||
util/gif2txt
|
||||
|
||||
from sources: win/share/gifread.c, win/share/tiletext.c,
|
||||
win/share/tilemap.c, src/drawing.c,
|
||||
src/monst.c, src/objects.c,
|
||||
src/alloc.c, util/panic.c
|
||||
purpose: Read win/share/monsters.txt,
|
||||
win/share/objects.txt and win/share/other.txt
|
||||
files and produce a .gif file.
|
||||
|
||||
util/ppmwrite
|
||||
|
||||
from sources: win/share/ppmwrite.c, win/share/tiletext.c,
|
||||
win/share/tilemap.c, src/drawing.c,
|
||||
src/monst.c, src/objects.c,
|
||||
src/alloc.c, util/panic.c
|
||||
purpose: Read win/share/monsters.txt,
|
||||
win/share/objects.txt and win/share/other.txt
|
||||
files and produce a .ppm file.
|
||||
|
||||
|
||||
+--------------------------------------------+
|
||||
| B3. What needs to be built for the TARGET? |
|
||||
+--------------------------------------------+
|
||||
|
||||
|
||||
For the TARGET side, here are the mandatory things that have to be built via
|
||||
the HOST-executed cross-compiler that generates code for the TARGET platform.
|
||||
|
||||
Using the cross-compiler, build the following targets:
|
||||
|
||||
a) NetHack sources (core is mandatory)
|
||||
|
||||
With the cross-compiler and linker for the TARGET platform,
|
||||
cross-compile and link with these compiler switches:
|
||||
-DCROSSCOMPILE and -DCROSSCOMPILE_TARGET
|
||||
|
||||
core sources (2019): src/allmain.c, src/alloc.c, src/apply.c,
|
||||
src/artifact.c, src/attrib.c, src/ball.c,
|
||||
src/bones.c, src/botl.c, src/cmd.c, src/dbridge.c,
|
||||
src/decl.c, src/detect.c, src/dig.c, src/display.c,
|
||||
src/dlb.c, src/do.c, src/do_name.c, src/do_wear.c,
|
||||
src/dog.c, src/dogmove.c, src/dokick.c,
|
||||
src/dothrow.c, src/drawing.c, src/dungeon.c,
|
||||
src/eat.c, src/end.c, src/engrave.c, src/exper.c,
|
||||
src/explode.c, src/extralev.c, src/files.c,
|
||||
src/fountain.c, src/hack.c, src/hacklib.c,
|
||||
src/insight.c, src/invent.c, src/isaac64.c,
|
||||
src/light.c, src/lock.c, src/mail.c,
|
||||
src/makemon.c, src/mcastu.c,
|
||||
src/mdlib.c, src/mhitm.c, src/mhitu.c, src/minion.c,
|
||||
src/mklev.c, src/mkmap.c, src/mkmaze.c, src/mkobj.c,
|
||||
src/mkroom.c, src/mon.c, src/mondata.c,
|
||||
src/monmove.c, src/monst.c, src/mplayer.c,
|
||||
src/mthrowu.c, src/muse.c, src/music.c,
|
||||
src/nhlsel.c, src/nhlua.c, src/nhlobj.c,
|
||||
src/o_init.c, src/objects.c, src/objnam.c,
|
||||
src/options.c, src/pager.c, src/pickup.c,
|
||||
src/pline.c, src/polyself.c, src/potion.c,
|
||||
src/pray.c, src/priest.c, src/quest.c,
|
||||
src/questpgr.c, src/read.c, src/rect.c,
|
||||
src/region.c, src/restore.c, src/rip.c, src/rnd.c,
|
||||
src/role.c, src/rumors.c, src/save.c, src/sfstruct.c,
|
||||
src/shk.c, src/shknam.c, src/sit.c, src/sounds.c,
|
||||
src/sp_lev.c, src/spell.c, src/steal.c, src/steed.c,
|
||||
src/symbols.c, src/sys.c, src/teleport.c,
|
||||
src/timeout.c, src/topten.c, src/track.c,
|
||||
src/trap.c, src/u_init.c, src/uhitm.c, src/vault.c,
|
||||
src/version.c, src/vision.c,
|
||||
src/weapon.c, src/were.c, src/wield.c, src/windows.c,
|
||||
src/wizard.c, src/worm.c, src/worn.c, src/write.c,
|
||||
src/zap.c, sys/share/cppregex.cpp
|
||||
|
||||
tty sources: win/tty/getline.c, win/tty/termcap.c,
|
||||
win/tty/topl.c, win/tty/wintty.c
|
||||
|
||||
generated (if req'd):
|
||||
src/tile.c
|
||||
|
||||
plus your platform-specific source files that contain main, typically
|
||||
*main.c, and unix support in *unix.c, tty support in *tty.c, and other
|
||||
system support in *sys.c as well as others sources pertaining to your
|
||||
specific target platform(s).
|
||||
|
||||
b) Lua (mandatory in 3.7)
|
||||
|
||||
lib/lua-5.4.6/src
|
||||
|
||||
from sources: lua.c, lapi.c, lauxlib.c, lbaselib.c, lcode.c,
|
||||
lcorolib.c, lctype.c, ldblib.c, ldebug.c,
|
||||
ldo.c, ldump.c, lfunc.c, lgc.c, linit.c,
|
||||
liolib.c, llex.c, lmathlib.c, lmem.c,
|
||||
loadlib.c, lobject.c, lopcodes.c,
|
||||
loslib.c, lparser.c, lstate.c, lstring.c,
|
||||
lstrlib.c, ltable.c, ltablib.c, ltm.c,
|
||||
lundump.c, lutf8lib.c, lvm.c, lzio.c,
|
||||
lbitlib.c
|
||||
purpose: links into the game executable to interpret
|
||||
lua level description files, lua dungeon
|
||||
description files, and a lua quest text file.
|
||||
|
||||
d) recover (optional if desired/required; some targets have recover
|
||||
functionality built into NetHack itself)
|
||||
|
||||
c) Additional optional library packages/obj files as required
|
||||
|
||||
lib/pdcurses/...
|
||||
or lib/pdcursesmod/...
|
||||
|
||||
from sources: addch.c, addchstr.c, addstr.c, attr.c, beep.c,
|
||||
bkgd.c, border.c, clear.c, color.c, delch.c,
|
||||
deleteln.c, getch.c, getstr.c, getyx.c,
|
||||
inch.c, inchstr.c, initscr.c, inopts.c,
|
||||
insch.c, insstr.c, instr.c, kernel.c,
|
||||
keyname.c, mouse.c, move.c, outopts.c,
|
||||
overlay.c, pad.c, panel.c, printw.c,
|
||||
refresh.c, scanw.c, scr_dump.c, scroll.c,
|
||||
slk.c, termattr.c, touch.c, util.c, window.c,
|
||||
debug.c, pdcclip.c, pdcdisp.c, pdcgetsc.c,
|
||||
pdckbd.c, pdcutil.c
|
||||
purpose: underlying curses platform support for some
|
||||
target platforms where inclusion of the
|
||||
NetHack curses window port in win/curses is
|
||||
desired
|
||||
|
||||
+-------------------------+
|
||||
| B4. Case sample: msdos |
|
||||
+-------------------------+
|
||||
|
||||
Cross-compiler used: Andrew Wu's djgpp cross-compiler
|
||||
Cross-compiler url: https://github.com/andrewwutw/build-djgpp
|
||||
Cross-compiler pre-built binary downloads:
|
||||
https://github.com/andrewwutw/build-djgpp/releases
|
||||
|
||||
Cross-compiler bits tested:
|
||||
https://github.com/andrewwutw/build-djgpp
|
||||
and the pre-built binary for your platform from:
|
||||
https://github.com/andrewwutw/build-djgpp/releases
|
||||
and a DOS-extender (for including in msdos packaging) from
|
||||
http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip
|
||||
and pdcurses from:
|
||||
https://github.com/wmcbrine/PDCurses.git
|
||||
or pdcursesmod from:
|
||||
https://github.com/Bill-Gray/PDCursesMod.git
|
||||
|
||||
- A shell script to download that djgpp cross-compiler and associated
|
||||
pieces for either linux or macOS is available:
|
||||
|
||||
sh sys/msdos/fetch-cross-compiler.sh
|
||||
|
||||
That script won't install anything, it just does file fetches and stores
|
||||
them in subfolders of lib. The linux.370 and macOS.370 hints files are
|
||||
configured to find the cross-compiler there if you add
|
||||
CROSS_TO_MSDOS=1
|
||||
on your make command line.
|
||||
|
||||
Note: Both the fetch-cross-compiler.sh script and and the msdos
|
||||
cross-compile and package procedures require unzip and zip to be available
|
||||
on your host build system.
|
||||
|
||||
On your linux host:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/linux.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
On your macOS host:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/macOS.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
The MSDOS cross-compile can then be carried out by specifying
|
||||
CROSS_TO_MSDOS=1 on the make command line:
|
||||
|
||||
make CROSS_TO_MSDOS=1 all
|
||||
make CROSS_TO_MSDOS=1 package
|
||||
|
||||
You can explicitly include tty and curses support if desired. The default
|
||||
you'll end up with is a tty-only cross-compile build:
|
||||
|
||||
make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 package
|
||||
|
||||
Result: The "make package" target will bundle all of the necessary
|
||||
components to run NetHack on msdos into a folder:
|
||||
targets/msdos/pkg
|
||||
and then it zips the contents of that folder into:
|
||||
targets/msdos/nh370dos.zip
|
||||
|
||||
Also note that building the msdos targets using the make command
|
||||
above, does not preclude you from building local linux or macOS
|
||||
targets as well. Just drop the CROSS_TO_MSDOS=1 from the make
|
||||
command line. That's because the cross-compiler hints additions are
|
||||
enclosed inside ifdef sections and won't interfere with the
|
||||
non-cross-compile build in that case.
|
||||
|
||||
+-------------------------+
|
||||
| B5. Case sample: amiga |
|
||||
+-------------------------+
|
||||
|
||||
Disclaimer: This is a minimal recipe, just to help someone else get
|
||||
started if they have a desire to get a full cross-compile of
|
||||
NetHack going for the Amiga.
|
||||
See CAVEATS below.
|
||||
|
||||
Cross-compiler used: bebbo's amiga-gcc
|
||||
Cross-compiler url: https://github.com/bebbo/amiga-gcc
|
||||
|
||||
To our knowledge, a pre-built copy of the cross-compiler isn't available,
|
||||
so you will likely have to obtain the cross-compiler sources via git and
|
||||
build it on your system.
|
||||
|
||||
The build prerequisite packages for building the compiler on Ubuntu can be
|
||||
easily obtained:
|
||||
|
||||
sudo apt install make wget git gcc g++ lhasa libgmp-dev \
|
||||
libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev \
|
||||
autoconf rsync
|
||||
|
||||
The build prerequisite packages for macOS via homebrew are documented but
|
||||
not tested by us any of us to date.
|
||||
|
||||
brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
|
||||
texinfo gcc make autoconf
|
||||
|
||||
After installing the prerequite packages and the cross-compiler
|
||||
it was a straightforward build:
|
||||
|
||||
git clone https://github.com/bebbo/amiga-gcc.git
|
||||
cd amiga-gcc
|
||||
make update
|
||||
|
||||
[Note that you may have to take ownership of the files in the bebbo
|
||||
repo via chown before succesfully carrying out the next steps]
|
||||
|
||||
make clean
|
||||
make clean-prefix
|
||||
date; make all -j3 >&b.log; date
|
||||
|
||||
The compiler pieces are installed in /opt/amiga by default. If you prefer,
|
||||
you can alter the prefix before you build if you want. The instructions
|
||||
for doing so were spelled out at the time of this writing at:
|
||||
|
||||
https://github.com/bebbo/amiga-gcc
|
||||
|
||||
On your linux host:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/linux.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
On your macOS host:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/macOS.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
The Amiga cross-compile can then be carried out by specifying
|
||||
CROSS_TO_AMIGA=1 on the make command line:
|
||||
|
||||
make CROSS_TO_AMIGA=1 all
|
||||
make CROSS_TO_AMIGA=1 package
|
||||
|
||||
You can explicitly include tty and curses support if desired, otherwise
|
||||
you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
|
||||
support has not been tested.
|
||||
|
||||
make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_AMIGA=1 all
|
||||
|
||||
Result: The "make package" target will bundle the (hopefully) necessary
|
||||
components to run NetHack on msdos into a folder:
|
||||
targets/amiga/pkg
|
||||
and then it zips the contents of that folder into:
|
||||
targets/amiga/nh370ami.zip
|
||||
|
||||
Also note that building the amiga targets using the make command
|
||||
above, does not preclude you from building local linux or macOS
|
||||
targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
|
||||
command line.
|
||||
|
||||
The cross-compiler hints additions are enclosed inside ifdef sections
|
||||
and won't interfere with the non-cross-compile build in that case.
|
||||
|
||||
CAVEATS: The original NetHack Amiga build steps included the source for
|
||||
some utilities that were built and executed on the amiga:
|
||||
txt2iff and xpm2iff
|
||||
as part of the NetHack build procedure on amiga.
|
||||
Those did not compile out-of-the-box on the linux host. They
|
||||
will either have to be:
|
||||
- ported to build and run on the linux or macOS cross-compile
|
||||
host
|
||||
or
|
||||
|
||||
- their functionality will have to be rolled into amiga NetHack
|
||||
itself and executed on the target Amiga the first time the game
|
||||
is run, perhaps.
|
||||
|
||||
If you make headway, or are successful getting a working copy of
|
||||
NetHack going on the amiga, drop us a note at devteam@nethack.org.
|
||||
|
||||
+--------------------------------+
|
||||
| B6. Case sample: Web Assembly |
|
||||
+--------------------------------+
|
||||
|
||||
Credit: The initial Web Assembly cross compile was found in a pull request:
|
||||
https://github.com/NetHack/NetHack/pull/385
|
||||
by apowers313. The pull request was merged with some accompanying
|
||||
NetHack source tree integration changes in early October 2020.
|
||||
|
||||
Cross-compiler used: emscripten
|
||||
Cross-compiler url: https://emscripten.org/docs/getting_started/downloads.html
|
||||
|
||||
Here's a brief guide to obtaining the cross-compiler sources via git and
|
||||
building it on your system.
|
||||
|
||||
For Ubuntu, the build prerequisite packages for building the compiler can
|
||||
be easily obtained:
|
||||
|
||||
sudo apt-get install python3 cmake default-jre
|
||||
|
||||
For macOS, you will need to install Xcode, git, cmake, Python 3.5 or new
|
||||
(at time of this writing).
|
||||
|
||||
After installing the prerequite packages above, obtain the cross-compiler
|
||||
via git and build it from the directory of your choice using steps similar
|
||||
to these:
|
||||
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
cd emsdk
|
||||
git pull
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
source ./emsdk_env.sh
|
||||
|
||||
The steps above reflect what was outlined at this url at the time
|
||||
of writing:
|
||||
|
||||
https://emscripten.org/docs/getting_started/downloads.html
|
||||
|
||||
That is the definitive source and trumps anything documented here.
|
||||
|
||||
On your linux host, prepare to cross-compile NetHack as follows:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/linux.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
On your macOS host, prepare to cross-compile NetHack as follows:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/macOS.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
Then, cross-compile to targets/wasm as follows:
|
||||
|
||||
make CROSS_TO_WASM=1
|
||||
|
||||
You can build src/libnh.a from pull request 385 as follows:
|
||||
|
||||
make WANT_LIBNH=1
|
||||
|
||||
Do not add any additional windowport interfaces to your build
|
||||
(such as WANT_WIN_TTY=1 WANT_WIN_CURSES=1 WANT_WIN_X11=1 or
|
||||
WANT_WIN_QT=1) as those aren't applicable to the Web Assembly
|
||||
or nethacklib builds. A "shim" pseudo-windowport is included
|
||||
from pull request 385.
|
||||
|
||||
Result: As mentioned, the wasm cross-compile will end up in
|
||||
targets/wasm and the nethacklib.a will end up in
|
||||
src.
|
||||
|
||||
The cross-compiler hints additions are enclosed inside ifdef sections
|
||||
and shouldn't interfere with the non-cross-compile builds using
|
||||
hints/linux.370 or hints/macOS.370.
|
||||
|
||||
---
|
||||
|
@ -1,7 +0,0 @@
|
||||
*.txt NHSUBST
|
||||
nhgitset.pl NHSUBST
|
||||
hooksdir/* NHSUBST
|
||||
* text=auto
|
||||
DOTGIT/TARGET NH_header=no
|
||||
hooksdir/TARGET NH_header=no
|
||||
* NH_filestag=(file%s_for_people_developing_changes_to_NetHack)
|
@ -1 +0,0 @@
|
||||
.git
|
@ -1,234 +0,0 @@
|
||||
___ _
|
||||
| \ _____ _____| |___ _ __ ___ _ _
|
||||
| |) / -_) V / -_) / _ \ '_ \/ -_) '_|
|
||||
|___/\___|\_/\___|_\___/ .__/\___|_|
|
||||
|_|
|
||||
|
||||
# NetHack 3.7 Developer.txt $NHDT-Date: 1596498265 2020/08/03 23:44:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.19 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
Welcome to the NetHack Infrastructure Developer's Guide.
|
||||
|
||||
This is the info you need if you are developing code for NetHack.
|
||||
(This information is from DevTeam. If you are working with a variant please
|
||||
check for additional documentation for that variant.)
|
||||
|
||||
For information on building NetHack, see README in the top level directory.
|
||||
For information on playing NetHack, see the Guidebook in the doc directory.
|
||||
|
||||
DANGER! WORK IN PROGRESS! Known issues marked XXX.
|
||||
|
||||
CONTENTS
|
||||
1. email
|
||||
2. git repositories
|
||||
3. bug reporting
|
||||
4. git configuration
|
||||
5. variable expansion
|
||||
6. reserved names
|
||||
7. nhadd/nhcommit
|
||||
8. hooks
|
||||
------------------------------------------------------------------------------
|
||||
1. email
|
||||
Email to devteam@nethack.org will usually get a response, but it may take a
|
||||
while. Please do not send save files, binary screen grabs, or other large
|
||||
things.
|
||||
------------------------------------------------------------------------------
|
||||
2. git repositories
|
||||
The public NetHack git repository is available (read-only) at:
|
||||
https://github.com/NetHack/NetHack
|
||||
or
|
||||
https://sourceforge.net/p/nethack/NetHack/
|
||||
|
||||
Branches:
|
||||
NetHack-3.6.0 The 3.6.0 release code and subsequent fixes and additions.
|
||||
------------------------------------------------------------------------------
|
||||
3. bug reporting
|
||||
Please use the form at http://www.nethack.org/common/contact.html (or send
|
||||
us an email if that's more appropriate).
|
||||
------------------------------------------------------------------------------
|
||||
4. git configuration
|
||||
|
||||
NOTE: These instructions assume you are on the default branch; this _is_
|
||||
where you want to be for setting things up. This may or may not be
|
||||
the branch you want to use for your changes; see the appropriate
|
||||
project private documentation for more information (if you are working
|
||||
alone we suggest using branch names starting with "LOCAL-").
|
||||
|
||||
NOTE: The following instructions require perl. If you do not have perl on
|
||||
your system, please install it before proceeding.
|
||||
|
||||
A. If you have never set up git on this machine before:
|
||||
(This assumes you will only be using git for NetHack. If you are going to
|
||||
use it for other projects as well, think before you type.)
|
||||
Tell git what name (or nickname) and email address to use for you:
|
||||
git config --global user.name "MY NAME"
|
||||
git config --global user.email USER@EXAMPLE.COM
|
||||
You probably want to set up a credential cache.
|
||||
macOS (10 - 12):
|
||||
git config --global credential.helper osxkeychain
|
||||
Windows:
|
||||
git config --global credential.helper store
|
||||
XXX linux
|
||||
B. Specify the prefix for variable substitution:
|
||||
(This assumes you are not a member of DevTeam or any variant's development
|
||||
team. If you are, this may be wrong. Look for more specific documentation.
|
||||
For example, this file uses "MINE" for the substitution prefix - this will
|
||||
almost always be wrong if you are working with someone else.)
|
||||
Decide where you want to put this info; it should NOT be inside the
|
||||
tree you cloned from git. I use ~/nethack/GITADDDIR; for that base,
|
||||
create the needed directories and edit the file:
|
||||
~/nethack/GITADDDIR/DOTGIT/PRE
|
||||
Put this in it (if your OS is not Unix-like you may need to change
|
||||
the first line):
|
||||
#!/bin/sh
|
||||
git config nethack.substprefix MINE
|
||||
Now make it executable:
|
||||
chmod +x ~/nethack/GITADDDIR/DOTGIT/PRE
|
||||
C. Configure the repository:
|
||||
- cd to the top level of the repository
|
||||
- tell the repository about the directory you created above:
|
||||
git config nethack.gitadddir FULL_PATH_TO_GITADDDIR
|
||||
so for the example above:
|
||||
git config nethack.gitadddir ~/nethack/GITADDDIR
|
||||
- do the automated setup:
|
||||
perl DEVEL/nhgitset.pl
|
||||
If it complains, fix what it complains about. nhgitset.pl accepts
|
||||
the following options:
|
||||
-v verbose
|
||||
-n dry run
|
||||
You can re-run nhgitset.pl as often as needed; occasionally we will
|
||||
update it (or something it installs) and you will need to run it again
|
||||
so the changes take effect.
|
||||
D. aliases
|
||||
Two aliases are installed by nhgitset.pl:
|
||||
nhadd
|
||||
nhcommit
|
||||
These two commands take the same options as the normal git add and commit
|
||||
commands but perform RCS/CVS-style variable substitution.
|
||||
|
||||
Note that nothing terrible will happen if you do not use the nh* versions
|
||||
of the commands.
|
||||
|
||||
Supported substitutions:
|
||||
MINE-Date the commit time and date
|
||||
Experimental substitutions:
|
||||
MINE-Revision CVS style revision number
|
||||
MINE-Branch the current git branch
|
||||
|
||||
For direct access to the substitution mechanism, use:
|
||||
nhsub
|
||||
|
||||
See the section "nhadd/nhcommit" for details on those aliases.
|
||||
Run "perldoc DEVEL/hooksdir/nhsub" for details on nhsub.
|
||||
|
||||
That's it. If you need to do something more when setting up your repository,
|
||||
keep reading. Otherwise, you are done with this section.
|
||||
|
||||
1) to run your own hooks in addition to ours:
|
||||
name your hook
|
||||
WHEN-HOOKNAME
|
||||
where WHEN is
|
||||
PRE (run your code before the NetHack hook)
|
||||
POST (run your code after the NetHack hook)
|
||||
and HOOKNAME is the normal git name of the hook.
|
||||
Make sure the hooks are executable (chmod +x ...).
|
||||
Be sure to test carefully since the composition of two bits of code may or
|
||||
may not do what you want.
|
||||
2) to install other bits on setup:
|
||||
Put additional files in the GITADDDIR tree. Use "DOTGIT" instead of
|
||||
".git". If a file called PRE, POST, or INSTEAD exists in a
|
||||
subdirectory of GITADDDIR, it is run before the copy, after the copy,
|
||||
or instead of the copy. No copy operation is attempted in the DOTGIT
|
||||
directory; use a script and standard git commands to change the
|
||||
contents as needed.
|
||||
3) NB: In all namespaces, anything that matches m/^nh/i or m/^nethack/i is
|
||||
reserved.
|
||||
------------------------------------------------------------------------------
|
||||
5. variable expansion
|
||||
A. Introduction
|
||||
We have implemented an RCS/CVS/SVN style variable expansion mechanism.
|
||||
References of either of the formats:
|
||||
$PREFIX-VARNAME$
|
||||
$PREFIX-VARNAME: VALUE $
|
||||
will be handled (if enabled).
|
||||
|
||||
The PREFIX is the value in the git config variable nethack.substprefix.
|
||||
VARNAME is one of:
|
||||
Date
|
||||
Branch (experimental)
|
||||
Revision (experimental)
|
||||
other names will give a warning.
|
||||
|
||||
B. Enabling variable expansion
|
||||
Variable expansion is controlled by the .gitattributes file.
|
||||
|
||||
To enable variable expansion:
|
||||
pattern NHSUBST
|
||||
To disable variable expansion:
|
||||
pattern -NHSUBST
|
||||
|
||||
More information: "git help gitattributes"
|
||||
|
||||
C. Oddities
|
||||
To trigger variable expansion, you _must_ use "git nhadd" or "git nhcommit"
|
||||
instead of "git add" or "git commit." Nothing terrible will happen if you
|
||||
use the wrong one, but the values will not be updated.
|
||||
|
||||
Variable expansion modifies the files in the work tree - your editor or
|
||||
IDE may or may not be happy with this.
|
||||
|
||||
D. Using your own hooks
|
||||
You can use your own hooks - put them in .git/hooks as usual BUT name them
|
||||
as follows:
|
||||
WHEN-HOOKNAME
|
||||
where WHEN is:
|
||||
PRE (execute the code before the NetHack hook)
|
||||
POST (execute the code after the NetHack hook)
|
||||
and HOOKNAME is the normal git name for the hook.
|
||||
|
||||
Test carefully - interactions between hooks can be nasty.
|
||||
------------------------------------------------------------------------------
|
||||
6. reserved names
|
||||
Anything that matches m/^nh/i or m/^nethack/i is reserved in all
|
||||
namespaces (environment, file names, git config, etc).
|
||||
------------------------------------------------------------------------------
|
||||
7. nhadd/nhcommit
|
||||
nhadd is essentially "git nhsub $*; git add $*"
|
||||
nhcommit is essentially "git nhsub $*; git commit $*"
|
||||
|
||||
As "git add" and "git commit" have complex arguments, nhsub attempts to
|
||||
do the right thing - or at least something reasonable - for most arguments.
|
||||
If nhadd/nhcommit don't do what you need, run "git nhsub" on its own then
|
||||
add/commit.
|
||||
|
||||
So when do I need to use what?
|
||||
The object is to get nhsub run right before git takes a snapshot of each
|
||||
file. So for example:
|
||||
- use "git nhcommit <filespec>" instead of "git commit <filespec>"
|
||||
- use "git nhadd <filespec>" instead of "git add <filespec>"
|
||||
- use either "git commit" or "git nhcommit" (because the snapshot was
|
||||
already taken)
|
||||
- if you use "git nhsub <filespec>" then you can "git add <filespec>" or
|
||||
"git commit <filespec>"
|
||||
|
||||
For more complex situations, "git nhsub" takes -v and -n flags - see
|
||||
"perldoc DEVEL/hooksdir/nhsub".
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
8. hooks
|
||||
|
||||
nhgitset.pl also installs hooks into .git/hooks. These hooks provide
|
||||
a framework which allows local hook code to co-exist with hook code we
|
||||
supply - see DEVEL/hooksdir/NHgithook.pm for details.
|
||||
|
||||
We currently use the following hooks:
|
||||
post-checkout
|
||||
post-commit
|
||||
post-merge
|
||||
These are used to generate dat/gitinfo.txt which provides the data that
|
||||
ends up available through the game command #version and the command line
|
||||
option --version.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
@ -1,124 +0,0 @@
|
||||
# NetHack 3.7 code_features.txt $NHDT-Date: 1596498264 2020/08/03 23:44:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.6 $
|
||||
# Copyright (c) 2015 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
Developer-useful info about code features, assumptions, purpose,
|
||||
rationale, etc.
|
||||
|
||||
==============================================
|
||||
FEATURE_NOTICE Alerts for a Release
|
||||
|
||||
There is a code mechanism for alerting players to a change in behavior
|
||||
over prior versions of the game.
|
||||
|
||||
Here's how to do it:
|
||||
o Where the change in behavior needs to alert the player,
|
||||
- Add an 'if statement' to invoke the alert behavior
|
||||
if the condition is met, for example
|
||||
if (flags.suppress_alert < FEATURE_NOTICE_VER(3.6.0))
|
||||
pline("Note: and explain the change here.");
|
||||
- The example above will alert the users for a new feature
|
||||
added in 3.6.0 via a one-liner via pline(), but you
|
||||
could get more elaborate (just make sure it is all done
|
||||
in the 'if' code block.
|
||||
|
||||
Once the user finds the alert no longer useful, or becoming
|
||||
annoying, they can set the "suppress_alert" option.
|
||||
- The user can only set the suppress_alert to the current
|
||||
version, not future versions. That restriction is done
|
||||
so that the feature can be used for new things in new
|
||||
releases.
|
||||
- The suppression can be done interactively mid game with
|
||||
the 'O' command, or via
|
||||
OPTIONS=suppress_alert:3.6.0
|
||||
in the user's config file.
|
||||
|
||||
==============================================
|
||||
PREFIXES_IN_USE and NOCWD_ASSUMPTIONS
|
||||
|
||||
Those provide a storage mechanism for holding the paths to various different
|
||||
types of files. Those paths are stored in the fqn_prefix[] array. They are a
|
||||
mechanism for enabling separation of the different files that NetHack needs.
|
||||
|
||||
The prefixes are added to the beginning of file names by various routines in
|
||||
files.c immediately prior to opening one of the types of files that the game
|
||||
uses.
|
||||
|
||||
They aren't about config file options (although config file options would be
|
||||
one way to set non-default values for some of the paths in the fqn_prefix[]
|
||||
array). Obviously the very first path needed (now sysconfdir, previously
|
||||
configdir) isn't viable for setting via config file options, but the game
|
||||
still needs to hunt it down "someplace." When the "someplace" is figured
|
||||
out, that place (path) would be stored in fqn_prefix[SYSCONPREFIX]. How it
|
||||
gets stored in fqn_prefix[SYSCONPREFIX] is up to us as developers.
|
||||
|
||||
Any of the fqn_prefix[] entries can be set somehow. It could be done in port
|
||||
startup code; in options processing; in config file processing; by
|
||||
translating a system environment variable such as USERPROFILE; whatever
|
||||
you/we want. The point is that NOCWD_ASSUMPTIONS and PREFIXES_IN_USE are
|
||||
there to ensure that there is a place to store that path information. The
|
||||
code to *utilize* the information is already in files.c (see fqname()).
|
||||
|
||||
There is a fqn_prefix[] entry for holding the path to each of the following:
|
||||
PREFIX NAME
|
||||
0 HACKPREFIX hackdir
|
||||
1 LEVELPREFIX leveldir location to create level files
|
||||
2 SAVEPREFIX savedir location to create/read saved games
|
||||
3 BONESPREFIX bonesir location to create/read bones
|
||||
4 DATAPREFIX datadir location to read data.base etc.
|
||||
5 SCOREPREFIX scoredir location to read/write scorefile
|
||||
6 LOCKPREFIX lockdir location to create/read lock files
|
||||
7 SYSCONFPREFIX sysconfdir location to read SYSCF_FILE
|
||||
8 CONFIGPREFIX configdir location to read user configuration file
|
||||
9 TROUBLEPREFIX troubledir location to place panic files etc.
|
||||
|
||||
To recap, they are about enabling "different paths for different things", and
|
||||
separation of:
|
||||
- read-only stuff from read-write stuff.
|
||||
- sysadmin stuff from user-writable stuff.
|
||||
etc.
|
||||
|
||||
==============================================
|
||||
REGULAR EXPRESSIONS
|
||||
|
||||
There are multiple regular expression libraries supported. Currently, one (and
|
||||
only one) of the following files should be linked into a built:
|
||||
sys/share/cppregex.cpp
|
||||
sys/share/posixregex.c
|
||||
sys/share/pmatchregex.c
|
||||
|
||||
This provides a way to access different system regular expression libraries,
|
||||
or fall back onto pmatch() if none is available. cppregex.cpp uses the regular
|
||||
expression library in the C++11 standard, and is the default on Windows.
|
||||
posixregex.c uses the POSIX regular expression library, and is the default on
|
||||
POSIX. pmatchregex.c is the fallback.
|
||||
|
||||
Configuration files written using either of the two true regex engines are
|
||||
compatible with one another, as the regular expressions are both POSIX
|
||||
extended regular expressions. Configuration files written using the fallback
|
||||
engine are incompatible.
|
||||
|
||||
Additional regular expression implementations can be written. The full
|
||||
interface documentation is in sys/share/posixregex.c
|
||||
|
||||
===========================================================
|
||||
HEADER FILE NOTES
|
||||
|
||||
hack.h defines values that are available to all NetHack source files,
|
||||
contains enums for use in all NetHack source files, and contains a
|
||||
number of struct definitions for use in all NetHack source files.
|
||||
hack.h does not contain variable declarations or variable definitions.
|
||||
|
||||
decl.h and decl.c are related: decl.h contains the extern declarations
|
||||
for variables that are defined in decl.c. These variables are global
|
||||
and available to all NetHack source files.
|
||||
decl.c variable definitions are generally laid out in much the same
|
||||
order as their corresponding declarations in decl.h.
|
||||
|
||||
A new header file cstd.h was added to coincide with 3.7's switch to
|
||||
C99. It contains calls to some C99 standard header files.
|
||||
|
||||
=================== NEXT FEATURE ==========================
|
||||
|
||||
|
||||
|
@ -1,289 +0,0 @@
|
||||
# NetHack 3.7 code_style.txt $NHDT-Date: 1694890786 2023/09/16 18:59:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $
|
||||
# Copyright (c) 2015 by Derek S. Ray
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
NetHack DevTeam Coding Style
|
||||
============================
|
||||
|
||||
NetHack is written in C, with a little bit of C++ to access platform
|
||||
libraries. This coding style document is concerned primarily with the style
|
||||
used for C source files. We do not have a defined style for C++ files, but C++
|
||||
should be styled in keeping with C.
|
||||
|
||||
The code base in C files was, close to the 3.6 release, reformatted using a
|
||||
version of the clang-format tool patched to support K&R-style argument
|
||||
declarations. Due to some incompatibilities, the patch is not publicly
|
||||
available and clang-format is not expected to be regularly used. Since then,
|
||||
function declarations and definitions have been switched to ANSI.
|
||||
|
||||
Developers should do their best to adhere to the coding style to promote
|
||||
legible, easy-to-edit code. Legibility is paramount, so in some cases, it may
|
||||
be better not to fully adhere to the style guidelines.
|
||||
|
||||
Recipes for common text editors can be found at the end of this file.
|
||||
|
||||
Indentation and Spacing
|
||||
-----------------------
|
||||
|
||||
The basic indentation is 4 spaces wide. All indentation is done using space
|
||||
characters, not tabs.
|
||||
|
||||
Lines should be at most 78 characters wide. If a line would be longer than the
|
||||
limit, the line should be wrapped and the wrapped portion should be aligned
|
||||
with the parentheses or brackets containing the wrap. If there is no set of
|
||||
parentheses or brackets, the line should be indented four spaces. Wrapping
|
||||
should normally occur after a comma or before a binary operator, when
|
||||
possible:
|
||||
|
||||
int index
|
||||
= SomeExcessivelyLongExpression;
|
||||
|
||||
fcall(arg1,
|
||||
arg2, (cond13
|
||||
&& cond2));
|
||||
|
||||
Single blank lines should be used wherever convenient to improve readability.
|
||||
|
||||
Functions and Control Statements
|
||||
--------------------------------
|
||||
|
||||
For a function definition, the return type, declarator, and opening brace
|
||||
should each appear on a line of their own. Arguments are defined in the following
|
||||
parenthesis, per ANSI. There are two general styles. One with no comments, where
|
||||
arguments are added one after another, with a wrap aligning to the first argument
|
||||
if there is an overflow.
|
||||
|
||||
void
|
||||
foo(int i, char c)
|
||||
{
|
||||
/* function body */
|
||||
}
|
||||
|
||||
void
|
||||
long_function_name(int first_arg, struct long_name *second_arg,
|
||||
int third_arg, int forth_arg)
|
||||
{
|
||||
/* function body */
|
||||
}
|
||||
|
||||
Alternatively, arguments can be one per line if they are commented:
|
||||
|
||||
void
|
||||
long_function_name(int first_arg, /* main operation */
|
||||
struct long_name *second_arg, /* control details */
|
||||
int third_arg, /* local conditions - if
|
||||
they apply */
|
||||
int forth_arg) /* remote conditions */
|
||||
{
|
||||
/* function body */
|
||||
}
|
||||
|
||||
If the function takes no parameters:
|
||||
|
||||
int
|
||||
long_function_name(void)
|
||||
{
|
||||
/* function body */
|
||||
}
|
||||
|
||||
Opening braces of control statements appear on the same line as the control
|
||||
statement:
|
||||
|
||||
if (condition) {
|
||||
/* body */
|
||||
}
|
||||
|
||||
Else statements and the while statements of do-while blocks appear on the same
|
||||
line as the closing brace of the if or do statement. Otherwise, closing braces
|
||||
always get a line of their own.
|
||||
|
||||
if (condition) {
|
||||
/* body */
|
||||
} else if (condition) {
|
||||
do {
|
||||
/* body */
|
||||
} while (condition);
|
||||
} else {
|
||||
/* body */
|
||||
}
|
||||
|
||||
If a control block has only a single statement, it can appear on a line of its
|
||||
own, with an indent. If the statement is a null statement, then it should be
|
||||
expressed as an empty set block, not with a semicolon, because many compilers
|
||||
will warn if a null statement is used:
|
||||
|
||||
if (condition)
|
||||
fcall();
|
||||
|
||||
if (condition) {
|
||||
} else
|
||||
fcall();
|
||||
|
||||
If multiple control blocks are being used in a row, it may be more readable to
|
||||
use braces even for single statements, and they should be used if they improve
|
||||
readability. The following is an example of poor usage:
|
||||
|
||||
if (condition) {
|
||||
/* long body */
|
||||
} else if (condition)
|
||||
statement;
|
||||
else {
|
||||
/* very long body */
|
||||
}
|
||||
|
||||
Switch statements should have the case labels unindented, and the statements
|
||||
should be indented normally. The default case should occur last unless there's
|
||||
a compelling reason not to, and fallthroughs should be explicitly marked as
|
||||
such with a comment, to avoid Yeenoghu getting the touch of death again:
|
||||
|
||||
switch (condition) {
|
||||
case FOO:
|
||||
case BAR:
|
||||
fcall();
|
||||
/* fall-through */
|
||||
case BAZ:
|
||||
fcall();
|
||||
break;
|
||||
|
||||
default:
|
||||
statement;
|
||||
}
|
||||
|
||||
Variables should never be declared in a condition or a for loop
|
||||
initialization, and if an assignment is used as a condition, it should be
|
||||
wrapped in an additional set of parentheses for clarity:
|
||||
|
||||
int *p;
|
||||
if ((p = fcall())) {
|
||||
/* body */
|
||||
}
|
||||
|
||||
int i;
|
||||
for (i = 1; i < 10; ++i) {
|
||||
/* body */
|
||||
}
|
||||
|
||||
Variable names to avoid
|
||||
-----------------------
|
||||
|
||||
near, far Some compilers and cross-compilers that target old
|
||||
processors with segmented architectures may treat
|
||||
those as keywords. It is safest to just avoid them.
|
||||
|
||||
Spaces in Expressions
|
||||
---------------------
|
||||
|
||||
Spaces should appear around binary operators, after commas, after a C-style
|
||||
cast, and after the keyword in a control statement. They should not appear
|
||||
between a function name and the opening parenthesis of a function call, nor
|
||||
immediately inside a pair of parentheses:
|
||||
|
||||
foo(i, j, l);
|
||||
if ((boolean) condition) {
|
||||
/* body */
|
||||
}
|
||||
|
||||
Casts and sizeof
|
||||
----------------
|
||||
|
||||
Casts should separate the cast operator and its expression with a space:
|
||||
'(char *) str'
|
||||
'sizeof (type)' requires the parentheses. 'sizeof expression' does not;
|
||||
using them is not wrong but omitting them avoids some visual clutter.
|
||||
Using them without the separating space gives the false impression of a
|
||||
function call or macro-with-argument(s) expansion; 'sizeof' is an operator
|
||||
and the parentheses required for '(type)' are to treat it like a cast.
|
||||
|
||||
Comments
|
||||
--------
|
||||
|
||||
Some block comments are undecorated, just split into reasonable width lines:
|
||||
/* this is
|
||||
a comment */
|
||||
They usually don't include sentence punctuation.
|
||||
|
||||
Others are more elaborate:
|
||||
/*
|
||||
* This is
|
||||
* another comment.
|
||||
*/
|
||||
This style is usually used with sentence punctation, particularly if they
|
||||
contain more than one sentence.
|
||||
|
||||
End-of-line comments which need to span lines
|
||||
somecode(); /* this comment
|
||||
* is ok */
|
||||
should start every continuation line with an asterisk, otherwise clang-format
|
||||
would convert them into a block comment
|
||||
othercode(); /* this comment
|
||||
should be avoided */
|
||||
because it would be converted into
|
||||
othercode();
|
||||
/* this comment
|
||||
should be avoided */
|
||||
if another bulk reformatting ever gets performed. Similarly, multiple
|
||||
comments intended to read as one
|
||||
morecode(); /* start of comment */
|
||||
/* more of comment */
|
||||
/* end of comment */
|
||||
are deprecated because they will end up losing the indentation of the
|
||||
followup lines if reformatted.
|
||||
|
||||
Many files end with
|
||||
/*filename*/
|
||||
usually preceded by a blank line. This was intended as a workaround for a
|
||||
comment--somewhere, possibly in Amiga or Atari code--that stated that some
|
||||
compiler or other didn't always process the last line of the file. If that
|
||||
last line is a comment, nothing is lost. The real issue almost certainly
|
||||
was source file(s) that didn't end in newline. These days we try to force
|
||||
the final newline for every file, prior to release if not always maintained
|
||||
day-to-day. The name at the end can still be worthwhile when editing or
|
||||
browsing multiple files.
|
||||
|
||||
|
||||
Vim Configuration
|
||||
=================
|
||||
|
||||
For vim, the following settings are encouraged when editing NetHack code, to
|
||||
ensure that indentation is done correctly:
|
||||
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set shiftround
|
||||
set textwidth=78
|
||||
set cindent
|
||||
set filetype=c
|
||||
|
||||
|
||||
Visual Studio Configuration
|
||||
===========================
|
||||
|
||||
In Visual Studio under Tools->Options->Text Editor->C/C++, you can set the
|
||||
following options to obtain desired behavior:
|
||||
|
||||
[Tabs]
|
||||
Indenting: Smart
|
||||
Tab size: 4
|
||||
Indent size: 4
|
||||
Insert Spaces
|
||||
|
||||
There are a number of other options under [Formatting] that should be
|
||||
checked (Indentation, New Lines, Spacing, and Wrapping), but there are so
|
||||
many entries that reproducing them here is impractical. Fortunately, the
|
||||
options are in plain English, so walking through them with a copy of
|
||||
this Guide handy and making changes as required will suffice.
|
||||
|
||||
Emacs Configuration
|
||||
===================
|
||||
|
||||
There are no doubt umpteen different ways to handle this in Emacs.
|
||||
Putting the following in ~/.emacs.el is one
|
||||
|
||||
(defun hook-c ()
|
||||
(setq c-set-style "k&r")
|
||||
(setq c-basic-offset 4)
|
||||
(setq indent-tabs-mode nil))
|
||||
(add-hook 'c-mode-common-hook 'hook-c)
|
||||
|
@ -1,206 +0,0 @@
|
||||
# NetHack 3.7 git_recipes.txt $NHDT-Date: 1596498266 2020/08/03 23:44:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $
|
||||
# Copyright (c) 2015 by Derek S. Ray
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
Git has a messy learning curve. This file is an attempt to serve as a quick
|
||||
reference for basic tasks while you get up to speed.
|
||||
|
||||
------------------------
|
||||
|
||||
[*] git checkout [-f] (branch)
|
||||
|
||||
Switch your local repository to be at the most recent commit of (branch).
|
||||
Including -f will discard changes made in the working directory.
|
||||
|
||||
|
||||
[*] git status [-uall | -uno]
|
||||
|
||||
Shows all changed files in your local repository and also a list of the ones
|
||||
you have staged for commit.
|
||||
Including -uall will also show you all untracked files in all subdirectories.
|
||||
Including -uno will show you _no_ untracked files.
|
||||
|
||||
|
||||
[*] git log [-NUM]
|
||||
[*] git log <commit1> <commit2>
|
||||
[*] git log [--pretty=one]
|
||||
[*] git log (branch)
|
||||
|
||||
For a full explanation of all the arguments you can pass to 'log', please see
|
||||
the manual; there are a lot and these are just a few of the common ones. For
|
||||
our purposes, git log will show you all the commits according to criteria
|
||||
you specify:
|
||||
|
||||
-NUM: The last NUM commits in this branch
|
||||
<commit1> <commit2>: all commits between commit1 and commit2
|
||||
-pretty=one: format output as a single line for each entry
|
||||
(branch): show the commits from (branch) instead of the current one
|
||||
|
||||
[*] git log --pretty=one --decorate --graph --all
|
||||
|
||||
(This is best explained by executing and looking at the output.)
|
||||
|
||||
|
||||
[*] git add (filename)
|
||||
[*] git nhadd (filename)
|
||||
|
||||
Adds the changes you've made in (filename) to the pre-commit staging area.
|
||||
(also referred to as the 'index')
|
||||
OR
|
||||
Make a new file be tracked by git.
|
||||
|
||||
"nhadd" is the preferred syntax and will automatically update the source file
|
||||
headers with the latest date, branch, and version. See Developer.txt for
|
||||
details.
|
||||
|
||||
|
||||
[*] git commit [-a] [-m "text"]
|
||||
[*] git nhcommit [-a] [-m "text"]
|
||||
|
||||
Commits all staged changes (in the index) to this branch in your local repo
|
||||
from your current position.
|
||||
Including -a will 'git add' all eligible files before doing so.
|
||||
Including -m will use "text" as the commit message instead of opening an
|
||||
editor window for you to create one.
|
||||
|
||||
"nhcommit" is the preferred syntax and will automatically update the source file
|
||||
headers with the latest date, branch, and version. See Developer.txt for
|
||||
details.
|
||||
|
||||
|
||||
[*] git push [--all] [-u origin (branch)]
|
||||
|
||||
Sends all your commits for the current branch to the centralized repo.
|
||||
Including --all will send the commits for _all_ branches.
|
||||
Specifying -u is only needed the first time you push (branch) that you
|
||||
created; it establishes the connection between local and remote for that
|
||||
branch.
|
||||
|
||||
|
||||
[*] git reset [--hard] (filename)
|
||||
|
||||
Without any parameters, unstages the changes for (filename) from the index;
|
||||
does not change the working tree. This is the equivalent of the command
|
||||
git reset --mixed (filename); git reset --soft (filename) has no effect.
|
||||
|
||||
With --hard, unstages (filename) from the index and reverts (filename) in
|
||||
the working tree to the most recent commit.
|
||||
|
||||
*** WARNING *** --hard _will_ throw away your changes.
|
||||
|
||||
|
||||
[DSR: I'm hesitant about including this command because you can trash stuff
|
||||
with it. But at the same time, for people who are adapting to a commit not
|
||||
also automatically being a send, it's nice for them to know how to undo one in
|
||||
case they do something wrong. thoughts?]
|
||||
|
||||
[*] git reset [--soft | --mixed | --hard] HEAD~1
|
||||
|
||||
*** WARNING *** Never, EVER do this to a commit that you have already pushed;
|
||||
you will be rewriting history on other people's machines and this will
|
||||
generally turn out very poorly.
|
||||
|
||||
With --soft, undoes the most recent 'git commit' action, but leaves the
|
||||
changes in the index and in the working directory.
|
||||
|
||||
With --mixed, does everything --soft does but also unstages the changes from
|
||||
the index. If you don't specify one of the three, reset will assume this.
|
||||
|
||||
With --hard, does everything --mixed does but also reverts the working tree to
|
||||
the prior commit.
|
||||
|
||||
*** WARNING *** --hard will effectively delete a commit and "lose" the changes.
|
||||
[/end area-of-concern]
|
||||
|
||||
|
||||
[*] git fetch [--all]
|
||||
|
||||
Retrieve commits from the remote repository to your machine.
|
||||
Including --all will get commits for all branches.
|
||||
Does NOT merge them into your local repository.
|
||||
|
||||
|
||||
[*] git pull
|
||||
|
||||
Incorporate any fetched commits for the current branch into your repository
|
||||
and update your position accordingly. This will create a merge commit (noting
|
||||
that you merged a branch into itself).
|
||||
|
||||
|
||||
[*] git rebase [no-arguments version ONLY]
|
||||
|
||||
Incorporate fetched commits for the current branch into your repository, and
|
||||
replay any local commits and changes afterwards on top.
|
||||
|
||||
Quality picture-pages ASCII art:
|
||||
|
||||
E---F---G---H (remote changes)
|
||||
/
|
||||
/
|
||||
(branch 'frog') A---B---C---D---E'---F' (your local changes)
|
||||
|
||||
After 'git fetch' and 'git rebase', it will look like this:
|
||||
|
||||
--- (remote HEAD)
|
||||
|
|
||||
V
|
||||
(branch 'frog') A---B---C---D---E---F---G---H---E'---F'
|
||||
^ ^
|
||||
| |
|
||||
-------- (to be pushed)
|
||||
|
||||
|
||||
[*] git branch (branch)
|
||||
|
||||
Creates a new branch from the current commit you're pointed to.
|
||||
Does not automatically checkout (switch to) the branch.
|
||||
|
||||
|
||||
[*] git checkout -b (branch)
|
||||
|
||||
Creates a new branch from the current commit you're pointed to, and
|
||||
automatically checks out that branch.
|
||||
|
||||
|
||||
[*] git branch <pattern> --list | [--all | -a] | [--remotes | -r]
|
||||
|
||||
Lists all branches matching <pattern>.
|
||||
With --all instead, lists all branches (including remotely tracked ones).
|
||||
With --remotes instead, lists only remote branches.
|
||||
|
||||
|
||||
[*] git merge (branch) [--no-commit]
|
||||
|
||||
Merges all the changes from (branch) since it last diverged from a common
|
||||
ancestor into your current branch.
|
||||
|
||||
With --no-commit, does not automatically create a merge entry in the log but
|
||||
leaves all the merged files in your working directory; to complete the merge
|
||||
you must commit them manually later (likely after you have edited them). This
|
||||
more accurately mimics the merge behavior of svn [and cvs?]
|
||||
|
||||
|
||||
[*] git stash [save | apply | list] <stashname>
|
||||
|
||||
save: Takes all changes in your working directory and 'stashes' them in a temporary
|
||||
holding area. Convenient if the command you're trying to run won't go unless
|
||||
you have a clean working dir; also convenient to move experimental changes
|
||||
between branches without needing to commit them.
|
||||
|
||||
apply: Replays the named stash onto your current working directory as though
|
||||
it were a patch. Does not delete the stash from the list.
|
||||
|
||||
list: Lists all of your stashed code blobs.
|
||||
|
||||
|
||||
=======================================
|
||||
External Links
|
||||
=======================================
|
||||
http://pcottle.github.io/learnGitBranching
|
||||
|
||||
=======================================
|
||||
Typical workflows for common activities
|
||||
=======================================
|
||||
|
||||
{To be added in near future: DSR 3/15}
|
||||
|
@ -1,36 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 getinfo.pl $NHDT-Date: 1596498266 2020/08/03 23:44:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
# Copyright (c) 2018 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
|
||||
# special case for this script only: allow
|
||||
# it to run from DEVEL or $TOP
|
||||
if (-f "hooksdir/NHgithook.pm" || -f "DEVEL/hooksdir/NHgithook.pm"){
|
||||
push(@INC, "DEVEL/hooksdir");
|
||||
}
|
||||
chdir("..") if (-f "hooksdir/NHgithook.pm");
|
||||
}
|
||||
use NHgithook;
|
||||
|
||||
&NHgithook::nhversioning;
|
@ -1,22 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 NHadd $NHDT-Date: 1596498406 2020/08/03 23:46:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# wrapper for nhadd and nhcommit aliases
|
||||
|
||||
%ok = map { $_ => 1 } ('add', 'commit');
|
||||
|
||||
die "Bad subcommand '$ARGV[0]'" unless $ok{$ARGV[0]};
|
||||
|
||||
# we won't fail on a failure, so just system()
|
||||
$rv = system('.git/hooks/nhsub',"--$ARGV[0]",@ARGV[1..$#ARGV]);
|
||||
if($rv){
|
||||
print "warning: nhsub failed: $rv $!\n";
|
||||
}
|
||||
|
||||
if(length $ENV{GIT_PREFIX}){
|
||||
chdir($ENV{GIT_PREFIX}) or die "Can't chdir $ENV{GIT_PREFIX}: $!";
|
||||
}
|
||||
|
||||
exec "git", @ARGV or die "Can't exec git: $!";
|
@ -1,252 +0,0 @@
|
||||
#
|
||||
# NetHack 3.7 NHgithook.pm $NHDT-Date: 1596498406 2020/08/03 23:46:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.7 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# NetHack Git Hook Module
|
||||
|
||||
package NHgithook;
|
||||
use Cwd;
|
||||
|
||||
###
|
||||
### CONFIG
|
||||
###
|
||||
my $trace = 0;
|
||||
my $tracefile = "/tmp/nhgitt.$$";
|
||||
|
||||
# OS hackery
|
||||
my $DS = quotemeta('/');
|
||||
if ($^O eq "MSWin32")
|
||||
{
|
||||
$DS = quotemeta('\\');
|
||||
}
|
||||
|
||||
our %saved_env;
|
||||
our @saved_argv;
|
||||
our $saved_input;
|
||||
|
||||
sub saveSTDIN {
|
||||
@saved_input = <STDIN>;
|
||||
|
||||
if($trace){
|
||||
print TRACE "STDIN:\n";
|
||||
print TRACE $saved_input;
|
||||
print TRACE "ENDSTDIN\n";
|
||||
}
|
||||
|
||||
tie *STDIN, 'NHIO::STDIN', @saved_input;
|
||||
}
|
||||
|
||||
# XXX this needs a re-write (don't tie and untie, just set NEXT=0)
|
||||
# (the sensitive thing is @foo = <STDIN> )
|
||||
sub resetSTDIN{
|
||||
my $x = tied(*STDIN);
|
||||
my %x = %$x;
|
||||
my $data = @$x{DATA};
|
||||
untie *STDIN;
|
||||
tie *STDIN, 'NHIO::STDIN', $data;
|
||||
}
|
||||
|
||||
# don't need this now
|
||||
#sub restore {
|
||||
# open STDIN, "<", \$saved_input or die "reopen STDIN: $!";
|
||||
# @ARGV = @saved_argv;
|
||||
# %ENV = %saved_env;
|
||||
#}
|
||||
|
||||
sub PRE {
|
||||
&do_hook("PRE");
|
||||
}
|
||||
|
||||
sub POST {
|
||||
&do_hook("POST");
|
||||
}
|
||||
|
||||
###
|
||||
### store githash and gitbranch in dat/gitinfo.txt
|
||||
###
|
||||
|
||||
sub nhversioning {
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $git_sha = `git rev-parse HEAD`;
|
||||
$git_sha =~ s/\s+//g;
|
||||
my $git_branch = `git rev-parse --abbrev-ref HEAD`;
|
||||
$git_branch =~ s/\s+//g;
|
||||
die "git rev-parse failed" unless(length $git_sha and length $git_branch);
|
||||
my $exists = 0;
|
||||
|
||||
if (open my $fh, '<', 'dat/gitinfo.txt') {
|
||||
$exists = 1;
|
||||
my $hashok = 0;
|
||||
my $branchok = 0;
|
||||
while (my $line = <$fh>) {
|
||||
if ((index $line, $git_sha) >= 0) {
|
||||
$hashok++;
|
||||
}
|
||||
if ((index $line, $git_branch) >= 0) {
|
||||
$branchok++;
|
||||
}
|
||||
}
|
||||
close $fh;
|
||||
if ($hashok && $branchok) {
|
||||
print "dat/gitinfo.txt unchanged, githash=".$git_sha."\n";
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
print "WARNING: Can't find dat directory\n" unless(-d "dat");
|
||||
}
|
||||
if (open my $fh, '>', 'dat/gitinfo.txt') {
|
||||
my $how = ($exists ? "updated" : "created");
|
||||
print $fh 'githash='.$git_sha."\n";
|
||||
print $fh 'gitbranch='.$git_branch."\n";
|
||||
print "dat/gitinfo.txt ".$how.", githash=".$git_sha."\n";
|
||||
} else {
|
||||
print "WARNING: Unable to open dat/gitinfo.txt: $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
# PRIVATE
|
||||
sub do_hook {
|
||||
my($p) = @_;
|
||||
my $hname = $0;
|
||||
$hname =~ s!^((.*$DS)|())(.*)!$1$p-$4!;
|
||||
if(-x $hname){
|
||||
print TRACE "START $p: $hname\n" if($trace);
|
||||
|
||||
open TOHOOK, "|-", $hname or die "open $hname: $!";
|
||||
print TOHOOK <STDIN>;
|
||||
close TOHOOK or die "close $hname: $! $?";
|
||||
|
||||
print TRACE "END $p\n" if($trace);
|
||||
}
|
||||
}
|
||||
|
||||
sub trace_start {
|
||||
return unless($trace);
|
||||
my $self = shift;
|
||||
open TRACE, ">>", $tracefile;
|
||||
print TRACE "START CLIENT PID:$$ ARGV:\n";
|
||||
print TRACE "CWD: " . cwd() . "\n";
|
||||
print TRACE "[0] $0\n";
|
||||
my $x1;
|
||||
for(my $x=0;$x<scalar @ARGV;$x++){
|
||||
$x1 = $x+1;
|
||||
print TRACE "[$x1] $ARGV[$x]\n";
|
||||
}
|
||||
print TRACE "ENV:\n";
|
||||
foreach my $k (sort keys %ENV){
|
||||
next unless ($k =~ m/(^GIT_)|(^NH)/);
|
||||
print TRACE " $k => $ENV{$k}\n";
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
%saved_env = %ENV;
|
||||
@saved_argv = @ARGV;
|
||||
&trace_start;
|
||||
}
|
||||
|
||||
###
|
||||
### ugly mess so we can re-read STDIN
|
||||
###
|
||||
package NHIO::STDIN;
|
||||
sub TIEHANDLE {
|
||||
my $class = shift;
|
||||
my %fh;
|
||||
# XXX yuck
|
||||
if(ref @_[0]){
|
||||
$fh{DATA} = @_[0];
|
||||
} else {
|
||||
$fh{DATA} = \@_;
|
||||
}
|
||||
$fh{NEXT} = 0;
|
||||
return bless \%fh, $class;
|
||||
}
|
||||
|
||||
sub READLINE {
|
||||
my $self = shift;
|
||||
return undef if($self->{EOF});
|
||||
if(wantarray){
|
||||
my $lim = $#{$self->{DATA}};
|
||||
my @ary = @{$self->{DATA}}[$self->{NEXT}..$lim];
|
||||
my @rv = @ary[$self->{NEXT}..$#ary];
|
||||
$self->{EOF} = 1;
|
||||
return @rv;
|
||||
} else{
|
||||
my $rv = $self->{DATA}[$self->{NEXT}];
|
||||
if(length $rv){
|
||||
$self->{NEXT}++;
|
||||
return $rv;
|
||||
} else {
|
||||
$self->{EOF} = 1;
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub EOF {
|
||||
$self = shift;
|
||||
return $self->{EOF};
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
NHgithook - common code for NetHack git hooks (and other git bits)
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
BEGIN {
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
if ($^O eq "MSWin32")
|
||||
{
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
|
||||
push(@INC, $ENV{GIT_DIR}.$PDS."hooks"); # for most hooks
|
||||
push(@INC, ($0 =~ m!^(.*)$DS!)[0]); # when the above doesn't work
|
||||
|
||||
$gitdir = `git rev-parse --git-dir`; # and when the above really doesn't work
|
||||
$gitdir =~ s/[\r\n]*$/;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
|
||||
&NHgithook::saveSTDIN;
|
||||
&NHgithook::PRE;
|
||||
(core hook code)
|
||||
&NHgithook::POST;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Buffers call information so multiple independent actions may be coded for
|
||||
Git hooks and similar Git callouts.
|
||||
|
||||
=head1 SETUP
|
||||
|
||||
Changing the C<$trace> and C<$tracefile> variables requires editing the
|
||||
module source. Setting C<$trace> enables tracing, logs basic information,
|
||||
and leaves the C<TRACE> filehandle open for additional output; output to this
|
||||
filehandle must be guarded by C<$NHgithook::trace>. Setting
|
||||
C<$tracefile> specifies the file used for trace output. Note that C<$$>
|
||||
may be useful since multiple processes may be live at the same time.
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
NHgithook::saveSTDIN reads STDIN until EOF and saves it
|
||||
NHgithook::PRE runs the PRE hook, if it exists
|
||||
NHgithook::POST runs the POST hook, if it exists
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Some features not well tested, especially under Windows.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Kenneth Lorber (keni@his.com)
|
@ -1,398 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 NHsubst $NHDT-Date: 1596498407 2020/08/03 23:46:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.5 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# git merge driver for substitutions (like RCS/CVS)
|
||||
# driver line: .... %O %A %B %L
|
||||
use strict;
|
||||
|
||||
my $debug = 0;
|
||||
my $rawin = 0; # feed diff to stdin for testing (do NOT set $debug=1)
|
||||
|
||||
# We want TRACE open so we don't need to test $debug everywhere, but we skip
|
||||
# this first block because it's expensive and dumpfile() hangs with $rawin.
|
||||
my $sink = ($^O eq "MSWin32") ? "NUL" : "/dev/null";
|
||||
my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$";
|
||||
open TRACE, ">>", $rawin?"/dev/tty":(($debug==0)? $sink : $dbgfile);
|
||||
print TRACE "TEST TRACE\n";
|
||||
if($debug){
|
||||
print TRACE "START CLIENT ARGV:\n";
|
||||
print TRACE "[0] $0\n";
|
||||
my $x1;
|
||||
for(my $x=0;$x<scalar @ARGV;$x++){
|
||||
$x1 = $x+1;
|
||||
print TRACE "[$x1] $ARGV[$x]\n";
|
||||
}
|
||||
print TRACE "ENV:\n";
|
||||
foreach my $k (sort keys %ENV){
|
||||
next unless ($k =~ m/^GIT_/);
|
||||
print TRACE " $k => $ENV{$k}\n";
|
||||
}
|
||||
print TRACE "CWD: " . `pwd`;
|
||||
&dumpfile($ARGV[0], "[0O]");
|
||||
&dumpfile($ARGV[1], "[1A]");
|
||||
&dumpfile($ARGV[2], "[2B]");
|
||||
print TRACE "L=$ARGV[3]\n";
|
||||
print TRACE "END\n";
|
||||
}
|
||||
|
||||
my $mark_len = $ARGV[3];
|
||||
$mark_len = 3 if($mark_len==0 && $rawin);
|
||||
|
||||
my $mark_start = '<' x $mark_len;
|
||||
my $mark_middle = '=' x $mark_len;
|
||||
my $mark_end = '>' x $mark_len;
|
||||
|
||||
my $PREFIX;
|
||||
# pick up the prefix for substitutions in this repo
|
||||
if($rawin){
|
||||
$PREFIX = "TEST";
|
||||
} else {
|
||||
$PREFIX = `git config --local --get nethack.substprefix`;
|
||||
chomp($PREFIX);
|
||||
}
|
||||
|
||||
my @out;
|
||||
my $cntout;
|
||||
if($rawin){
|
||||
@out = <STDIN>;
|
||||
} else {
|
||||
#system "git merge-file -p .... > temp
|
||||
my $tags = "-L CURRENT -L ANCESTOR -L OTHER"; # XXX should "CURRENT" be "MINE"?
|
||||
@out = `git merge-file -p $tags $ARGV[1] $ARGV[0] $ARGV[2]`;
|
||||
#NB: we don't check the exit value because it's useless
|
||||
print TRACE "MERGE-FILE START\n".join("",@out)."MERGE-FILE END\n";
|
||||
}
|
||||
|
||||
($cntout,@out) = &edit_merge(@out);
|
||||
|
||||
if($rawin){
|
||||
print "COUNT: $cntout\n";
|
||||
print @out;
|
||||
} else {
|
||||
# spit @out to $ARGV[1] (careful: what about EOL character?)
|
||||
open OUT, ">$ARGV[1]" or die "Can't open $ARGV[1]";
|
||||
print OUT @out;
|
||||
close OUT;
|
||||
|
||||
print TRACE "WRITING START ($ARGV[1])\n".join("",@out)."WRITING END\n";
|
||||
&dumpfile($ARGV[1], "READBACK");
|
||||
}
|
||||
print TRACE "COUNT: $cntout\n";
|
||||
|
||||
exit( ($cntout>0) ? 1 : 0);
|
||||
|
||||
#git merge-file [-L <current-name> [-L <base-name> [-L <other-name>]]]
|
||||
# [--ours|--theirs|--union] [-p|--stdout] [-q|--quiet] [--marker-size=<n>]
|
||||
# [--[no-]diff3] <current-file> <base-file> <other-file>
|
||||
#The `merge.*.driver` variable's value is used to construct a command to run to merge ancestor's
|
||||
# version (%O), current version (%A) and the other branches' version (%B). These three tokens are
|
||||
# replaced with the names of temporary files that hold the contents of these versions when the
|
||||
# command line is built. Additionally, %L will be replaced with the conflict marker size (see
|
||||
# below).
|
||||
|
||||
# keep failing so we don't need to keep changing the setup while building this script
|
||||
|
||||
sub dumpfile {
|
||||
my($file, $tag) = @_;
|
||||
print TRACE "FILE $tag START\n";
|
||||
print TRACE `hexdump -C $file`;
|
||||
print TRACE "FILE END\n";
|
||||
}
|
||||
|
||||
sub edit_merge {
|
||||
my(@input) = @_;
|
||||
# $::count is a bit ugly XXX
|
||||
local $::count = 0; # we need the number of conflicts for exit()
|
||||
my @out;
|
||||
|
||||
local $_;
|
||||
while($_ = shift @input){
|
||||
if(m/^$mark_start /){
|
||||
print TRACE "FOUND A CONFLICT\n";
|
||||
my @conflict;
|
||||
push(@conflict, $_);
|
||||
while($_ = shift @input){
|
||||
push(@conflict, $_);
|
||||
if(m/^$mark_end /){
|
||||
last;
|
||||
}
|
||||
}
|
||||
push(@out, &edit_conflict(@conflict));
|
||||
} else {
|
||||
push(@out, $_);
|
||||
}
|
||||
}
|
||||
print TRACE "RETURN count=$::count\n";
|
||||
return($::count, @out);
|
||||
}
|
||||
|
||||
sub edit_conflict {
|
||||
my(@in) = @_;
|
||||
|
||||
print TRACE "EDIT START: " . scalar(@in)."\n";
|
||||
if($debug){
|
||||
foreach my $x (@in){ my $xx = $x; chomp($xx); print TRACE "-$xx-\n"; }
|
||||
}
|
||||
print TRACE "EDIT END INPUT\n";
|
||||
|
||||
# one-line change - use as base case to develop the code
|
||||
# ours ARGV[1] top-of-diff
|
||||
# theirs ARGV[2] bottom-of-diff
|
||||
# simple conflict:
|
||||
# [0] <<<<<<< d1
|
||||
# [1] $$PREFIX-Date: 1 ...
|
||||
# [2] =======
|
||||
# [3] $$PREFIX-Date: 3 ...
|
||||
# [4] >>>>>>> d3
|
||||
if(scalar(@in) == 5 && $in[2] =~ m/^$mark_middle/){
|
||||
my $back = &merge_one_line_maybe($in[1],$in[3]); # (ours, theirs)
|
||||
if(!defined $back){
|
||||
$::count++; # leave the conflict
|
||||
return @in;
|
||||
} else {
|
||||
return ($back);
|
||||
}
|
||||
# NOTREACHED
|
||||
} else {
|
||||
# XXX LATER
|
||||
# Start at the top of both sections and work downwards. As long as the lines can be merged,
|
||||
# push them out and keep going. If there are lines left, we will still have a conflict but
|
||||
# we can try to make it smaller. Push out the start-conflict marker. Start at the
|
||||
# bottom of both section and work upwards. As long as the lines can be merged, reverse push out
|
||||
# the merged line and keep going. (We know there will be lines left at some point.) Push out
|
||||
# remaining (middle) lines from OURS. Push out mark_middle. Push out remaining middle lines
|
||||
# from THEIRS. Push out end-conflict marker. $::count++; return (@a,$b,@c,$d,@e,$f,@g)
|
||||
# @a
|
||||
# $b = <<<
|
||||
# @c
|
||||
# $d = ===
|
||||
# @e
|
||||
# $f = >>>
|
||||
# @g
|
||||
}
|
||||
# not matched - return the unchanged conflict
|
||||
$::count++;
|
||||
return @in;
|
||||
}
|
||||
|
||||
# XXX This is expensive. Add a quick check for "anything that looks like a subst var" and just
|
||||
# declare the lines unmergeable if it fails.
|
||||
sub merge_one_line_maybe {
|
||||
my($ours, $theirs) = @_;
|
||||
|
||||
my $more = 1;
|
||||
my $fail = 0;
|
||||
my $out = '';
|
||||
# TYPES:
|
||||
# 0 no match
|
||||
# 1 unexpanded var
|
||||
# 2 expanded var
|
||||
# 3 non-var text
|
||||
my($ourstype, $theirtype);
|
||||
my($oursvar, $theirvar);
|
||||
my($oursval, $theirval);
|
||||
|
||||
while($more){
|
||||
($ourstype, $theirtype) = (0,0);
|
||||
($oursvar, $theirvar) = (undef, undef);
|
||||
($oursvar, $theirvar) = (undef, undef);
|
||||
# unexpanded var
|
||||
if($ours =~ m/\G\$$PREFIX-([A-Z][a-z]+)\$/gc){
|
||||
$ourstype = 1;
|
||||
$oursvar = $1;
|
||||
}
|
||||
if($theirs =~ m/\G\$$PREFIX-([A-Z][a-z]+)\$/gc){
|
||||
$theirtype = 1;
|
||||
$theirvar = $1;
|
||||
}
|
||||
# expanded var
|
||||
unless($ourstype){
|
||||
if($ours =~ m/\G\$$PREFIX-([A-Za-z]+):\s+(.*?)\s\$/gc){
|
||||
$ourstype = 2;
|
||||
$oursvar = $1;
|
||||
$oursval = $2;
|
||||
}
|
||||
}
|
||||
unless($theirtype){
|
||||
if($theirs =~ m/\G\$$PREFIX-([A-Za-z]+):\s+(.*?)\s\$/gc){
|
||||
$theirtype = 2;
|
||||
$theirvar = $1;
|
||||
$theirval = $2;
|
||||
}
|
||||
}
|
||||
# non-var text
|
||||
unless($ourstype){
|
||||
if($ours =~ m/\G(\$?[^\x24]*)/gc){
|
||||
$ourstype = 3;
|
||||
$oursval = $1;
|
||||
}
|
||||
}
|
||||
unless($theirtype){
|
||||
if($theirs =~ m/\G(\$?[^\x24]*)/gc){
|
||||
$theirtype = 3;
|
||||
$theirval = $1;
|
||||
}
|
||||
}
|
||||
print TRACE "MID: $ourstype/$oursval $theirtype/$theirval\n";
|
||||
# are we done?
|
||||
if(pos($ours)==length $ours && pos($theirs) == length $theirs){
|
||||
$more = 0;
|
||||
}
|
||||
if($ourstype == 0 && $theirtype == 0){
|
||||
die "NHsubst MERGE FAILED - aborted infinite loop\n";
|
||||
}
|
||||
|
||||
# now see if ours and their match or can be resolved
|
||||
# text
|
||||
if($ourstype == 3 && $theirtype == 3){
|
||||
#mismatch is \s vs \s\s - where is this coming from?
|
||||
# HACK - hopefully temporary
|
||||
if($oursval =~ m/^\s+$/ && $theirval =~ m/^\s+$/){
|
||||
$out .= $oursval;
|
||||
next;
|
||||
}
|
||||
if($oursval eq $theirval){
|
||||
$out .= $oursval;
|
||||
next;
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
if($ourstype == 3 || $theirtype == 3){
|
||||
return undef;
|
||||
}
|
||||
# XXX we could do better: on failure of one field, return 2 lines with the fields we _can_ fix
|
||||
# substituted into those lines, leaving only the fail-to-match bits for the user to
|
||||
# deal with. Later.
|
||||
# vars (all 4 cases)
|
||||
if($oursvar ne $theirvar){
|
||||
return undef;
|
||||
}
|
||||
my $m = merge_one_var_maybe($oursvar, $oursval, $theirval);
|
||||
if(! defined $m){
|
||||
return undef;
|
||||
}
|
||||
$out .= $m;
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
# return undef if we can't merge the values; $NAME: VALUE $ or $NAME$ (as appropriate) if we can.
|
||||
sub merge_one_var_maybe {
|
||||
my($varname, $oursval, $theirval) = @_;
|
||||
print TRACE "MVM: -$varname-$oursval-$theirval-\n";
|
||||
my $resolvedas;
|
||||
{
|
||||
no strict;
|
||||
my $fn = "PREFIX::$varname";
|
||||
if(defined &$fn){
|
||||
$resolvedas = &$fn($PREFIX,$varname,$oursval, $theirval);
|
||||
} else {
|
||||
$resolvedas = undef; # can't resolve
|
||||
}
|
||||
}
|
||||
|
||||
if(!defined $resolvedas){
|
||||
$::count++; # we have an externally visible conflict
|
||||
return undef;
|
||||
} else {
|
||||
return $resolvedas;
|
||||
}
|
||||
# NOTREACHED
|
||||
}
|
||||
|
||||
package PREFIX;
|
||||
# Resolve the conflict of a single var's 2 values. Return undef to leave the conflict.
|
||||
sub Date {
|
||||
my($PREFIX, $varname, $mine, $theirs) = @_;
|
||||
my $m = ($mine =~ m/(\d+)/)[0];
|
||||
my $t = ($theirs =~ m/(\d+)/)[0];
|
||||
return undef unless ($m>0) && ($t>0);
|
||||
|
||||
return "\$$PREFIX-$varname: " . (($m>$t)?$mine:$theirs) .' $';
|
||||
}
|
||||
|
||||
#sub Header {
|
||||
#sub Author {
|
||||
|
||||
sub Branch {
|
||||
my($PREFIX, $varname, $mine, $theirs) = @_;
|
||||
$mine =~ s/^\s+//; $mine =~ s/\s+$//;
|
||||
$theirs =~ s/^\s+//; $theirs =~ s/\s+$//;
|
||||
return "\$$PREFIX-$varname: $mine \$" if(length $mine);
|
||||
return "\$$PREFIX-$varname: $theirs \$" if(length $theirs);
|
||||
return "\$$PREFIX-$varname\$" if(length $theirs);
|
||||
}
|
||||
|
||||
sub Revision {
|
||||
my($PREFIX, $varname, $mine, $theirs) = @_;
|
||||
my($m) = ($mine =~ m/1.(\d+)/);
|
||||
my($t) = ($theirs =~ m/1.(\d+)/);
|
||||
if($m > 0 && $t > 0){
|
||||
my $q = ($m > $t) ? $m : $t;
|
||||
return "\$$PREFIX-$varname: 1.$q \$";
|
||||
}
|
||||
if($m > 0){
|
||||
return "\$$PREFIX-$varname: 1.$m \$";
|
||||
}
|
||||
if($t > 0){
|
||||
return "\$$PREFIX-$varname: 1.$t \$";
|
||||
}
|
||||
return "\$$PREFIX-$varname\$";
|
||||
}
|
||||
__END__
|
||||
|
||||
TEST 1:
|
||||
<<< d1
|
||||
$TEST-Date: 1 $
|
||||
===
|
||||
$TEST-Date: 3 $
|
||||
>>> d3
|
||||
|
||||
TEST 2:
|
||||
nothing
|
||||
at all
|
||||
|
||||
TEST 3:
|
||||
<<< d1
|
||||
a line
|
||||
===
|
||||
one line
|
||||
two lines
|
||||
>>> d3
|
||||
|
||||
TEST 4:
|
||||
<<< d1
|
||||
$TEST-Date: 1 $ yes
|
||||
===
|
||||
$TEST-Date: 1 $ no
|
||||
>>> d3
|
||||
|
||||
TEST 5:
|
||||
<<< d1
|
||||
$TEST-Date: 3 $ yes
|
||||
===
|
||||
$TEST-Date: 1 $ yes
|
||||
>>> d3
|
||||
|
||||
TEST 6:
|
||||
<<< d1
|
||||
$TEST-Date: 3 $ yes$TEST-Date: 4 $
|
||||
===
|
||||
$TEST-Date: 1 $ yes$TEST-Date: 5 $
|
||||
>>> d3
|
||||
|
||||
TEST 7:
|
||||
<<< d1
|
||||
$TEST-Branch: mine $
|
||||
===
|
||||
$TEST-Branch: theirs $
|
||||
>>> d3
|
||||
|
||||
TEST 8:
|
||||
<<< d1
|
||||
/* NetHack 3.7 objnam.c $TEST-Date$ $TEST-Branch$:$TEST-Revision$ */
|
||||
===
|
||||
/* NetHack 3.7 objnam.c $TEST-Date: 1426977394 2015/03/21 22:36:34 $ $TEST-Branch: master $:$TEST-Revision: 1.108 $ */
|
||||
>>> d3
|
@ -1,161 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 NHtext $NHDT-Date: 1596498408 2020/08/03 23:46:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# clean/smudge filter for handling substitutions
|
||||
use strict;
|
||||
|
||||
#my $debug = 0; # save trace to file
|
||||
#my $debug2 = 0; # annotate output when running from command line
|
||||
|
||||
#my $sink = ($^O eq "MSWin32")? "NUL" :"/dev/null";
|
||||
#my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$";
|
||||
#open TRACE, ">>", ($debug==0)? $sink : $dbgfile;
|
||||
|
||||
sub git_config {
|
||||
my($section, $var) = @_;
|
||||
local($_);
|
||||
# Sigh. Without GIT_DIR we have to do it the slow way, and sometimes we don't
|
||||
# have GIT_DIR.
|
||||
if(0 == length($ENV{GIT_DIR})){
|
||||
my $raw = `git config --local --get $section.$var`;
|
||||
chomp($raw);
|
||||
return $raw
|
||||
}
|
||||
open(CONFIG, "<", "$ENV{GIT_DIR}/config") or die "Missing .git/config: $!";
|
||||
while(<CONFIG>){
|
||||
m/^\[$section]/ && do {
|
||||
while(<CONFIG>){
|
||||
m/^\s+$var\s+=\s+(.*)/ && do {
|
||||
return $1;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
die "Missing config var: [$section] $var\n";
|
||||
}
|
||||
# pick up the prefix for substitutions in this repo
|
||||
my $PREFIX = &git_config('nethack','substprefix');
|
||||
|
||||
my $submode = 0; # ok to make non-cleaning changes to file
|
||||
my $mode;
|
||||
|
||||
if($ARGV[0] eq "--clean"){
|
||||
$mode = "c";
|
||||
if(0 == 0+$ENV{NHMODE}){
|
||||
$submode = 1; # do NOT add extra changes to the file
|
||||
# print TRACE "SKIPPING\n";
|
||||
}
|
||||
} elsif($ARGV[0] eq "--smudge"){
|
||||
$mode = "s";
|
||||
} else {
|
||||
warn "Unknown mode '$ARGV[0]'\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# XXX for now, there isn't any - if we get called, we subst. No options for now.
|
||||
# get relevent config info
|
||||
#XXX
|
||||
#git check-attr -a $ARGV[1]
|
||||
|
||||
# Process stdin to stdout.
|
||||
# For speed we read in the entire file then do the substitutions.
|
||||
|
||||
local($_) = '';
|
||||
my $len;
|
||||
while(1){
|
||||
# On at least some systems we only get 64K.
|
||||
my $len = sysread(STDIN, $_, 999999, length($_));
|
||||
last if($len == 0);
|
||||
die "read failed: $!" unless defined($len);
|
||||
}
|
||||
|
||||
# $1 - var and value (including trailing space but not $)
|
||||
# $2 - var
|
||||
# $4 - value or undef
|
||||
# s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\$/&handlevar($2,$4)/eg;
|
||||
s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2,$4)/ego;
|
||||
|
||||
die "write failed: $!" unless defined syswrite(STDOUT, $_);
|
||||
exit 0;
|
||||
|
||||
sub handlevar {
|
||||
my($var, $val) = @_;
|
||||
# print "HIT '$var' '$val'\n" if($debug2);
|
||||
|
||||
my $subname = "PREFIX::$var";
|
||||
if(defined &$subname){
|
||||
no strict;
|
||||
$val =~ s/\s+$//;
|
||||
$val = &$subname($val,$mode,$submode);
|
||||
} else {
|
||||
warn "No handler for \$$PREFIX-$var\n";
|
||||
}
|
||||
|
||||
if(length $val){
|
||||
return "\$$PREFIX-$var: $val \$";
|
||||
} else {
|
||||
return "\$$PREFIX-$var\$";
|
||||
}
|
||||
}
|
||||
|
||||
package PREFIX;
|
||||
use POSIX qw(strftime);
|
||||
|
||||
# On push, put in the current date because we changed the file.
|
||||
# On pull, keep the current value so we can see the last change date.
|
||||
sub Date {
|
||||
my($val, $mode, $submode) = @_;
|
||||
if($mode eq "c"){
|
||||
if($submode==0){
|
||||
# we add this to make merge easier for now XXX
|
||||
my $now = time; # not %s below - may not be portable
|
||||
# YYYY/MM/DD HH:MM:SS
|
||||
$val = "$now " . strftime("%Y/%m/%d %H:%M:%S", gmtime($now));
|
||||
}
|
||||
}
|
||||
# if($mode eq "s"){
|
||||
# }
|
||||
return $val;
|
||||
}
|
||||
|
||||
#sub Header {
|
||||
#}
|
||||
#sub Author {
|
||||
#}
|
||||
|
||||
# NB: the standard-ish Revision line isn't enough - you need Branch:Revision -
|
||||
# but we split it into 2 so we can use the standard processing code on Revision
|
||||
# and just slip Branch in.
|
||||
sub Branch {
|
||||
my($val, $mode, $submode) = @_;
|
||||
if($mode eq "c"){
|
||||
if($submode==0){
|
||||
$val = `git symbolic-ref -q --short HEAD`;
|
||||
$val =~ s/[\n\r]*$//;
|
||||
$val =~ s/^\*\s*//;
|
||||
$val = "(unknown)" unless($val =~ m/^[[:print:]]+$/);
|
||||
}
|
||||
}
|
||||
# if($mode eq "s"){
|
||||
# }
|
||||
return $val;
|
||||
}
|
||||
|
||||
sub Revision {
|
||||
my($val, $mode, $submode) = @_;
|
||||
if($mode eq "c"){
|
||||
if($submode==0){
|
||||
my $file = $ARGV[1];
|
||||
my @val = `git log --follow --oneline $file`;
|
||||
my $ver = 0+$#val;
|
||||
$ver = 0 if($ver < 0);
|
||||
$val = "1.$ver";
|
||||
}
|
||||
}
|
||||
# if($mode eq "s"){
|
||||
# }
|
||||
return $val;
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
.git/hooks
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 applypatch-msg $NHDT-Date: 1596498405 2020/08/03 23:46:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 commit-msg $NHDT-Date: 1596498405 2020/08/03 23:46:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,521 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# $NHDT-Date: 1524689646 2018/04/25 20:54:06 $ Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.7 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# Note: was originally called nhdate; the rename is not reflected in the code.
|
||||
|
||||
use strict;
|
||||
our %opt; #cmd v n f F m (other single char, but we don't care)
|
||||
my $mode; # a c d f (add, commit, date, date -f)
|
||||
|
||||
if(length $ENV{GIT_PREFIX}){
|
||||
chdir($ENV{GIT_PREFIX}) or die "Can't chdir $ENV{GIT_PREFIX}: $!";
|
||||
}
|
||||
|
||||
#SO how do we know if a file has changed?
|
||||
#(git status: git status --porcelain --ignored -- FILES.
|
||||
#maybe + -z but it's a question of rename operations - probably doesn't
|
||||
# matter, but need to experiment.
|
||||
|
||||
# key: [dacf] first character of opt{cmd} (f if nhsub -f or add -f)
|
||||
# first 2 chars of "git status --porcelain --ignored"
|
||||
# (see "git help status" for table)
|
||||
# No default. Undef means something unexpected happened.
|
||||
my %codes = (
|
||||
'f M'=>1, 'f D'=>1, # [MD] not updated
|
||||
'a M'=>0, 'a D'=>0,
|
||||
'd M'=>0, 'd D'=>0,
|
||||
'c M'=>0, 'c D'=>0,
|
||||
|
||||
'dM '=>0, 'dMM'=>1, 'dMD'=>0,
|
||||
'aM '=>0, 'aMM'=>1, 'aMD'=>0,
|
||||
'cM '=>0, 'cMM'=>1, 'cMD'=>0,
|
||||
'fM '=>0, 'fMM'=>1, 'fMD'=>0,
|
||||
# M [ MD] updated in index
|
||||
|
||||
'dA '=>1, 'dAM'=>1, 'dAD'=>1,
|
||||
'aA '=>1, 'aAM'=>1, 'aAD'=>1,
|
||||
'cA '=>1, 'cAM'=>1, 'cAD'=>1,
|
||||
'fA '=>1, 'fAM'=>1, 'fAD'=>1,
|
||||
# A [ MD] added to index
|
||||
|
||||
'dD '=>0, 'dDM'=>0,
|
||||
'aD '=>1, 'aDM'=>1,
|
||||
'cD '=>0, 'cDM'=>0,
|
||||
'fD '=>1, 'fDM'=>1,
|
||||
# D [ M] deleted from index
|
||||
|
||||
'dR '=>0, 'dRM'=>1, 'dRD'=>0,
|
||||
'aR '=>0, 'aRM'=>1, 'aRD'=>0,
|
||||
'cR '=>0, 'cRM'=>1, 'cRD'=>0,
|
||||
'fR '=>0, 'fRM'=>1, 'fRD'=>0,
|
||||
# R [ MD] renamed in index
|
||||
|
||||
'dC '=>0, 'dCM'=>1, 'dCD'=>0,
|
||||
'aC '=>0, 'aCM'=>1, 'aCD'=>0,
|
||||
'cC '=>0, 'cCM'=>1, 'cCD'=>0,
|
||||
'fC '=>0, 'fCM'=>1, 'fCD'=>0,
|
||||
# C [ MD] copied in index
|
||||
|
||||
'aM '=>1, 'aA '=>1, 'aR '=>1, 'aC '=>1,
|
||||
'fM '=>1, 'fA '=>1, 'fR '=>1, 'fC '=>1,
|
||||
# [MARC] index and work tree matches
|
||||
|
||||
'd M'=>1, 'dMM'=>1, 'dAM'=>1, 'dRM'=>1, 'dCM'=>1,
|
||||
'a M'=>1, 'aMM'=>1, 'aAM'=>1, 'aRM'=>1, 'aCM'=>1,
|
||||
'c M'=>1, 'cMM'=>1, 'cAM'=>1, 'cRM'=>1, 'cCM'=>1,
|
||||
'f M'=>1, 'fMM'=>1, 'fAM'=>1, 'fRM'=>1, 'fCM'=>1,
|
||||
# [ MARC] M work tree changed since index
|
||||
|
||||
'd D'=>0, 'dMD'=>0, 'dAD'=>0, 'dRD'=>0, 'dCD'=>0,
|
||||
'a D'=>0, 'aMD'=>0, 'aAD'=>0, 'aRD'=>0, 'aCD'=>0,
|
||||
'c D'=>0, 'cMD'=>0, 'cAD'=>0, 'cRD'=>0, 'cCD'=>0,
|
||||
'f D'=>0, 'fMD'=>0, 'fAD'=>0, 'fRD'=>0, 'fCD'=>0,
|
||||
# [ MARC] D deleted in work tree
|
||||
|
||||
# -------------------------------------------------
|
||||
# DD unmerged, both deleted
|
||||
# AU unmerged, added by us
|
||||
# UD unmerged, deleted by them
|
||||
# UA unmerged, added by them
|
||||
# DU unmerged, deleted by us
|
||||
# AA unmerged, both added
|
||||
# UU unmerged, both modified
|
||||
# -------------------------------------------------
|
||||
'a??'=>1, 'f??'=>1, # ?? untracked
|
||||
'd??'=>0, 'c??'=>0,
|
||||
|
||||
'f!!'=>1, # !! ignored
|
||||
'a!!'=>0, 'd!!'=>0, 'c!!'=>0,
|
||||
|
||||
'f@@'=>1, # @@ internal ignored
|
||||
'a@@'=>0, 'd@@'=>0, 'c@@'=>0
|
||||
);
|
||||
|
||||
# OS hackery
|
||||
my $PDS = '/';
|
||||
if ($^O eq "MSWin32")
|
||||
{
|
||||
$PDS = '\\';
|
||||
}
|
||||
|
||||
# various command line options to consider and what the code actually does:
|
||||
#DONE nhcommit with no files should exit(0)
|
||||
#DONE nhadd with no files should exit(0)
|
||||
#DONE commit -a?
|
||||
# add root dir
|
||||
#DONE commit -a + files -> exit(0)
|
||||
#nothing: commit --interactive/--patch
|
||||
#nothing: add -i/--interactive --patch/-p?
|
||||
#nothing: add -u/--update?????? -A/--all/--no-ignore-removal???
|
||||
#nothing (not quite right): add --no-all --ignore-removal???
|
||||
#DONE add --refresh
|
||||
#nothing: add -N/--intent-to-add
|
||||
#DONE add -n - exit(0)
|
||||
#DONE add --dry-run - exit 0
|
||||
#DONE commit --dry-run - exit 0
|
||||
#DONE?: add foo/\*/x (letting git expand the filenames)
|
||||
|
||||
my @rawlist0 = &cmdparse(@ARGV);
|
||||
|
||||
# Use git ls-files to expand command line filepaths with wildcards.
|
||||
# Let's try this for all commands.
|
||||
my @rawlist;
|
||||
foreach my $e (@rawlist0){
|
||||
if($e =~ m/[?*[\\]/){
|
||||
my @rv = &lsfiles(undef, $e);
|
||||
push(@rawlist, @rv) if(@rv);
|
||||
if($opt{f}){
|
||||
my @rv = &lsfiles('-i', $e);
|
||||
push(@rawlist, @rv) if(@rv);
|
||||
}
|
||||
} else {
|
||||
push(@rawlist, $e);
|
||||
}
|
||||
}
|
||||
|
||||
push(@rawlist,'.') if($#rawlist == -1);
|
||||
|
||||
# pick up the prefix for substitutions in this repo
|
||||
#TEST my $PREFIX = &git_config('nethack','substprefix');
|
||||
my $PREFIX = "NHDT";
|
||||
print "PREFIX: '$PREFIX'\n" if($opt{v});
|
||||
|
||||
while(@rawlist){
|
||||
my $raw = shift @rawlist;
|
||||
if(-f $raw){
|
||||
&schedule_work($raw);
|
||||
next;
|
||||
}
|
||||
if(-d $raw){
|
||||
if($raw =~ m!$PDS.git$!o){
|
||||
print "SKIP $raw\n" if($opt{v}>=2);
|
||||
next;
|
||||
}
|
||||
opendir RDIR,$raw or die "Can't opendir: $raw";
|
||||
local($_); # needed until perl 5.11.2
|
||||
while($_ = readdir RDIR){
|
||||
next if(m/^\.\.?$/);
|
||||
if(m/^\./ && $opt{f}){
|
||||
print " IGNORE-f: $raw$PDS$_\n" if($opt{v}>=2);
|
||||
next;
|
||||
}
|
||||
push(@rawlist, $raw.$PDS.$_);
|
||||
}
|
||||
closedir RDIR;
|
||||
}
|
||||
# ignore other file types
|
||||
if(! -e $raw){
|
||||
print "warning: missing file $raw\n";
|
||||
}
|
||||
}
|
||||
|
||||
# XXX could batch things up - later
|
||||
|
||||
sub schedule_work {
|
||||
my($file) = @_;
|
||||
print "CHECK: '$file'\n" if($opt{v}>=2);
|
||||
local($_) = `git status --porcelain --ignored -- $file`;
|
||||
my $key = $mode . join('',(m/^(.)(.)/));
|
||||
if(length $key == 1){
|
||||
# Hack. An unmodified, tracked file produces no output from
|
||||
# git status. Treat as another version of 'ignored'.
|
||||
$key .= '@@';
|
||||
}
|
||||
$key =~ s/-/ /g; # for Keni's locally mod'ed git
|
||||
if(!exists $codes{$key}){
|
||||
die "I'm lost.\nK='$key' F=$file\nST=$_";
|
||||
}
|
||||
if($codes{$key}==0){
|
||||
if($opt{v}>=2){
|
||||
print " IGNORE: $_" if(length);
|
||||
print " IGNORE: !! $file\n" if(!length);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if($opt{F}){
|
||||
my $ign = `git check-ignore $file`;
|
||||
if($ign !~ m/^\s*$/){
|
||||
print " IGNORE-F: $ign" if($opt{v}>=2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
# FALLTHROUGH and continue
|
||||
#print "ACCEPT TEST\n"; # XXXXXXXXXX TEST
|
||||
#return;
|
||||
|
||||
my $attr = `git check-attr NHSUBST -- $file`;
|
||||
if($attr =~ m/NHSUBST:\s+(.*)/){
|
||||
# XXX this is a bug in git. What if the value of an attribute is the
|
||||
# string "unset"? Sigh.
|
||||
if(! $opt{F}){
|
||||
if($1 eq "unset" || $1 eq "unspecified"){
|
||||
print " NOATTR: $attr" if($opt{v}>=2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
&process_file($file);
|
||||
return;
|
||||
}
|
||||
die "Can't parse check-attr return: $attr\n";
|
||||
}
|
||||
|
||||
sub process_file {
|
||||
my($file) = @_;
|
||||
print "DOFIL: $file\n" if($opt{v}>=1);
|
||||
|
||||
# For speed we read in the entire file then do the substitutions.
|
||||
local($_) = '';
|
||||
my $len;
|
||||
open INFILE, "<", $file or die "Can't open $file: $!";
|
||||
while(1){
|
||||
# On at least some systems we only get 64K.
|
||||
my $len = sysread(INFILE, $_, 999999, length($_));
|
||||
last if($len == 0);
|
||||
die "read failed: $!" unless defined($len);
|
||||
}
|
||||
close INFILE;
|
||||
|
||||
local $::current_file = $file; # used under handlevar
|
||||
# $1 - var and value (including trailing space but not $)
|
||||
# $2 - var
|
||||
# $4 - value or undef
|
||||
#s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\$/&handlevar($2,$4)/eg;
|
||||
my $count = s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2,$4)/eg;
|
||||
# XXX had o modifier, why?
|
||||
return unless($count>0);
|
||||
return if($opt{n});
|
||||
my $mode = 0777 & (stat($file))[2];
|
||||
|
||||
my $ofile = $file . ".nht";
|
||||
open(TOUT, ">", $ofile) or die "Can't open $ofile";
|
||||
|
||||
# die "write failed: $!" unless defined syswrite(TOUT, $_);
|
||||
my $offset = 0;
|
||||
my $sent;
|
||||
#print STDERR "L=",length,"\n";
|
||||
while($offset < length){
|
||||
$sent = syswrite(TOUT, $_, (length($_) - $offset), $offset);
|
||||
die "write failed: $!" unless defined($sent);
|
||||
#print STDERR "rv=$sent\n";
|
||||
last if($sent == (length($_) - $offset));
|
||||
$offset += $sent;
|
||||
#print STDERR "loop: O=$offset\n";
|
||||
}
|
||||
|
||||
close TOUT or die "Can't close $ofile";
|
||||
# Do the right thing for *nix and hope for the best elsewhere:
|
||||
chmod($mode, $ofile)==1 or warn "Can't set filemode on $ofile";
|
||||
rename $ofile, $file or die "Can't rename $ofile to $file";
|
||||
}
|
||||
|
||||
# XXX docs for --fixup and --squash are wrong in git's synopsis. --file missing
|
||||
# --message --template -t
|
||||
sub cmdparse {
|
||||
my(@in) = @_;
|
||||
|
||||
# What are we doing?
|
||||
$opt{cmd} = 'date'; # really nhsub
|
||||
if($in[0] eq '--add'){
|
||||
$opt{cmd} = 'add';
|
||||
shift @in;
|
||||
}
|
||||
if($in[0] eq '--commit'){
|
||||
$opt{cmd} = 'commit';
|
||||
shift @in;
|
||||
}
|
||||
|
||||
# add: -n -v
|
||||
# commit: --dry-run -v
|
||||
# nhsub: -n -v
|
||||
while($in[0] =~ m/^-/){
|
||||
local($_) = $in[0];
|
||||
if($_ eq '--'){
|
||||
shift @in;
|
||||
last;
|
||||
}
|
||||
if(m/^--/){
|
||||
if($opt{cmd} eq 'add' && $_ eq '--dry-run'){
|
||||
exit 0;
|
||||
}
|
||||
if($opt{cmd} eq 'commit' && $_ eq '--dry-run'){
|
||||
exit 0;
|
||||
}
|
||||
if($opt{cmd} eq 'add' && $_ eq '--refresh'){
|
||||
exit 0;
|
||||
}
|
||||
shift @in;
|
||||
next;
|
||||
}
|
||||
# XXX this is messy - time for a rewrite?
|
||||
if(m/^-(.*)/){
|
||||
foreach my $single ( split(//,$1) ){
|
||||
# don't do -v here from add/commit
|
||||
if($single ne 'v'){
|
||||
# don't use -m from add/commit
|
||||
if($opt{cmd} eq 'date' || $single ne 'm'){
|
||||
$opt{$single}++;
|
||||
}
|
||||
} elsif($opt{cmd} eq 'date'){
|
||||
$opt{$single}++;
|
||||
}
|
||||
|
||||
if($opt{cmd} eq 'add' && $single eq 'n'){
|
||||
exit 0;
|
||||
}
|
||||
#need to deal with options that eat a following element (-m, -F etc etc)
|
||||
#add: nothing?
|
||||
#commit: -c -C -F -m
|
||||
# -u<mode> mode is optional
|
||||
# -S<keyid> keyid is optional
|
||||
if($opt{cmd} eq 'commit'){
|
||||
if($single =~ m/[uS]/){
|
||||
last;
|
||||
}
|
||||
if($single =~ m/[cCFm]/){
|
||||
#XXX this will be a mess if the argument is wrong, but can we tell? No.
|
||||
shift @in;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
shift @in;
|
||||
}
|
||||
|
||||
($mode) = ($opt{cmd} =~ m/^(.)/);
|
||||
$mode = 'f' if($opt{cmd} eq 'date' && ($opt{f}||$opt{F}));
|
||||
$mode = 'f' if($opt{cmd} eq 'add' && $opt{f});
|
||||
|
||||
if($opt{cmd} eq 'add' && $#in == -1){
|
||||
exit 0;
|
||||
}
|
||||
if($opt{cmd} eq 'commit' && $#in == -1){
|
||||
exit 0;
|
||||
}
|
||||
if($opt{cmd} eq 'add' && $opt{a} && $#in != -1){
|
||||
exit 0;
|
||||
}
|
||||
if($opt{cmd} eq 'add' && $opt{a}){
|
||||
my $x = `git rev-parse --show-toplevel`;
|
||||
$x =~ s/[\n\r]+$//;
|
||||
push(@in, $x);
|
||||
}
|
||||
return @in; # this is our file list
|
||||
}
|
||||
|
||||
sub git_config {
|
||||
my($section, $var) = @_;
|
||||
my $raw = `git config --local --get $section.$var`;
|
||||
$raw =~ s/[\r\n]*$//g;
|
||||
return $raw if(length $raw);
|
||||
die "Missing config var: [$section] $var\n";
|
||||
}
|
||||
|
||||
sub handlevar {
|
||||
my($var, $val) = @_;
|
||||
# print "HIT '$var' '$val'\n" if($debug2);
|
||||
|
||||
my $subname = "PREFIX::$var";
|
||||
if(defined &$subname){
|
||||
no strict;
|
||||
print " SUBIN: $var '$val'\n" if($opt{v}>=3);
|
||||
$val =~ s/\s+$//;
|
||||
$val = &$subname($val);
|
||||
print " SUBOT: $var '$val'\n" if($opt{v}>=3);
|
||||
} else {
|
||||
warn "No handler for \$$PREFIX-$var\n";
|
||||
}
|
||||
|
||||
if(length $val){
|
||||
return "\$$PREFIX-$var: $val \$";
|
||||
} else {
|
||||
return "\$$PREFIX-$var\$";
|
||||
}
|
||||
}
|
||||
|
||||
sub lsfiles {
|
||||
my ($flags, $ps) = @_;
|
||||
open RV, "-|", "git ls-files $flags '$ps'" or die "Can't ls-files";
|
||||
my @rv = <RV>;
|
||||
map { s/[\r\n]+$// } @rv;
|
||||
if(!close RV){
|
||||
return undef if($! == 0);
|
||||
die "close ls-files failed: $!";
|
||||
}
|
||||
return undef if($#rv == -1);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
package PREFIX;
|
||||
use POSIX qw(strftime);
|
||||
|
||||
# On push, put in the current date because we changed the file.
|
||||
# On pull, keep the current value so we can see the last change date.
|
||||
sub Date {
|
||||
my($val) = @_;
|
||||
my $now;
|
||||
if($opt{m}){
|
||||
my $hash = `git log -1 '--format=format:%H' $::current_file`;
|
||||
#author keni <keni@his.com> 1429884677 -0400
|
||||
chomp($now = `git cat-file -p $hash | awk '/author/{print \$4}'`);
|
||||
} else {
|
||||
$now = time;
|
||||
}
|
||||
# YYYY/MM/DD HH:MM:SS
|
||||
$val = "$now " . strftime("%Y/%m/%d %H:%M:%S", gmtime($now));
|
||||
return $val;
|
||||
}
|
||||
|
||||
#sub Header {
|
||||
#}
|
||||
#sub Author {
|
||||
#}
|
||||
|
||||
# NB: the standard-ish Revision line isn't enough - you need Branch:Revision -
|
||||
# but we split it into 2 so we can use the standard processing code on Revision
|
||||
# and just slip Branch in.
|
||||
sub Branch {
|
||||
my($val) = @_;
|
||||
$val = `git symbolic-ref -q --short HEAD`;
|
||||
$val =~ s/[\n\r]*$//;
|
||||
$val =~ s/^\*\s*//;
|
||||
$val = "(unknown)" unless($val =~ m/^[[:print:]]+$/);
|
||||
return $val;
|
||||
}
|
||||
|
||||
sub Revision {
|
||||
my($val) = @_;
|
||||
my @val = `git log --follow --oneline $::current_file`;
|
||||
my $ver = 0+$#val;
|
||||
$ver = 0 if($ver < 0);
|
||||
$val = "1.$ver";
|
||||
return $val;
|
||||
}
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
C<nhsub> - NetHack git command for substitution variables
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
C<git nhsub [-v[v[v]] [-n] [-f|-F] [-m] [--] [file...]>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<nhsub> rewrites the specified files by doing variable substitution for
|
||||
variables starting with the prefix specified in the repository's
|
||||
C<nethack.substprefix> configuration variable. C<nhsub> is also invoked
|
||||
internally from the implementation of the C<nhadd> and C<nhcommit>
|
||||
commands.
|
||||
|
||||
The program re-writes those files listed on the command line; if the file
|
||||
is actually a directory, the program recurses into that directory tree.
|
||||
Not all files found are re-written; some are ignored and those with no
|
||||
substitution variables are not re-written. Unless changed by the options,
|
||||
files that have not changed are not affected.
|
||||
|
||||
If no files are listed on the command line, the current directory is
|
||||
checked as if specified as C<.>.
|
||||
Files listed directly on the command line are always checked.
|
||||
The C<.git> directory is never processed.
|
||||
|
||||
The following command line options are available:
|
||||
|
||||
=over
|
||||
|
||||
=item C<-v[v[v]]>
|
||||
|
||||
Verbose output; may be (usefully) specified up to 3 times. Not available
|
||||
when invoked as part of C<nhadd> or C<nhcommit>.
|
||||
|
||||
=item C<-n>
|
||||
|
||||
Do not write any files.
|
||||
|
||||
=item C<-f>
|
||||
|
||||
Force, version 1:
|
||||
Perform substitution even if the file has not changed,
|
||||
except no dot files are processed unless listed directly on the command line.
|
||||
This prevents accidents with editor temporary files while recursing. Note
|
||||
that this overloads the C<-f> option of C<git add> and C<git commit>.
|
||||
|
||||
=item C<-F>
|
||||
|
||||
Force, version 2:
|
||||
Perform substitution even if the file has not changed,
|
||||
even if the NHSUBST attribute is not set for the
|
||||
file, and only if the file is not ignored by git. Not available
|
||||
when invoked as part of C<nhadd> or C<nhcommit>.
|
||||
|
||||
=item C<-m>
|
||||
|
||||
Use metadata (C<git log> and C<git cat-file>) to find the last change date to
|
||||
substitute. Often used with C<-f>. This is useful for cleaning up dates in files that were not
|
||||
updated when last changed. (Do not use C<git nhadd>/C<git nhcommit> after C<nhsub -m>
|
||||
or the changes will be overwritten with the current date.)
|
||||
|
||||
=back
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# $NHDT-Date: 1524689631 2018/04/25 20:53:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.1 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 post-checkout $NHDT-Date: 1596498409 2020/08/03 23:46:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::nhversioning;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 post-commit $NHDT-Date: 1596498409 2020/08/03 23:46:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::nhversioning;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,34 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 post-merge $NHDT-Date: 1596498410 2020/08/03 23:46:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::nhversioning;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,34 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 post-rewrite $NHDT-Date: 1596498411 2020/08/03 23:46:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::saveSTDIN;
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::resetSTDIN;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 pre-applypatch $NHDT-Date: 1596498411 2020/08/03 23:46:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 pre-auto-gc $NHDT-Date: 1596498412 2020/08/03 23:46:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 pre-commit $NHDT-Date: 1596498413 2020/08/03 23:46:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,34 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 pre-push $NHDT-Date: 1596498413 2020/08/03 23:46:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::saveSTDIN;
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::resetSTDIN;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 pre-rebase $NHDT-Date: 1596498414 2020/08/03 23:46:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# $NHDT-Date: 1524689633 2018/04/25 20:53:53 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.1 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
#STARTUP-START
|
||||
BEGIN {
|
||||
# OS hackery has to be duplicated in each of the hooks :/
|
||||
# first the directory separator
|
||||
my $DS = quotemeta('/');
|
||||
my $PDS = '/';
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
# temporarily removed because inconsistent behavior
|
||||
# if ($^O eq "msys")
|
||||
# {
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# }
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$PDS = '\\';
|
||||
}
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
}
|
||||
use NHgithook;
|
||||
#STARTUP-END
|
||||
|
||||
&NHgithook::PRE;
|
||||
&NHgithook::POST;
|
||||
exit 0;
|
@ -1,341 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# $NHDT-Date: 1693357449 2023/08/30 01:04:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# value of nethack.setupversion we will end up with when this is done
|
||||
# version 1 is reserved for repos checked out before versioning was added
|
||||
my $version_new = 3;
|
||||
my $version_old = 0; # current version, if any (0 is no entry ergo new repo)
|
||||
|
||||
use Cwd;
|
||||
use Getopt::Std;
|
||||
|
||||
# Activestate Perl doesn't include File::Spec. Grr.
|
||||
BEGIN {
|
||||
eval "require File::Spec::Functions";
|
||||
if($@){
|
||||
die <<E_O_M;
|
||||
File::Spec not found. (If you are running ActiveState Perl please run:
|
||||
cpan File::Spec
|
||||
and re-run this program.
|
||||
E_O_M
|
||||
}
|
||||
File::Spec::Functions->import;
|
||||
}
|
||||
|
||||
exit 1 unless(getopts('nvf')); # TODO: this can probably have better output
|
||||
|
||||
# OS hackery
|
||||
my $DS = quotemeta('/'); # Directory Separator (for regex)
|
||||
my $DSP = '/'; # ... for printing
|
||||
# Temporarily disabled; there's something weird about msys
|
||||
# msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
|
||||
#if($^O eq "msys"){
|
||||
# $/ = "\r\n";
|
||||
# $\ = "\r\n";
|
||||
# # NB: We don't need to do anything about File::Spec. It doesn't know
|
||||
# # about msys but it defaults to Unix, so we'll be ok.
|
||||
#}
|
||||
if($^O eq "MSWin32"){
|
||||
$DS = quotemeta('\\');
|
||||
$DSP = '\\';
|
||||
}
|
||||
|
||||
# make sure we're at the top level of a repo
|
||||
if(! -d ".git"){
|
||||
die "This is not the top level of a git repository.\n";
|
||||
}
|
||||
|
||||
my $vtemp = `git config --local --get nethack.setupversion`;
|
||||
chomp($vtemp);
|
||||
if($vtemp > 0){
|
||||
$version_old = 0+$vtemp;
|
||||
if($version_old != $version_new){
|
||||
print STDERR "Migrating from setup version $version_old to $version_new\n" if($opt_v);
|
||||
}
|
||||
}
|
||||
# legacy check:
|
||||
if(length $vtemp == 0){
|
||||
if(`git config --get merge.NHsubst.name` =~ m/^Net/){
|
||||
$version_old = 1;
|
||||
print STDERR "Migrating to setup version 1\n" if($opt_v);
|
||||
}
|
||||
}
|
||||
|
||||
my $gitadddir = `git config --get nethack.gitadddir`;
|
||||
chomp($gitadddir);
|
||||
if(length $gitadddir){
|
||||
if(! -d $gitadddir){
|
||||
die "nethack.gitadddir has invalid value '$gitadddir'\n";
|
||||
}
|
||||
}
|
||||
print STDERR "nethack.gitadddir=$gitadddir\n" if($opt_v);
|
||||
|
||||
# This is (relatively) safe because we know we're at R in R/DEVEL/nhgitset.pl
|
||||
my $srcdir = ($0 =~ m!^(.*)$DS!)[0];
|
||||
|
||||
if(! -f catfile($srcdir, 'nhgitset.pl')){
|
||||
die "I can't find myself in '$srcdir'\n";
|
||||
}
|
||||
|
||||
print STDERR "Copying from: $srcdir\n" if($opt_v);
|
||||
|
||||
if($opt_f || $version_old==0){
|
||||
print STDERR "Configuring line endings\n" if($opt_v);
|
||||
unlink catfile('.git','index') unless($opt_n);
|
||||
system("git reset") unless($opt_n);
|
||||
system("git config --local core.safecrlf true") unless($opt_n);
|
||||
system("git config --local core.autocrlf false") unless($opt_n);
|
||||
} elsif($version_old <2){
|
||||
my $xx = `git config --get --local core.safecrlf`;
|
||||
if($xx !~ m/true/){
|
||||
print STDERR "\nNeed to 'rm .git${DSP}index;git reset'.\n";
|
||||
print STDERR " When ready to proceed, re-run with -f flag.\n";
|
||||
exit 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
print STDERR "Installing aliases\n" if($opt_v);
|
||||
$addpath = catfile(curdir(),'.git','hooks','NHadd');
|
||||
&add_alias('nhadd', "!$addpath add");
|
||||
&add_alias('nhcommit', "!$addpath commit");
|
||||
my $nhsub = catfile(curdir(),'.git','hooks','nhsub');
|
||||
&add_alias('nhsub', "!$nhsub");
|
||||
|
||||
print STDERR "Installing filter/merge\n" if($opt_v);
|
||||
|
||||
# XXXX need it in NHadd to find nhsub???
|
||||
# removed at version 3
|
||||
#if($^O eq "MSWin32"){
|
||||
# $cmd = '.git\\\\hooks\\\\NHtext';
|
||||
#} else {
|
||||
# $cmd = catfile(curdir(),'.git','hooks','NHtext');
|
||||
#}
|
||||
#&add_config('filter.NHtext.clean', "$cmd --clean %f");
|
||||
#&add_config('filter.NHtext.smudge', "$cmd --smudge %f");
|
||||
if($version_old == 1 or $version_old == 2){
|
||||
print STDERR "Removing filter.NHtext\n" if($opt_v);
|
||||
system('git','config','--unset','filter.NHtext.clean') unless($opt_n);
|
||||
system('git','config','--unset','filter.NHtext.smudge') unless($opt_n);
|
||||
system('git','config','--remove-section','filter.NHtext') unless($opt_n);
|
||||
|
||||
print STDERR "Removing NHtext\n" if($opt_v);
|
||||
unlink catfile(curdir(),'.git','hooks','NHtext') unless($opt_n);
|
||||
}
|
||||
|
||||
$cmd = catfile(curdir(),'.git','hooks','NHsubst');
|
||||
&add_config('merge.NHsubst.name', 'NetHack Keyword Substitution');
|
||||
&add_config('merge.NHsubst.driver', "$cmd %O %A %B %L");
|
||||
|
||||
print STDERR "Running directories\n" if($opt_v);
|
||||
|
||||
foreach my $dir ( glob("$srcdir$DS*") ){
|
||||
next unless(-d $dir);
|
||||
|
||||
my $target = catfile($dir, 'TARGET');
|
||||
next unless(-f $target);
|
||||
|
||||
open TARGET, '<', $target or die "$target: $!";
|
||||
my $targetpath = <TARGET>;
|
||||
# still have to eat all these line endings under msys, so instead of chomp use this:
|
||||
$targetpath =~ s![\r\n]!!g;
|
||||
close TARGET;
|
||||
print STDERR "Directory $dir -> $targetpath\n" if($opt_v);
|
||||
|
||||
my $enddir = $dir;
|
||||
$enddir =~ s!.*$DS!!;
|
||||
if(! &process_override($enddir, "INSTEAD")){
|
||||
&process_override($enddir, "PRE");
|
||||
my $fnname = "do_dir_$enddir";
|
||||
if(defined &$fnname){
|
||||
&$fnname($dir, $targetpath);
|
||||
}
|
||||
&process_override($enddir, "POST");
|
||||
}
|
||||
}
|
||||
|
||||
&check_prefix; # for variable substitution
|
||||
|
||||
if($version_old != $version_new){
|
||||
print STDERR "Setting version to $version_new\n" if($opt_v);
|
||||
if(! $opt_n){
|
||||
system("git config nethack.setupversion $version_new");
|
||||
if($?){
|
||||
die "Can't set nethack.setupversion $version_new: $?,$!\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
sub process_override {
|
||||
my($srcdir, $plname) = @_;
|
||||
return 0 unless(length $gitadddir);
|
||||
|
||||
my $plpath = catfile($gitadddir, $srcdir, $plname);
|
||||
#print STDERR " ",catfile($srcdir, $plname),"\n"; # save this for updating docs - list of overrides
|
||||
return 0 unless(-x $plpath);
|
||||
|
||||
print STDERR "Running $plpath\n" if($opt_v);
|
||||
# current directory is top of target repo
|
||||
|
||||
unless($opt_n){
|
||||
system("$plpath $opt_v") and die "Callout $plpath failed: $?\n";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub add_alias {
|
||||
my($name, $def) = @_;
|
||||
&add_config("alias.$name",$def);
|
||||
}
|
||||
|
||||
sub add_config {
|
||||
my($name, $val) = @_;
|
||||
system('git', 'config', '--local', $name, $val) unless($opt_n);
|
||||
}
|
||||
|
||||
sub check_prefix {
|
||||
my $lcl = `git config --local --get nethack.substprefix`;
|
||||
chomp($lcl);
|
||||
if(0==length $lcl){
|
||||
my $other = `git config --get nethack.substprefix`;
|
||||
chomp($other);
|
||||
if(0==length $other){
|
||||
print STDERR "ERROR: nethack.substprefix is not set anywhere. Set it and re-run.\n";
|
||||
exit 2;
|
||||
} else {
|
||||
&add_config('nethack.substprefix', $other);
|
||||
print STDERR "Copying prefix '$other' to local repository.\n" if($opt_v);
|
||||
}
|
||||
$lcl = $other; # for display below
|
||||
}
|
||||
print "\n\nUsing prefix '$lcl' - PLEASE MAKE SURE THIS IS CORRECT\n\n";
|
||||
}
|
||||
|
||||
sub do_dir_DOTGIT {
|
||||
if(1){
|
||||
# We are NOT going to mess with config now.
|
||||
return;
|
||||
} else {
|
||||
my($srcdir, $targetdir) = @_;
|
||||
#warn "do_dir_DOTGIT($srcdir, $targetdir)\n";
|
||||
my $cname = "$srcdir/config";
|
||||
if(-e $cname){
|
||||
print STDERR "Appending to .git/config\n" if($opt_v);
|
||||
open CONFIG, ">>.git/config" or die "open .git/config: $!";
|
||||
open IN, "<", $cname or die "open $cname: $!";
|
||||
my @data = <IN>;
|
||||
print CONFIG @data;
|
||||
close IN;
|
||||
close CONFIG;
|
||||
} else {
|
||||
print STDERR " Nothing to add to .git/config\n" if($opt_v);
|
||||
}
|
||||
# XXX are there other files in .git that we might want to handle?
|
||||
# So just in case:
|
||||
for my $file ( glob("$srcdir/*") ){
|
||||
next if( $file =~ m!.*/TARGET$! );
|
||||
next if( $file =~ m!.*/config$! );
|
||||
die "ERROR: no handler for $file\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub do_dir_hooksdir {
|
||||
my($srcdir, $targetdir) = @_;
|
||||
|
||||
unless (-d $targetdir){
|
||||
# Older versions of git, when cloning a repo and
|
||||
# the expected source templates directory does not
|
||||
# exist, does not create .git/hooks. So do it here.
|
||||
mkdir $targetdir;
|
||||
print STDERR "WARNING: .git/hooks had to be created.\n";
|
||||
print STDERR " You may want to update git.\n";
|
||||
}
|
||||
|
||||
for my $path ( glob("$srcdir$DS*") ){
|
||||
|
||||
next if( $path =~ m!.*${DS}TARGET$! );
|
||||
|
||||
my $file = $path;
|
||||
|
||||
$file =~ s!.*$DS!!;
|
||||
|
||||
$file = catfile($targetdir, $file);
|
||||
|
||||
next if($opt_n);
|
||||
|
||||
open IN, "<", $path or die "Can't open $path: $!";
|
||||
open OUT, ">", "$file" or die "Can't open $file: $!";
|
||||
while(<IN>){
|
||||
print OUT;
|
||||
}
|
||||
close OUT;
|
||||
close IN;
|
||||
|
||||
if(! -x $file){
|
||||
chmod 0755 ,$file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__END__
|
||||
(can we change the .gitattributes syntax to include a comment character?)
|
||||
maybe [comment] attr.c:parse_attr_line
|
||||
grr - looks like # is the comment character
|
||||
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
nhgitset.pl - Setup program for NetHack git repositories
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
cd THE_REPO
|
||||
[git config nethack.gitadddir GITADDDIR]
|
||||
perl SOME_PATH/DEVEL/nhgitset.pl [-v][-n][-f]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
nhgitset.pl installs NetHack-specific setup after a C<git clone> (or after
|
||||
changes to the desired configuration, which are installed by re-running
|
||||
nhgitset.pl).
|
||||
|
||||
The follwing options are available:
|
||||
|
||||
B<-f> Force. Do not use this unless the program requests it.
|
||||
|
||||
B<-n> Make no changes.
|
||||
|
||||
B<-v> Verbose output.
|
||||
|
||||
=head1 CONFIG
|
||||
|
||||
nhgitset.pl uses the following non-standard C<git config> variables:
|
||||
|
||||
nethack.gitadddir
|
||||
|
||||
DOTGIT/INSTEAD
|
||||
DOTGIT/PRE
|
||||
DOTGIT/POST
|
||||
hooksdir/INSTEAD
|
||||
hooksdir/PRE
|
||||
hooksdir/POST
|
||||
|
||||
nethack.setupversion
|
||||
|
||||
nethack.substprefix
|
||||
|
||||
|
||||
=head1 EXIT STATUS
|
||||
|
||||
0 Success.
|
||||
|
||||
1 Fail.
|
||||
|
||||
2 Intervention required.
|
@ -1,677 +0,0 @@
|
||||
This is a listing of all files in a full NetHack 3.7 distribution, organized
|
||||
in their standard manner on a UNIX system. It indicates which files are
|
||||
necessary for which versions, so that you can tell which files may be deleted
|
||||
from or not transferred to your system if you wish.
|
||||
|
||||
(Note: we ignore various dot files related to git.)
|
||||
|
||||
.:
|
||||
(files in top directory)
|
||||
.clang-format Cross-compiling Files
|
||||
Porting README azure-pipelines.yml
|
||||
|
||||
DEVEL:
|
||||
(files for people developing changes to NetHack)
|
||||
Developer.txt code_features.txt code_style.txt git_recipes.txt
|
||||
gitinfo.pl nhgitset.pl
|
||||
|
||||
DEVEL/DOTGIT:
|
||||
(file for people developing changes to NetHack)
|
||||
TARGET
|
||||
|
||||
DEVEL/hooksdir:
|
||||
(files for people developing changes to NetHack)
|
||||
NHadd NHgithook.pm NHsubst
|
||||
NHtext TARGET applypatch-msg
|
||||
commit-msg nhsub post-applypatch
|
||||
post-checkout post-commit post-merge
|
||||
post-rewrite pre-applypatch pre-auto-gc
|
||||
pre-commit pre-push pre-rebase
|
||||
prepare-commit-msg
|
||||
|
||||
dat:
|
||||
(files for all versions)
|
||||
Arc-fila.lua Arc-filb.lua Arc-goal.lua Arc-loca.lua Arc-strt.lua
|
||||
Bar-fila.lua Bar-filb.lua Bar-goal.lua Bar-loca.lua Bar-strt.lua
|
||||
Cav-fila.lua Cav-filb.lua Cav-goal.lua Cav-loca.lua Cav-strt.lua
|
||||
GENFILES Hea-fila.lua Hea-filb.lua Hea-goal.lua Hea-loca.lua
|
||||
Hea-strt.lua Kni-fila.lua Kni-filb.lua Kni-goal.lua Kni-loca.lua
|
||||
Kni-strt.lua Mon-fila.lua Mon-filb.lua Mon-goal.lua Mon-loca.lua
|
||||
Mon-strt.lua Pri-fila.lua Pri-filb.lua Pri-goal.lua Pri-loca.lua
|
||||
Pri-strt.lua Ran-fila.lua Ran-filb.lua Ran-goal.lua Ran-loca.lua
|
||||
Ran-strt.lua Rog-fila.lua Rog-filb.lua Rog-goal.lua Rog-loca.lua
|
||||
Rog-strt.lua Sam-fila.lua Sam-filb.lua Sam-goal.lua Sam-loca.lua
|
||||
Sam-strt.lua Tou-fila.lua Tou-filb.lua Tou-goal.lua Tou-loca.lua
|
||||
Tou-strt.lua Val-fila.lua Val-filb.lua Val-goal.lua Val-loca.lua
|
||||
Val-strt.lua Wiz-fila.lua Wiz-filb.lua Wiz-goal.lua Wiz-loca.lua
|
||||
Wiz-strt.lua air.lua asmodeus.lua astral.lua baalz.lua
|
||||
bigrm-1.lua bigrm-2.lua bigrm-3.lua bigrm-4.lua bigrm-5.lua
|
||||
bigrm-6.lua bigrm-7.lua bigrm-8.lua bigrm-9.lua bigrm-10.lua
|
||||
bigrm-11.lua bogusmon.txt castle.lua cmdhelp data.base
|
||||
dungeon.lua earth.lua engrave.txt epitaph.txt fakewiz1.lua
|
||||
fakewiz2.lua fire.lua hellfill.lua help hh
|
||||
history juiblex.lua keyhelp knox.lua license
|
||||
medusa-1.lua medusa-2.lua medusa-3.lua medusa-4.lua minefill.lua
|
||||
minend-1.lua minend-2.lua minend-3.lua minetn-1.lua minetn-2.lua
|
||||
minetn-3.lua minetn-4.lua minetn-5.lua minetn-6.lua minetn-7.lua
|
||||
nhcore.lua nhlib.lua opthelp optmenu oracle.lua
|
||||
oracles.txt orcus.lua quest.lua rumors.fal rumors.tru
|
||||
sanctum.lua soko1-1.lua soko1-2.lua soko2-1.lua soko2-2.lua
|
||||
soko3-1.lua soko3-2.lua soko4-1.lua soko4-2.lua symbols
|
||||
themerms.lua tower1.lua tower2.lua tower3.lua tribute
|
||||
usagehlp valley.lua water.lua wizard1.lua wizard2.lua
|
||||
wizard3.lua wizhelp
|
||||
|
||||
doc:
|
||||
(files for all versions)
|
||||
Gbk-1pg-pfx.mn Gbk-1pg-sfx.mn Guidebook.mn Guidebook.tex
|
||||
Guidebook.txt config.nh dlb.6 dlb.txt
|
||||
fixes1-0.txt fixes1-4-f.txt fixes2-2.txt fixes2-3-e.txt
|
||||
fixes3-0.txt fixes3-0-pl01.txt fixes3-0-pl02.txt fixes3-0-pl03.txt
|
||||
fixes3-0-pl04.txt fixes3-0-pl05.txt fixes3-0-pl06.txt fixes3-0-pl07.txt
|
||||
fixes3-0-pl08.txt fixes3-0-pl09.txt fixes3-0-pl10.txt fixes3-1-1.txt
|
||||
fixes3-1-2.txt fixes3-1-3.txt fixes3-2-0.txt fixes3-2-1.txt
|
||||
fixes3-2-2.txt fixes3-2-3.txt fixes3-3-0.txt fixes3-3-1.txt
|
||||
fixes3-4-0.txt fixes3-4-1.txt fixes3-4-2.txt fixes3-4-3.txt
|
||||
fixes3-5-0.txt fixes3-6-0.txt fixes3-6-1.txt fixes3-6-2.txt
|
||||
fixes3-6-3.txt fixes3-6-4.txt fixes3-6-5.txt fixes3-6-6.txt
|
||||
fixes3-6-7.txt fixes3-7-0.txt fixesX-X-X.txt lua.adoc
|
||||
makedefs.6 makedefs.txt mn.7 mn.txt
|
||||
mnh.7 mnh.txt nethack.6 nethack.txt
|
||||
options.txt recover.6 recover.txt sound.txt
|
||||
tmac.n tmac.nh window.txt
|
||||
|
||||
include:
|
||||
(files for X versions)
|
||||
tile2x11.h winX.h xwindow.h xwindowp.h
|
||||
|
||||
(files for all versions)
|
||||
align.h artifact.h artilist.h attrib.h botl.h
|
||||
color.h config.h config1.h context.h coord.h
|
||||
cstd.h decl.h defsym.h dgn_file.h display.h
|
||||
dlb.h dungeon.h engrave.h extern.h flag.h
|
||||
fnamesiz.h func_tab.h global.h hack.h integer.h
|
||||
isaac64.h lint.h mail.h mextra.h mfndpos.h
|
||||
micro.h mkroom.h monattk.h mondata.h monflag.h
|
||||
monst.h monsters.h obj.h objclass.h objects.h
|
||||
optlist.h patchlevel.h pcconf.h permonst.h prop.h
|
||||
quest.h rect.h region.h rm.h seffects.h
|
||||
skills.h sndprocs.h sp_lev.h spell.h sym.h
|
||||
sys.h tcap.h tileset.h timeout.h tradstdc.h
|
||||
trap.h unixconf.h vision.h vmsconf.h warnings.h
|
||||
winami.h wincurs.h windconf.h winprocs.h wintype.h
|
||||
you.h youprop.h
|
||||
|
||||
(file for tty versions)
|
||||
wintty.h
|
||||
|
||||
outdated:
|
||||
(files that are no longer maintained for current game code)
|
||||
.travis.yml
|
||||
|
||||
outdated/dat:
|
||||
(files that are no longer maintained for current game code)
|
||||
symbols
|
||||
|
||||
outdated/include:
|
||||
(files for GEM versions)
|
||||
bitmfile.h gem_rsc.h load_img.h wingem.h
|
||||
|
||||
(file for GNOME versions)
|
||||
winGnome.h
|
||||
|
||||
(files for all versions)
|
||||
amiconf.h beconf.h def_os2.h os2conf.h system.h tosconf.h
|
||||
trampoli.h wceconf.h
|
||||
|
||||
(files for various Macintosh versions)
|
||||
mac-carbon.h mac-qt.h mac-term.h macconf.h macpopup.h
|
||||
mactty.h macwin.h mttypriv.h
|
||||
|
||||
outdated/sys/amiga:
|
||||
(files for Amiga versions - untested for 3.7)
|
||||
Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf
|
||||
amidos.c amidos.p amifont.uu amifont8.uu amigst.c
|
||||
amii.hlp amimenu.c amirip.c amistack.c amitty.c
|
||||
amiwind.c amiwind.p clipwin.c colorwin.c grave16.xpm
|
||||
ifchange mkdmake txt2iff.c winamenu.c winami.c
|
||||
winami.p winchar.c windefs.h winext.h winfuncs.c
|
||||
winkey.c winproto.h winreq.c winstr.c xpm2iff.c
|
||||
|
||||
outdated/sys/atari:
|
||||
(files for Atari version - untested for 3.7)
|
||||
Install.tos atarifnt.uue nethack.mnu setup.g tos.c
|
||||
unx2atar.sed
|
||||
|
||||
outdated/sys/be:
|
||||
(files for BeOS version - untested for 3.7)
|
||||
README bemain.c
|
||||
|
||||
outdated/sys/mac:
|
||||
(files for 68K Macintosh versions)
|
||||
Files.r Install.mw MacHelp NHDeflts NHrsrc.hqx
|
||||
NHsound.hqx News README carbon.plist dprintf.c
|
||||
maccurs.c macerrs.c macfile.c machelp.hqx macmain.c
|
||||
macmenu.c mactopl.c mactty.c macunix.c macwin.c
|
||||
mgetline.c mmodal.c mrecover.c mrecover.hqx mttymain.c
|
||||
|
||||
outdated/sys/msdos:
|
||||
(files for deprecated real mode msdos version)
|
||||
Makefile.BC Makefile.MSC SCHEMA35.MSC moveinit.pat ovlinit.c
|
||||
schema1.BC schema2.BC schema3.MSC
|
||||
|
||||
outdated/sys/os2:
|
||||
(files for OS/2 version - untested for 3.7)
|
||||
Install.os2 Makefile.os2 nhpmico.uu os2.c
|
||||
|
||||
outdated/sys/unix:
|
||||
(files that are no longer maintained for current game code)
|
||||
README.linux cross-amiga.sh
|
||||
|
||||
outdated/sys/unix/hints:
|
||||
(files that are no longer maintained for current game code)
|
||||
cross-amiga linux linux-chroot linux-qt4
|
||||
linux-qt5 linux-x11 macosx macosx10.5
|
||||
macosx10.7 macosx10.8 macosx10.10 macosx10.10-qt
|
||||
macosx10.14
|
||||
|
||||
outdated/sys/unix/hints/include:
|
||||
(files that are no longer maintained for current game code)
|
||||
cross-amiga-post cross-amiga-pre
|
||||
|
||||
outdated/sys/vms:
|
||||
(files that are no longer maintained for current game code)
|
||||
lev_lex.h
|
||||
|
||||
outdated/sys/wince:
|
||||
(files for Windows CE and PocketPC - untested for 3.7)
|
||||
Install.ce bootstrp.mak celib.c cesetup.bat cesound.c
|
||||
defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h
|
||||
mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c
|
||||
mhdlg.h mhfont.c mhfont.h mhinput.c mhinput.h
|
||||
mhmain.c mhmain.h mhmap.c mhmap.h mhmenu.c
|
||||
mhmenu.h mhmsg.h mhmsgwnd.c mhmsgwnd.h mhrip.c
|
||||
mhrip.h mhstatus.c mhstatus.h mhtext.c mhtext.h
|
||||
mhtxtbuf.c mhtxtbuf.h mswproc.c newres.h nhico.uu
|
||||
resource.h winMS.h winhack.c winhack.rc winhcksp.rc
|
||||
winmain.c
|
||||
|
||||
outdated/sys/wince/ceinc:
|
||||
(header files for Windows CE and PocketPC - untested for 3.7)
|
||||
assert.h errno.h fcntl.h
|
||||
|
||||
outdated/sys/wince/ceinc/sys:
|
||||
(sys/stat.h for Windows CE and PocketPC - untested for 3.6.2)
|
||||
stat.h
|
||||
|
||||
outdated/sys/windows:
|
||||
(files that are no longer maintained for current game code)
|
||||
travis-gcc.sh
|
||||
|
||||
outdated/sys/windows/vs:
|
||||
(files that are no longer maintained for current game code)
|
||||
travisci.sh
|
||||
|
||||
outdated/win/Qt3:
|
||||
(files for the Qt 3 widget library - X11, Windows, Mac OS X, or Qtopia)
|
||||
Info.plist Install.Qt knethack.lnk
|
||||
knh-mini.xpm knh.xpm qpe-nethack.control
|
||||
qt3_clust.cpp qt3_clust.h qt3_kde0.h
|
||||
qt3_win.cpp qt3_win.h qt3_xpms.h
|
||||
qt3tableview.cpp qt3tableview.h tileedit.cpp
|
||||
tileedit.h
|
||||
|
||||
outdated/win/gem:
|
||||
(files for GEM versions - untested for 3.7)
|
||||
Install.gem bitmfile.c gem_rsc.uu gem_rso.uu gr_rect.c gr_rect.h
|
||||
load_img.c tile2img.c title.uu wingem.c wingem1.c xpm2img.c
|
||||
|
||||
outdated/win/gnome:
|
||||
(files for GNOME versions - untested for 3.7)
|
||||
README gn_xpms.h gnaskstr.c gnaskstr.h gnbind.c gnbind.h
|
||||
gnglyph.c gnglyph.h gnmain.c gnmain.h gnmap.c gnmap.h
|
||||
gnmenu.c gnmenu.h gnmesg.c gnmesg.h gnomeprv.h gnopts.c
|
||||
gnopts.h gnplayer.c gnplayer.h gnsignal.c gnsignal.h gnstatus.c
|
||||
gnstatus.h gntext.c gntext.h gnworn.c gnworn.h gnyesno.c
|
||||
gnyesno.h mapbg.xpm
|
||||
|
||||
sound/fmod:
|
||||
(file in top directory)
|
||||
fmod.c
|
||||
|
||||
sound/macsound:
|
||||
(file in top directory)
|
||||
macsound.m
|
||||
|
||||
sound/qtsound:
|
||||
(file in top directory)
|
||||
README.md
|
||||
|
||||
sound/wav:
|
||||
(files in top directory)
|
||||
README attributions.txt
|
||||
sa2_xpleveldown.uu sa2_xplevelup.uu
|
||||
se_squeak_A.uu se_squeak_B.uu
|
||||
se_squeak_B_flat.uu se_squeak_C.uu
|
||||
se_squeak_D.uu se_squeak_D_flat.uu
|
||||
se_squeak_E.uu se_squeak_E_flat.uu
|
||||
se_squeak_F.uu se_squeak_F_sharp.uu
|
||||
se_squeak_G.uu se_squeak_G_sharp.uu
|
||||
sound_Bell.uu sound_Bugle_A.uu
|
||||
sound_Bugle_B.uu sound_Bugle_C.uu
|
||||
sound_Bugle_D.uu sound_Bugle_E.uu
|
||||
sound_Bugle_F.uu sound_Bugle_G.uu
|
||||
sound_Drum_Of_Earthquake.uu sound_Fire_Horn.uu
|
||||
sound_Frost_Horn.uu sound_Leather_Drum.uu
|
||||
sound_Magic_Flute_A.uu sound_Magic_Flute_B.uu
|
||||
sound_Magic_Flute_C.uu sound_Magic_Flute_D.uu
|
||||
sound_Magic_Flute_E.uu sound_Magic_Flute_F.uu
|
||||
sound_Magic_Flute_G.uu sound_Magic_Harp_A.uu
|
||||
sound_Magic_Harp_B.uu sound_Magic_Harp_C.uu
|
||||
sound_Magic_Harp_D.uu sound_Magic_Harp_E.uu
|
||||
sound_Magic_Harp_F.uu sound_Magic_Harp_G.uu
|
||||
sound_Tooled_Horn_A.uu sound_Tooled_Horn_B.uu
|
||||
sound_Tooled_Horn_C.uu sound_Tooled_Horn_D.uu
|
||||
sound_Tooled_Horn_E.uu sound_Tooled_Horn_F.uu
|
||||
sound_Tooled_Horn_G.uu sound_Wooden_Flute_A.uu
|
||||
sound_Wooden_Flute_B.uu sound_Wooden_Flute_C.uu
|
||||
sound_Wooden_Flute_D.uu sound_Wooden_Flute_E.uu
|
||||
sound_Wooden_Flute_F.uu sound_Wooden_Flute_G.uu
|
||||
sound_Wooden_Harp_A.uu sound_Wooden_Harp_B.uu
|
||||
sound_Wooden_Harp_C.uu sound_Wooden_Harp_D.uu
|
||||
sound_Wooden_Harp_E.uu sound_Wooden_Harp_F.uu
|
||||
sound_Wooden_Harp_G.uu uu2wav.cmd
|
||||
uu2wav.sh
|
||||
|
||||
sound/windsound:
|
||||
(file in top directory)
|
||||
windsound.c
|
||||
|
||||
src:
|
||||
(files for all versions)
|
||||
allmain.c alloc.c apply.c artifact.c attrib.c ball.c
|
||||
bones.c botl.c cmd.c date.c dbridge.c decl.c
|
||||
detect.c dig.c display.c dlb.c do.c do_name.c
|
||||
do_wear.c dog.c dogmove.c dokick.c dothrow.c drawing.c
|
||||
dungeon.c eat.c end.c engrave.c exper.c explode.c
|
||||
extralev.c files.c fountain.c hack.c hacklib.c insight.c
|
||||
invent.c isaac64.c light.c lock.c mail.c makemon.c
|
||||
mcastu.c mdlib.c mhitm.c mhitu.c minion.c mklev.c
|
||||
mkmap.c mkmaze.c mkobj.c mkroom.c mon.c mondata.c
|
||||
monmove.c monst.c mplayer.c mthrowu.c muse.c music.c
|
||||
nhlobj.c nhlsel.c nhlua.c o_init.c objects.c objnam.c
|
||||
options.c pager.c pickup.c pline.c polyself.c potion.c
|
||||
pray.c priest.c quest.c questpgr.c read.c rect.c
|
||||
region.c restore.c rip.c rnd.c role.c rumors.c
|
||||
save.c sfstruct.c shk.c shknam.c sit.c sounds.c
|
||||
sp_lev.c spell.c steal.c steed.c symbols.c sys.c
|
||||
teleport.c timeout.c topten.c track.c trap.c u_init.c
|
||||
uhitm.c utf8map.c vault.c version.c vision.c weapon.c
|
||||
were.c wield.c windows.c wizard.c worm.c worn.c
|
||||
write.c zap.c
|
||||
|
||||
submodules:
|
||||
(files in top directory)
|
||||
lua pdcurses pdcursesmod
|
||||
|
||||
sys/libnh:
|
||||
(files in top directory)
|
||||
README.md libnhmain.c sysconf
|
||||
|
||||
sys/libnh/test:
|
||||
(files in top directory)
|
||||
README.md libtest.c run.sh
|
||||
|
||||
sys/msdos:
|
||||
(files for MSDOS version)
|
||||
Install.dos Makefile.GCC exceptn.S.patch
|
||||
fetch-cross-compiler.sh font.c font.h
|
||||
msdos.c msdoshlp.txt nhlua.h
|
||||
pckeys.c pctiles.c pctiles.h
|
||||
pcvideo.h portio.h setup.bat
|
||||
sysconf tile2bin.c vesa.h
|
||||
video.c vidtxt.c vidvesa.c
|
||||
vidvga.c
|
||||
|
||||
(files for running MSDOS binary under Windows)
|
||||
nhico.uu nhpif.uu
|
||||
|
||||
sys/msdos/fonts:
|
||||
(files for MSDOS version)
|
||||
README.txt makefont.lua nh-u16b.bdf nh-u16v.bdf nh-u18b.bdf
|
||||
nh-u20b.bdf nh-u22b.bdf nh-u24b.bdf nh-u28b.bdf nh-u32b.bdf
|
||||
|
||||
sys/share:
|
||||
(Berkeley random number file, which may be included in any version)
|
||||
random.c
|
||||
|
||||
(Berkeley uudecode file, which may be used in build process of any version)
|
||||
uudecode.c
|
||||
|
||||
(file for MSDOS, OS/2, Amiga, and Atari versions - only MSDOS tested for 3.7)
|
||||
pcmain.c
|
||||
|
||||
(file for MSDOS, OS/2, and Atari versions - only MSDOS tested for 3.7)
|
||||
NetHack.cnf pctty.c
|
||||
|
||||
(file for MSDOS, OS/2, and VMS versions)
|
||||
termcap
|
||||
|
||||
(file for VMS version)
|
||||
tclib.c
|
||||
|
||||
(files for MSDOS, OS/2 and Atari versions - only MSDOS tested for 3.7)
|
||||
pcsys.c pcunix.c
|
||||
|
||||
(files for OS/2 version - untested for 3.7)
|
||||
Makefile.lib termcap.uu
|
||||
|
||||
(files for UNIX and Be versions)
|
||||
ioctl.c unixtty.c
|
||||
|
||||
(posix regex for versions that include regex in their C library)
|
||||
posixregex.c
|
||||
|
||||
(c++ regex code for versions that can build a C++ module and link it in)
|
||||
cppregex.cpp
|
||||
|
||||
(pmatch regex for other versions)
|
||||
pmatchregex.c
|
||||
|
||||
sys/unix:
|
||||
(files for UNIX versions)
|
||||
Install.unx Makefile.dat Makefile.doc Makefile.src
|
||||
Makefile.top Makefile.utl NewInstall.unx README.xcode
|
||||
XCode.xcconfig depend.awk gitinfo.sh mkmkfile.sh
|
||||
nethack.sh setup.sh sysconf unixmain.c
|
||||
unixres.c unixunix.c
|
||||
|
||||
sys/unix/NetHack.xcodeproj:
|
||||
(file for macOS Xcode)
|
||||
project.pbxproj
|
||||
|
||||
sys/unix/NetHack.xcodeproj/project.xcworkspace:
|
||||
(file for macOS Xcode)
|
||||
contents.xcworkspacedata
|
||||
|
||||
sys/unix/NetHack.xcodeproj/project.xcworkspace/xcshareddata:
|
||||
(files for macOS Xcode)
|
||||
IDEWorkspaceChecks.plist WorkspaceSettings.xcsettings
|
||||
|
||||
sys/unix/NetHack.xcodeproj/xcshareddata/xcschemes:
|
||||
(files for macOS Xcode)
|
||||
NetHack.xcscheme makedefs.xcscheme recover.xcscheme
|
||||
|
||||
sys/unix/hints:
|
||||
(files for configuring UNIX NetHack versions)
|
||||
linux-minimal linux.370 macOS.370
|
||||
macosx.sh solaris solaris-playground
|
||||
unix
|
||||
|
||||
sys/unix/hints/include:
|
||||
(files for configuring UNIX NetHack versions)
|
||||
compiler.370 cross-post.370 cross-pre.370 gbdates-post.370
|
||||
gbdates-pre.370 multisnd-post.370 multisnd1-pre.370 multisnd2-pre.370
|
||||
multiw-1.370 multiw-2.370 multiw-3.370
|
||||
|
||||
sys/vms:
|
||||
(files for VMS version)
|
||||
Install.vms Makefile.dat Makefile.doc Makefile.src Makefile.top
|
||||
Makefile.utl install.com nethack.com oldcrtl.c spec_lev.com
|
||||
sysconf vmsbuild.com vmsfiles.c vmsmail.c vmsmain.c
|
||||
vmsmisc.c vmstty.c vmsunix.c
|
||||
|
||||
sys/windows:
|
||||
(files for Windows 7/8.x/10/11 version)
|
||||
.nethackrc.template Install.windows Makefile.mingw32
|
||||
Makefile.mingw32.depend Makefile.nmake console.rc
|
||||
consoletty.c guitty.c nethack.def
|
||||
nhico.uu nhsetup.bat porthelp
|
||||
sysconf.template win10.c win10.h
|
||||
win32api.h windmain.c windsys.c
|
||||
winos.h
|
||||
|
||||
sys/windows/vs:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
NetHack.sln NetHackPackage.appxmanifest
|
||||
NetHackPackage.wapproj NetHackProperties.props
|
||||
Package.StoreAssociation.xml ScreenShot.PNG
|
||||
build.bat common.props
|
||||
config.props console.props
|
||||
cpp.hint default.props
|
||||
default_dll.props default_lib.props
|
||||
dirs.props dll.props
|
||||
files.props
|
||||
|
||||
sys/windows/vs/Images:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
BadgeLogo.scale-100.png
|
||||
BadgeLogo.scale-125.png
|
||||
BadgeLogo.scale-150.png
|
||||
BadgeLogo.scale-200.png
|
||||
BadgeLogo.scale-400.png
|
||||
LargeTile.scale-100.png
|
||||
LargeTile.scale-125.png
|
||||
LargeTile.scale-150.png
|
||||
LargeTile.scale-200.png
|
||||
LargeTile.scale-400.png
|
||||
LockScreenLogo.scale-200.png
|
||||
SmallTile.scale-100.png
|
||||
SmallTile.scale-125.png
|
||||
SmallTile.scale-150.png
|
||||
SmallTile.scale-200.png
|
||||
SmallTile.scale-400.png
|
||||
SplashScreen.scale-100.png
|
||||
SplashScreen.scale-125.png
|
||||
SplashScreen.scale-150.png
|
||||
SplashScreen.scale-200.png
|
||||
SplashScreen.scale-400.png
|
||||
Square150x150Logo.scale-100.png
|
||||
Square150x150Logo.scale-125.png
|
||||
Square150x150Logo.scale-150.png
|
||||
Square150x150Logo.scale-200.png
|
||||
Square150x150Logo.scale-400.png
|
||||
Square44x44Logo.altform-unplated_targetsize-16.png
|
||||
Square44x44Logo.altform-unplated_targetsize-256.png
|
||||
Square44x44Logo.altform-unplated_targetsize-32.png
|
||||
Square44x44Logo.altform-unplated_targetsize-48.png
|
||||
Square44x44Logo.scale-100.png
|
||||
Square44x44Logo.scale-125.png
|
||||
Square44x44Logo.scale-150.png
|
||||
Square44x44Logo.scale-200.png
|
||||
Square44x44Logo.scale-400.png
|
||||
Square44x44Logo.targetsize-16.png
|
||||
Square44x44Logo.targetsize-24.png
|
||||
Square44x44Logo.targetsize-24_altform-unplated.png
|
||||
Square44x44Logo.targetsize-256.png
|
||||
Square44x44Logo.targetsize-32.png
|
||||
Square44x44Logo.targetsize-48.png
|
||||
StoreLogo.backup.png
|
||||
StoreLogo.scale-100.png
|
||||
StoreLogo.scale-125.png
|
||||
StoreLogo.scale-150.png
|
||||
StoreLogo.scale-200.png
|
||||
StoreLogo.scale-400.png
|
||||
Wide310x150Logo.scale-100.png
|
||||
Wide310x150Logo.scale-125.png
|
||||
Wide310x150Logo.scale-150.png
|
||||
Wide310x150Logo.scale-200.png
|
||||
Wide310x150Logo.scale-400.png
|
||||
|
||||
sys/windows/vs/NetHack:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
NetHack.vcxproj afternethack.proj
|
||||
|
||||
sys/windows/vs/NetHackW:
|
||||
(file for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
NetHackW.vcxproj
|
||||
|
||||
sys/windows/vs/PDCurses:
|
||||
(file for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
PDCurses.vcxproj
|
||||
|
||||
sys/windows/vs/PDCursesGui:
|
||||
(file for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
pdcursesgui.vcxproj
|
||||
|
||||
sys/windows/vs/dlb:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
afterdlb.proj dlb.vcxproj
|
||||
|
||||
sys/windows/vs/makedefs:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
aftermakedefs.proj makedefs.vcxproj
|
||||
|
||||
sys/windows/vs/recover:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
afterrecover.proj recover.vcxproj
|
||||
|
||||
sys/windows/vs/tile2bmp:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
aftertile2bmp.proj tile2bmp.vcxproj
|
||||
|
||||
sys/windows/vs/tilemap:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
aftertilemap.proj tilemap.vcxproj
|
||||
|
||||
sys/windows/vs/tiles:
|
||||
(file for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
tiles.vcxproj
|
||||
|
||||
sys/windows/vs/uudecode:
|
||||
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
|
||||
afteruudecode.proj uudecode.vcxproj
|
||||
|
||||
test:
|
||||
(files for testing)
|
||||
test_cnf.lua test_des.lua test_lev.lua test_obj.lua test_sel.lua
|
||||
test_shk.lua test_src.lua testmove.lua testwish.lua
|
||||
|
||||
util:
|
||||
(files for all versions)
|
||||
dlb_main.c makedefs.c mdgrep.h mdgrep.pl panic.c recover.c
|
||||
|
||||
win/Qt:
|
||||
(files for the Qt 4 or 5 widget library - X11, Windows, Mac OS X)
|
||||
Qt-issues.txt qt_bind.cpp qt_bind.h qt_click.cpp qt_click.h
|
||||
qt_clust.cpp qt_clust.h qt_delay.cpp qt_delay.h qt_glyph.cpp
|
||||
qt_glyph.h qt_icon.cpp qt_icon.h qt_inv.cpp qt_inv.h
|
||||
qt_kde0.h qt_key.cpp qt_key.h qt_line.cpp qt_line.h
|
||||
qt_main.cpp qt_main.h qt_map.cpp qt_map.h qt_menu.cpp
|
||||
qt_menu.h qt_msg.cpp qt_msg.h qt_plsel.cpp qt_plsel.h
|
||||
qt_post.h qt_pre.h qt_rip.cpp qt_rip.h qt_set.cpp
|
||||
qt_set.h qt_stat.cpp qt_stat.h qt_str.cpp qt_str.h
|
||||
qt_streq.cpp qt_streq.h qt_svsel.cpp qt_svsel.h qt_win.cpp
|
||||
qt_win.h qt_xcmd.cpp qt_xcmd.h qt_xpms.h qt_yndlg.cpp
|
||||
qt_yndlg.h
|
||||
|
||||
win/X11:
|
||||
(files for X versions)
|
||||
Install.X11 NetHack.ad Window.c X11-issues.txt
|
||||
dialogs.c ibm.bdf nethack.rc nh10.bdf
|
||||
nh32icon nh56icon nh72icon nh_icon.xpm
|
||||
pet_mark.xbm pilemark.xbm rip.xpm tile2x11.c
|
||||
winX.c winmap.c winmenu.c winmesg.c
|
||||
winmisc.c winstat.c wintext.c winval.c
|
||||
|
||||
win/chain:
|
||||
(files for stacking window systems)
|
||||
wc_chainin.c wc_chainout.c wc_trace.c
|
||||
|
||||
win/curses:
|
||||
(files in top directory)
|
||||
Bugs.txt Readme.txt Todo.txt cursdial.c cursdial.h cursinit.c
|
||||
cursinit.h cursinvt.c cursinvt.h cursmain.c cursmesg.c cursmesg.h
|
||||
cursmisc.c cursmisc.h cursstat.c cursstat.h curswins.c curswins.h
|
||||
|
||||
win/macosx:
|
||||
(files for macosx versions)
|
||||
NetHackGuidebook.applescript NetHackRecover.applescript
|
||||
NetHackTerm.applescript recover.pl
|
||||
|
||||
win/share:
|
||||
(files for versions using optional tiles)
|
||||
bmptiles.c gifread.c giftiles.c monsters.txt nhicns.uu
|
||||
nhsplash.xpm objects.txt other.txt ppmwrite.c renumtiles.pl
|
||||
safeproc.c thintile.c tile.doc tile.h tile2bmp.c
|
||||
tilemap.c tileset.c tiletext.c tiletxt.c
|
||||
|
||||
win/shim:
|
||||
(file in top directory)
|
||||
winshim.c
|
||||
|
||||
win/tty:
|
||||
(files for tty versions)
|
||||
getline.c termcap.c topl.c wintty.c
|
||||
|
||||
win/win32:
|
||||
(files for Windows versions - tested up to Windows 11)
|
||||
NetHackW.c NetHackW.exe.manifest NetHackW.rc
|
||||
mhaskyn.c mhaskyn.h mhdlg.c
|
||||
mhdlg.h mhfont.c mhfont.h
|
||||
mhinput.c mhinput.h mhmain.c
|
||||
mhmain.h mhmap.c mhmap.h
|
||||
mhmenu.c mhmenu.h mhmsg.h
|
||||
mhmsgwnd.c mhmsgwnd.h mhrip.c
|
||||
mhrip.h mhsplash.c mhsplash.h
|
||||
mhstatus.c mhstatus.h mhtext.c
|
||||
mhtext.h mnsel.uu mnselcnt.uu
|
||||
mnunsel.uu mswproc.c nethack.rc
|
||||
nhresource.h petmark.uu pilemark.uu
|
||||
record.uu resource.h rip.uu
|
||||
splash.uu tiles-mingw32.mak tiles.mak
|
||||
winMS.h
|
||||
|
||||
This is a list of files produced by auxiliary programs. They can all be
|
||||
regenerated from the files in the distribution.
|
||||
|
||||
dat:
|
||||
(files generated by makedefs at playground creation time)
|
||||
data options oracles rumors
|
||||
|
||||
(files generated for Qt interface on macOS)
|
||||
Info.plist nethack.icns
|
||||
|
||||
(files generated for windows at compile time)
|
||||
dlb.lst porthelp
|
||||
|
||||
(files generated for windows gui at compile time)
|
||||
guioptions
|
||||
|
||||
(files generated for windows tty at compile time)
|
||||
ttyoptions
|
||||
|
||||
(tile files optionally generated for X ports at playground creation time)
|
||||
pet_mark.xbm rip.xpm x11tiles
|
||||
|
||||
src:
|
||||
(files for win32 that are moved into src at compile time)
|
||||
Makefile Makefile.mingw32
|
||||
|
||||
(files generated by 'moc' for Qt interface at compile time)
|
||||
qt_kde0.moc qt_main.moc qt_map.moc qt_menu.moc qt_msg.moc
|
||||
qt_plsel.moc qt_set.moc qt_stat.moc qt_xcmd.moc qt_yndlg.moc
|
||||
|
||||
(file generated by makedefs -m but unused in 3.7)
|
||||
monstr.c
|
||||
|
||||
(file optionally generated by tilemap at compile time)
|
||||
tile.c
|
||||
|
||||
sys/windows:
|
||||
(file generated by uudecode at compile time)
|
||||
nethack.ico
|
||||
|
||||
util:
|
||||
(file generated for unix at compile time if various tiles utilities are built)
|
||||
tiletxt.c
|
||||
|
||||
(file generated for windows at compile time)
|
||||
uudecode.exe
|
||||
|
||||
NOTE: If your binaries were compiled with the data librarian (DLB) option,
|
||||
your playground will not contain all of the files listed here. All
|
||||
of the files listed as being required for the playground must still
|
||||
have been built by your compiler, but the DLB code will roll them up
|
||||
into another file (or files).
|
||||
|
@ -1,265 +0,0 @@
|
||||
NetHack Porting Guidelines v 3.7 2023-04-23
|
||||
|
||||
|
||||
1.0 Introduction
|
||||
|
||||
This document goes through the steps required to port NetHack to a
|
||||
new machine, with the intention of compiling natively on that machine. If
|
||||
you are cross-compiling for one platform on another, it is suggested that
|
||||
you read Cross-compiling.
|
||||
|
||||
The basic steps in porting the program using a native compiler are:
|
||||
|
||||
1. Get the code onto your build machine. The parts of the current
|
||||
directory setup you definitely need include src (NetHack code
|
||||
shared by all systems), include (include files), util (code
|
||||
for utility programs), and dat (various data files). The
|
||||
documentation in doc is strongly recommended. You already
|
||||
have the files in the top directory since you're reading this
|
||||
one. :-)
|
||||
|
||||
If you will be cross-compiling for your target platform on
|
||||
a different platform, you may want to read Cross-compiling
|
||||
in the Top folder as well.
|
||||
|
||||
A full list of the distribution files and their associated
|
||||
OSes may be found in the top-level file "Files".
|
||||
|
||||
If your machine uses an OS already supported, you need the sys
|
||||
subdirectory for that OS and possibly sys/share. Otherwise,
|
||||
get the closest match (say sys/msdos for single-tasking OSes
|
||||
and sys/unix for multi-user OSes, along with sys/share, if
|
||||
nothing else comes to mind). You may want others for
|
||||
comparison.
|
||||
|
||||
If your machine uses a windowing system already supported,
|
||||
you need the win subdirectory for that system (or the
|
||||
appropriate sys subdirectory if the windowing system was
|
||||
previously considered restricted to one OS) and possibly
|
||||
win/share.
|
||||
|
||||
2. Modify the appropriate include files to customize NetHack to
|
||||
your system. You may need to add a new OS-specific "*conf.h"
|
||||
file (see unixconf.h, windconf.h, pcconf.h, etc. as examples).
|
||||
|
||||
3. If your machine uses a new OS instead of a variant of existing
|
||||
OSes, add a new sys subdirectory. Add, if required, a OS-
|
||||
specific copy of "main.c", "tty.c" and "unix.c". Possibly
|
||||
add an OS-specific library (see "msdos.c" and "tos.c" as
|
||||
examples) to provide functions NetHack wants and your OS lacks.
|
||||
|
||||
4. If your machine uses a new windowing system, follow doc/window.txt
|
||||
carefully. Put files implementing these routines in a win or
|
||||
sys subdirectory as appropriate.
|
||||
|
||||
5. If your compilation environment isn't close to one already
|
||||
supported, try starting from the UNIX makefiles. Modify the
|
||||
top level makefile and the src makefile as required. Then run
|
||||
an initial compile. You are bound to get some errors. You
|
||||
should be able to fix them in a fairly simple fashion. If
|
||||
things seem to be getting too complex, take a step back, and
|
||||
possibly send us some mail. We might be able to help.
|
||||
|
||||
6. Mail all of your fixes to us in a contextual form so that we can
|
||||
easily integrate them into the code, or fork the NetHack
|
||||
repository on GitHub and issue a pull-request for your changes.
|
||||
|
||||
One general rule of thumb exists. Always add code. Don't delete
|
||||
somebody else's code for yours -- it won't work on their machine if you do.
|
||||
Always add your OS specific code inside #ifdef / #else / #endif constructs
|
||||
so that it will be able to be folded back into the original code easily.
|
||||
|
||||
|
||||
2.0 Include Files
|
||||
|
||||
2.1 config.h
|
||||
|
||||
The file "config.h" is a master configuration file that determines
|
||||
the basic features of the game, as well as many of the security options.
|
||||
It is intended that end users configure the game by editing "config.h" and
|
||||
an appropriate "*conf.h" file, so any #defines for individual preferences
|
||||
should be added to those files. OS-specific #defines that are not intended
|
||||
to be changed should also go in "*conf.h"; try to find the most appropriate
|
||||
place for other #defines.
|
||||
|
||||
The following sections may require modification:
|
||||
|
||||
- Section 1: OS and window system selection.
|
||||
You may have to put a #define for your OS here.
|
||||
If your OS is yet another UNIX variant, put the
|
||||
#define in unixconf.h instead.
|
||||
An unfortunately large amount of stuff shares
|
||||
this section because the #definitions have to
|
||||
be seen before *conf.h is reached. Don't add
|
||||
to this unless necessary.
|
||||
|
||||
- Section 2: Global parameters and filenames.
|
||||
These will have to be customized to your system.
|
||||
|
||||
- Section 3: Type definitions and other compiler behavior.
|
||||
These will have to be matched to your compiler.
|
||||
|
||||
2.2 global.h
|
||||
|
||||
This file defines things specific to NetHack that should not
|
||||
require modification by an end user. For a new port, you may have to add
|
||||
automatic inclusion of another auxiliary config file (*conf.h) which you
|
||||
wrote for your system.
|
||||
|
||||
2.3 extern.h
|
||||
|
||||
If you create any new source modules or new functions in old modules,
|
||||
you must enter the names of the new external references (the functions defined
|
||||
there for external use) in this file.
|
||||
|
||||
|
||||
3.0 Source files
|
||||
|
||||
The first step in getting the game up is to get the "makedefs"
|
||||
program running. This program is used to create configuration-specific
|
||||
files for the game.
|
||||
|
||||
Once "makedefs" has been built, the rest of the game can be compiled.
|
||||
You may have to create an OS-specific module to handle things you want to
|
||||
use, like a mouse or a ram-disk.
|
||||
|
||||
3.1 Makefiles
|
||||
|
||||
This distribution provides makefiles for several kinds of systems.
|
||||
There are joint makefiles for the various varieties of UNIX, makefiles for
|
||||
MSDOS, a makefile for NT, and so on. You may have to create a new
|
||||
makefile for your specific machine. You may even have to translate some
|
||||
makefiles into a form more congenial to your system. If possible, however,
|
||||
add to one of those provided.
|
||||
|
||||
3.2 termcap.c
|
||||
|
||||
If your system wants to use tty windowing and it doesn't run off
|
||||
of a termcap or terminfo database, you may have to put the appropriate
|
||||
terminal control strings into termcap.c. You can also consider using the
|
||||
termcap code from sys/share/tclib.c or sys/share/termcap.uu, especially if
|
||||
your system supports multiple kinds of terminals. Alternatively, you can
|
||||
define NO_TERMS and provide alternative screen handling in a
|
||||
platform-specific module. That has already been done for MSDOS and for
|
||||
the Windows console, and those mods can be used as an example.
|
||||
|
||||
3.4 tty.c
|
||||
|
||||
You may need to create a new "tty.c" module. If you do, call it
|
||||
[OS]tty.c where the [OS] is replaced with the name of the OS you are porting
|
||||
to. This file contains the routines that configure the terminal/console
|
||||
for raw I/O, etc.
|
||||
|
||||
3.5 unix.c
|
||||
|
||||
You may need to create a new "unix.c" module. If you do, call it
|
||||
[OS]unix.c where the [OS] is replaced with the name of the OS you are porting
|
||||
to. This file contains some OS dependencies concerning time and filename
|
||||
creation.
|
||||
|
||||
An object of the NetHack development project is to get the game
|
||||
working on as many different types of hardware and under as many different
|
||||
operating systems as is practical. Any assistance will be appreciated.
|
||||
|
||||
Cross-compiling may allow porting of NetHack to a machine where there may
|
||||
be challenges building on the platform directly, and may help maintain a
|
||||
working version of NetHack on that platform. See the file Cross-compiling
|
||||
for more information.
|
||||
|
||||
4.0 Build Process
|
||||
|
||||
NetHack requires the following steps to be carried out:
|
||||
|
||||
4.1. makedefs
|
||||
|
||||
Compile and link util/makedefs. Run makedefs repeatedly with different command
|
||||
line options to produce several output files that are required for:
|
||||
(a) creation of files, containing information required by,
|
||||
or about the game during its execution, that are stored in a
|
||||
portable, platform-independent way, that need to be inserted
|
||||
into the final game package.
|
||||
|
||||
Required for complete packaging of the game, but not the C source
|
||||
game compile:
|
||||
util/makedefs -d
|
||||
util/makedefs -r
|
||||
util/makedefs -h
|
||||
util/makedefs -s
|
||||
|
||||
For reference purposes, but no longer a required prerequisite for the
|
||||
game compile process:
|
||||
util/makedefs -v
|
||||
util/makedefs -o
|
||||
util/makedefs -p
|
||||
|
||||
4.2. Other utilities
|
||||
|
||||
Compile and link other utilities such as uudecode, tile-generation
|
||||
utilities, and so forth. Those produce output files for use during the game and
|
||||
need to be included in the packaging of the game.
|
||||
|
||||
4.3. Lua
|
||||
|
||||
Compile and link into a library, or obtain a prebuilt Lua library for
|
||||
your platform. Place the Lua source into lib/lua-5.4.6 (or other folder
|
||||
representing an appropriate Lua version); place the compiled Lua library into
|
||||
lib.
|
||||
|
||||
4.4 Compile NetHack sources
|
||||
|
||||
Compile the source code of the game, including a suitable
|
||||
regular-expression choice from several options available in sys/share. Pick one
|
||||
that is supported by your OS or that you have obtained a 3rd party library for.
|
||||
|
||||
4.5 Compile optional window port components into a library
|
||||
|
||||
If your platform requires 3rd party sources in order to support the
|
||||
window port options that you have chosen, such as curses sources for the curses
|
||||
window port, you may store the sources for that library in a subfolder under
|
||||
lib.
|
||||
|
||||
4.6. Link the game
|
||||
|
||||
Link the game to the Lua library, and to any window port support
|
||||
libraries.
|
||||
|
||||
4.7 Package the game
|
||||
|
||||
|
||||
|
||||
5.0 Design Updates
|
||||
|
||||
The following design updates were introduced in NetHack 3.7.
|
||||
|
||||
5.1 Quest text files
|
||||
|
||||
The quest text files that were formerly converted from their source
|
||||
text by makedefs during the build process, have been replaced by Lua versions
|
||||
and are inserted into the game package for processing by the embedded Lua
|
||||
interpreter during game execution.
|
||||
|
||||
5.2 Level Compiler
|
||||
|
||||
There is no longer a build-time level compiler. Instead, the level
|
||||
descriptions have been converted to Lua and are inserted into the game package
|
||||
for processing by the embeded Lua interpreter during game execution.
|
||||
|
||||
5.3 Dungeon Compiler
|
||||
|
||||
There is no longer a build-time dungeon compiler. Instead, the dungeon
|
||||
description has been converted to Lua and is inserted into the game package for
|
||||
processing by the embeded Lua interpreter during game execution.
|
||||
|
||||
|
||||
5.4 Run-time Options
|
||||
|
||||
Some of the build and option information that was formerly produced at
|
||||
build-time by makedefs, and contained information about the game platform and
|
||||
options selected during the build of the game, can now be produced at run-time
|
||||
by code within the game itself. That was done to facilitate cross-compiling of
|
||||
NetHack on one platform for game execution on another.
|
||||
|
||||
|
||||
# NetHack 3.7 Porting $NHDT-Date: 1643491454 2022/01/29 21:24:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.17 $
|
||||
# Copyright (c) 2005 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
@ -1,216 +0,0 @@
|
||||
NetHack 3.7.0 work-in-progress -- General information
|
||||
|
||||
NetHack 3.7 is an enhancement to the dungeon exploration game NetHack,
|
||||
which is a distant descendent of Rogue and Hack, and a direct descendent of
|
||||
NetHack 3.6.
|
||||
|
||||
NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version,
|
||||
and still very early in its development cycle, there has already been changes
|
||||
made, and there will continue to be many more prior to an eventual release.
|
||||
The file doc/fixes3-7-0.txt in the source distribution will be updated with
|
||||
a list of fixes as they are committed.
|
||||
|
||||
In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as
|
||||
released code, and if stability is paramount, then the most recent
|
||||
NetHack 3.6.7 release is safest for you.
|
||||
|
||||
We're making the .0 work-in-progress available so that you can observe, test
|
||||
out, and contribute to its development. Constructive suggestions, GitHub pull
|
||||
requests, and bug reports are all welcome and encouraged.
|
||||
|
||||
The file doc/fixes3-7-0.txt in the source distribution has a full list of
|
||||
bug-fixes included so far, as well as brief mentions of some of the other code
|
||||
changes. The text in there was written for the development team's own use and is
|
||||
provided "as is", so please do not ask us to further explain the entries in
|
||||
that file. Some entries might be considered "spoilers", particularly in the
|
||||
"new features" section.
|
||||
|
||||
Along with the game improvements and bug fixes, NetHack 3.7 strives to make
|
||||
some general architectural improvements to the game or to its building
|
||||
process. Among them:
|
||||
|
||||
* Remove barriers to building NetHack on one platform and operating system,
|
||||
for later execution on another (possibly quite different) platform and/or
|
||||
operating system. That capability is generally known as "cross-compiling."
|
||||
See the file "Cross-compiling" in the top-level folder for more information
|
||||
on that.
|
||||
|
||||
* Replace the build-time "yacc and lex"-based level compiler, the "yacc and
|
||||
lex"-based dungeon compiler, and the quest text file processing done
|
||||
by NetHack's "makedefs" utility, with Lua text alternatives that are
|
||||
loaded and processed by the game during play.
|
||||
|
||||
* Write game savefiles and bonesfiles in a more portable and consistent way
|
||||
to open up the possibility of utilizing them between different platforms,
|
||||
such as between your desktop computer and your hand-held device.
|
||||
|
||||
* Add support to make the game restartable without exit (a.k.a. "play again"
|
||||
support). Toward that end, many previously scattered and separate variables
|
||||
have been gathered into central 'ga' through 'gz' structures in
|
||||
decl.h/decl.c. That central ability to reinitialize the variables will
|
||||
benefit the porting effort to some platforms that are under consideration
|
||||
where "play again" is typical.
|
||||
|
||||
Here are some other general notes on the changes in NetHack 3.7 that were not
|
||||
considered spoilers:
|
||||
- automatic annotation "gateway to Moloch's Sanctum" for vibrating square
|
||||
level once that square's location becomes known (found or magic
|
||||
mapped); goes away once sanctum temple is found (entered or high altar
|
||||
mapped)
|
||||
- savefile: add support to deconstruct internal data structures down into
|
||||
their individual fields and save those fields instead of the entire
|
||||
struct
|
||||
- savefile: use little-endian format for fields where that makes a difference
|
||||
|
||||
- - - - - - - - - - -
|
||||
|
||||
Please read items (1), (2) and (3) BEFORE doing anything with your new code.
|
||||
|
||||
1. Unpack the code in a dedicated new directory. We will refer to that
|
||||
directory as the 'Top' directory. It makes no difference what you
|
||||
call it.
|
||||
|
||||
2. Having unpacked, you should have a file called 'Files' in your Top
|
||||
directory.
|
||||
|
||||
This file contains the list of all the files you now SHOULD
|
||||
have in each directory. Please check the files in each directory
|
||||
against this list to make sure that you have a complete set.
|
||||
|
||||
This file also contains a list of what files are created during
|
||||
the build process.
|
||||
|
||||
The names of the directories listed should not be changed unless you
|
||||
are ready to go through the makefiles and the makedefs program and change
|
||||
all the directory references in them.
|
||||
|
||||
3. Before you do anything else, please read carefully the file called
|
||||
"license" in the 'dat' subdirectory. It is expected that you comply
|
||||
with the terms of that license, and we are very serious about it.
|
||||
|
||||
4. If you are attempting to build NetHack on one platform/processor, to
|
||||
produce a game on a different platform/processor it may behoove you to
|
||||
read the file "Cross-compiling" in your Top directory.
|
||||
|
||||
5. If everything is in order, you can now turn to trying to get the program
|
||||
to compile and run on your particular system. It is worth mentioning
|
||||
that the default configuration is SysV/Sun/Solaris2.x (simply because
|
||||
the code was housed on such a system).
|
||||
|
||||
The files sys/*/Install.* were written to guide you in configuring the
|
||||
program for your operating system. The files win/*/Install.* are
|
||||
available, where necessary, to help you in configuring the program
|
||||
for particular windowing environments. Reading them, and the man pages,
|
||||
should answer most of your questions.
|
||||
|
||||
|
||||
At the time of the most recent official release, NetHack 3.6, it had
|
||||
been tested to run/compile on:
|
||||
|
||||
Intel Pentium or better running Linux, BSDI
|
||||
Intel Pentium or better running Windows 10 or 11
|
||||
Intel-based, or Apple M1 or M2 Macs running macOS 10.11 (El Capitan) to
|
||||
13 (Ventura) (follow the instructions in sys/unix/NewInstall.unx)
|
||||
Intel 80386 or greater running MS-DOS with DPMI
|
||||
built via djgpp compiler (native or Linux-hosted cross-compiler)
|
||||
OpenVMS (aka VMS) V8.4 on Alpha and on Integrity/Itanium/IA64
|
||||
|
||||
Previous versions of NetHack were tested and known to run on the
|
||||
following systems, but it is unknown if they can still build and
|
||||
execute NetHack 3.6 or NetHack 3.7:
|
||||
|
||||
Apple Macintosh running MacOS 7.5 or higher, LinuxPPC, BeOS 4.0
|
||||
Atari ST/TT/Falcon running TOS (or MultiTOS) with GCC
|
||||
AT&T 3B1 running System V (3.51)
|
||||
AT&T 3B2/600 & 3B2/622 running System V R3.2.1
|
||||
AT&T 3B2/1000 Model 80 running System V R3.2.2
|
||||
AT&T 3B4000 running System V
|
||||
AT&T 6386 running System V R3.2
|
||||
Commodore Amiga running AmigaDOS 3.0 or higher with SAS/C 6.x
|
||||
(but see Makefile.ami about DICE and Manx)
|
||||
Data General AViiON systems running DG/UX
|
||||
DEC Alpha/VMS (aka OpenVMS AXP), running V1.x through V7.1
|
||||
DEC VAX/VMS, running V4.6 through V7.1
|
||||
DEC vaxen running BSD, Ultrix
|
||||
Decstations running Ultrix 3.1, 4.x
|
||||
Encore Multimax running UMAX 4.2
|
||||
Gould NP1 running UTX 3/2
|
||||
HP 9000s300 running HP-UX
|
||||
HP 9000s700 running HP-UX 9.x, 10.x, 11.x
|
||||
H/PC Pro devices running Windows CE 2.11 and higher.
|
||||
IBM PC/RT and RS/6000 running AIX 3.x
|
||||
IBM PS/2 and AT compatibles running OS/2 - 2.0 and up with GCC emx
|
||||
IBM PS/2 and AT compatibles running OS/2 1.1 - 2.0 (and probably
|
||||
Warp) with Microsoft 6.0, and OS/2 2.0 and up with IBM CSet++ 2.0.
|
||||
Intel 80386 or greater (or clone) running 386BSD
|
||||
Intel x86 running a version of Windows 7 or 8 or prior to XP.
|
||||
Mips M2000 running RiscOS 4.1
|
||||
NeXT running Mach (using BSD configuration)
|
||||
Palm Size PC 1.1 devices running Windows CE 2.11
|
||||
Pocket PC devices running Windows CE 3.0 and higher
|
||||
Pyramid 9820x running OSx 4.4c
|
||||
SGI Iris running IRIX
|
||||
Stardent Vistra 800 running SysV R4.0
|
||||
Stride 460 running UniStride 2.1
|
||||
Sun-3s, -4s, and -386is running SunOS 3.x
|
||||
Sun-3s and -386is running SunOS 4.x
|
||||
"Sun SPARC"-based machine running SunOS 4.x, Solaris 2.x, or Solaris 7
|
||||
Valid Logic Systems SCALD-System
|
||||
|
||||
Previous versions, using a cross-compiler hosted on another platform,
|
||||
such as win32, could also build the following from source:
|
||||
Pocket PC devices running Windows CE 3.0 and higher
|
||||
H/PC Pro devices running Windows CE 2.11 and higher
|
||||
Palm Size PC 1.1 devices running Windows CE 2.11
|
||||
|
||||
Unless otherwise mentioned, the compiler used was the OS-vendor's
|
||||
C compiler.
|
||||
|
||||
- - - - - - - - - - -
|
||||
|
||||
If you have problems building the game, or you find bugs in it, we recommend
|
||||
filing a bug report from our "Contact Us" web page at:
|
||||
https://www.nethack.org/common/contact.html
|
||||
Please include the version information from #version or the command line
|
||||
option --version in the appropriate field.
|
||||
|
||||
A public repository of the latest NetHack code that we've made
|
||||
available can be obtained via git here:
|
||||
https://github.com/NetHack/NetHack
|
||||
or
|
||||
https://sourceforge.net/p/nethack/NetHack/
|
||||
|
||||
When sending correspondence, please observe the following:
|
||||
o Please be sure to include your machine type, OS, and patchlevel.
|
||||
o Please avoid sending us binary files (e.g. save files or bones files).
|
||||
If you have found a bug and think that your save file would aid in solving
|
||||
the problem, send us a description in words of the problem, your machine
|
||||
type, your operating system, and the version of NetHack. Tell us that you
|
||||
have a save file, but do not actually send it.
|
||||
You may then be contacted by a member of the development team with the
|
||||
address of a specific person to send the save file to.
|
||||
o Though we make an effort to reply to each bug report, it may take some
|
||||
time before you receive feedback. This is especially true during the
|
||||
period immediately after a new release, when we get the most bug reports.
|
||||
o We don't give hints for playing the game.
|
||||
o Don't bother to ask when the next version will be out or you can expect
|
||||
to receive a stock answer.
|
||||
|
||||
If you want to submit a patch for the NetHack source code via email directly,
|
||||
you can direct it to this address:
|
||||
nethack-bugs (at) nethack.org
|
||||
|
||||
If a feature is not accepted you are free, of course, to post the patches
|
||||
to the net yourself and let the marketplace decide their worth.
|
||||
|
||||
All of this amounts to the following: If you decide to apply a free-lanced
|
||||
patch to your 3.6 code, you are welcome to do so, of course, but we won't
|
||||
be able to provide support or receive bug reports for it.
|
||||
|
||||
In our own patches, we will assume that your code is synchronized with ours.
|
||||
|
||||
-- Good luck, and happy Hacking --
|
||||
|
||||
# $NHDT-Date: 1652133501 2022/05/09 21:58:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.97 $
|
||||
# Copyright (c) 2012 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
@ -1,254 +0,0 @@
|
||||
strategy:
|
||||
matrix:
|
||||
linux_latest_gcc9_minimal:
|
||||
imageName: 'ubuntu-latest'
|
||||
toolchainName: gcc9
|
||||
buildTargetName: minimal
|
||||
linux_jammy_clang_all:
|
||||
imageName: 'ubuntu-22.04'
|
||||
toolchainName: clang
|
||||
buildTargetName: all
|
||||
linux_jammy_gcc9_all:
|
||||
imageName: 'ubuntu-22.04'
|
||||
toolchainName: gcc9
|
||||
buildTargetName: all
|
||||
linux_jammy_gcc12_all:
|
||||
imageName: 'ubuntu-22.04'
|
||||
toolchainName: gcc12
|
||||
buildTargetName: all
|
||||
macOS_latest_clang_all:
|
||||
imageName: 'macOS-latest'
|
||||
toolchainName: clang
|
||||
buildTargetName: all
|
||||
macOS_Ventura_clang13_all:
|
||||
imageName: 'macOS-13'
|
||||
toolchainName: clang
|
||||
buildTargetName: all
|
||||
windows-visualstudio:
|
||||
imageName: 'windows-latest'
|
||||
toolchainName: vs
|
||||
buildTargetName: all
|
||||
windows-mingw:
|
||||
imageName: 'windows-2019'
|
||||
toolchainName: mingw
|
||||
buildTargetName: all
|
||||
linux_focal_cross_msdos:
|
||||
imageName: 'ubuntu-20.04'
|
||||
toolchainName: cross
|
||||
buildTargetName: msdos
|
||||
linux_jammy_docs:
|
||||
imageName: 'ubuntu-22.04'
|
||||
toolchainName: docs
|
||||
buildTargetName: all
|
||||
continueOnError: true
|
||||
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
|
||||
# resources:
|
||||
# repositories:
|
||||
# - repository: pdcursesrepo
|
||||
# type: github
|
||||
# name: wmcbrine/PDCurses
|
||||
# ref: refs/heads/master
|
||||
# endpoint: github.com_barthouse
|
||||
|
||||
variables:
|
||||
toolchain: $(toolchainName)
|
||||
buildTarget: $(buildTargetName)
|
||||
netHackPath: s/NetHack
|
||||
|
||||
steps:
|
||||
- bash: |
|
||||
if [ "$(toolchain)" == "gcc7" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]gcc-7"
|
||||
echo "##vso[task.setvariable variable=CXX]g++-7"
|
||||
fi
|
||||
if [ "$(toolchain)" == "gcc9" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]gcc-9"
|
||||
echo "##vso[task.setvariable variable=CXX]g++-9"
|
||||
fi
|
||||
if [ "$(toolchain)" == "gcc10" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]gcc-10"
|
||||
echo "##vso[task.setvariable variable=CXX]g++-10"
|
||||
fi
|
||||
if [ "$(toolchain)" == "gcc11" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]gcc-11"
|
||||
echo "##vso[task.setvariable variable=CXX]g++-11"
|
||||
fi
|
||||
if [ "$(toolchain)" == "gcc12" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]gcc-12"
|
||||
echo "##vso[task.setvariable variable=CXX]g++-12"
|
||||
fi
|
||||
if [ "$(toolchain)" == "clang" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]clang"
|
||||
echo "##vso[task.setvariable variable=CXX]clang++"
|
||||
fi
|
||||
if [ "$(toolchain)" == "cross" ]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=CC]gcc-9"
|
||||
echo "##vso[task.setvariable variable=CXX]g++-9"
|
||||
fi
|
||||
displayName: 'Setting variables'
|
||||
|
||||
- bash: |
|
||||
echo "toolchain: $(toolchain)"
|
||||
echo "buildTarget: $(buildTarget)"
|
||||
echo "netHackPath: $NETHACKPATH"
|
||||
echo "CC: $CC"
|
||||
echo "CXX: $CXX"
|
||||
displayName: 'Echoing variables'
|
||||
|
||||
- checkout: git://NetHack/NetHack@NetHack-3.7
|
||||
submodules: true
|
||||
path: $(netHackPath) # $(Agent.BuildDirectory)/$(netHackPath)
|
||||
|
||||
- task: DownloadSecureFile@1
|
||||
name: storeKey
|
||||
inputs:
|
||||
secureFile: 'NetHackPackage_StoreKey.pfx'
|
||||
condition: eq( variables.toolchain, 'vs' )
|
||||
displayName: 'Store Key Download'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
contents: NetHackPackage_StoreKey.pfx
|
||||
SourceFolder: $(Agent.TempDirectory)
|
||||
TargetFolder: $(Agent.BuildDirectory)/$(netHackPath)/sys/windows/vs
|
||||
condition: eq( variables.toolchain, 'vs' )
|
||||
displayName: 'Copying store key'
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: $(Agent.BuildDirectory)/$(netHackPath)/sys/windows/vs/NetHack.sln
|
||||
platform: Win32
|
||||
configuration: Debug
|
||||
condition: eq( variables.toolchain, 'vs' )
|
||||
displayName: 'Visual Studio Build'
|
||||
|
||||
- bash: |
|
||||
export ADD_LUA=Y
|
||||
export WANT_LUAC=N
|
||||
export LUATOP=../submodules/lua
|
||||
export LUASRC=../submodules/lua
|
||||
export ADD_CURSES=Y
|
||||
export PDCURSES_TOP=../submodules/pdcursesmod
|
||||
export LUA_VERSION=5.4.6
|
||||
#
|
||||
# 64-bit
|
||||
#export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r5/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r5.zip
|
||||
#export CURLDST=mingw-x64.zip
|
||||
#export MINGWBIN=mingw64
|
||||
#export MSYSTEM=MINGW64
|
||||
#
|
||||
# 32-bit
|
||||
export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r5/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64ucrt-9.0.0-r5.zip
|
||||
export CURLDST=mingw-x86.zip
|
||||
export MINGWBIN=mingw32
|
||||
export MSYSTEM=MINGW32
|
||||
# all
|
||||
mkdir -p ../lib
|
||||
cd ../lib
|
||||
mkdir -p mingw
|
||||
curl -L $CURLSRC -o $CURLDST
|
||||
#tar -C mingw -xvf $CURLDST
|
||||
#/c/Windows/System32/tar -C mingw -xvf $CURLDST
|
||||
powershell -command "Expand-Archive -Force $CURLDST mingw"
|
||||
export PATH=../lib/mingw/$MINGWBIN/bin:$PATH
|
||||
export
|
||||
cd ../src
|
||||
pwd
|
||||
cp ../sys/windows/Makefile.mingw32* .
|
||||
mingw32-make -f Makefile.mingw32 CI_COMPILER=1 GIT=1 MSYSTEM=$MSYSTEM LUA_VERSION=$LUA_VERSION clean
|
||||
mingw32-make -f Makefile.mingw32 CI_COMPILER=1 GIT=1 MSYSTEM=$MSYSTEM LUA_VERSION=$LUA_VERSION depend
|
||||
mingw32-make -f Makefile.mingw32 CI_COMPILER=1 GIT=1 MSYSTEM=$MSYSTEM LUA_VERSION=$LUA_VERSION
|
||||
condition: eq( variables.toolchain, 'mingw' )
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)/src
|
||||
displayName: 'MinGW Build'
|
||||
|
||||
- bash: |
|
||||
sudo apt-get -qq -y update
|
||||
sudo apt-get -qq -y install libncurses5-dev
|
||||
sudo apt-get -qq -y install libx11-dev libxaw7-dev xfonts-utils qtbase5-dev qtmultimedia5-dev qtbase5-dev-tools
|
||||
condition: eq( variables['Agent.OS'], 'Linux' )
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
|
||||
displayName: 'Getting linux build dependencies'
|
||||
|
||||
- bash: |
|
||||
cd sys/unix
|
||||
sh setup.sh hints/linux.370
|
||||
cd ../..
|
||||
make fetch-lua
|
||||
make WANT_WIN_ALL=1 QT_SELECT=5 MOC=moc all
|
||||
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'all'))
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
|
||||
displayName: 'Building linux full build'
|
||||
|
||||
- bash: |
|
||||
cd sys/unix
|
||||
sh setup.sh hints/linux-minimal
|
||||
cd ../..
|
||||
sed -i '/^#define CLIPPING/d' include/config.h
|
||||
sed -i '/^#define COMPRESS/d' include/config.h
|
||||
#sed -i '/^#define DOAGAIN/d' include/config.h
|
||||
sed -i '/^#define DUMPLOG/d' include/config.h
|
||||
#sed -i '/^#define GDBPATH/d' include/config.h
|
||||
#sed -i '/^#define GREPPATH/d' include/config.h
|
||||
sed -i '/^#define INSURANCE/d' include/config.h
|
||||
sed -i '/^#define ENHANCED_SYMBOLS/d' include/config.h
|
||||
sed -i '/^#define LOGFILE/d' include/config.h
|
||||
sed -i '/^#define NEWS/d' include/config.h
|
||||
sed -i '/^#define PANICLOG/d' include/config.h
|
||||
#sed -i '/^#define STATUS_HILITES/d' include/config.h
|
||||
sed -i '/^#define SYSCF/d' include/config.h
|
||||
sed -i '/^#define USER_SOUNDS/d' include/config.h
|
||||
sed -i '/^#define XLOGFILE/d' include/config.h
|
||||
sed -i '/^#define HANGUPHANDLING/d' include/global.h
|
||||
sed -i '/^#define MAIL/d' include/unixconf.h
|
||||
sed -i '/^#define SHELL/d' include/unixconf.h
|
||||
sed -i '/^#define SUSPEND/d' include/unixconf.h
|
||||
sed -i 's/^#define TEXTCOLOR//' include/unixconf.h
|
||||
make fetch-lua
|
||||
make WANT_WIN_ALL=1 all
|
||||
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'minimal'))
|
||||
displayName: 'Building linux minimal build'
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
|
||||
|
||||
- bash: |
|
||||
cd sys/unix
|
||||
sh setup.sh hints/macos.370
|
||||
cd ../..
|
||||
make fetch-lua
|
||||
make WANT_MACSOUND=1 all
|
||||
condition: eq( variables['Agent.OS'], 'Darwin' )
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
|
||||
displayName: 'Building mac full build'
|
||||
|
||||
- bash: |
|
||||
export GCCVER=gcc1220
|
||||
cd sys/unix
|
||||
sh setup.sh hints/linux.370
|
||||
cd ../..
|
||||
make fetch-lua
|
||||
sh sys/msdos/fetch-cross-compiler.sh
|
||||
retVal=$?
|
||||
if [ $retVal -eq 0 ]; then
|
||||
make LUA_VERSION=5.4.6 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 package
|
||||
fi
|
||||
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.toolchain, 'cross'))
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
|
||||
displayName: 'Building MSDOS build'
|
||||
- bash: |
|
||||
sudo apt-get install texlive
|
||||
make Guidebook
|
||||
make Guidebook.txt
|
||||
make Guidebook.pdf
|
||||
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.toolchain, 'docs'))
|
||||
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
|
||||
displayName: 'Building NetHack documentation'
|
@ -1,10 +0,0 @@
|
||||
*.def NHSUBST
|
||||
*.des NHSUBST
|
||||
*.txt NHSUBST
|
||||
*.lua NHSUBST
|
||||
data.base NHSUBST
|
||||
symbols NHSUBST
|
||||
tribute NHSUBST
|
||||
GENFILES NHSUBST
|
||||
* NH_filestag=(file%s_for_all_versions)
|
||||
..files NH_filegenprog
|
@ -1,27 +0,0 @@
|
||||
options
|
||||
oracles
|
||||
data
|
||||
rip.xpm
|
||||
pet_mark.xbm
|
||||
pilemark.xbm
|
||||
quest.dat
|
||||
rumors
|
||||
bogusmon
|
||||
engrave
|
||||
epitaph
|
||||
x11tiles
|
||||
nhtiles.bmp
|
||||
*.lev
|
||||
spec_levs
|
||||
quest_levs
|
||||
dungeon.pdf
|
||||
dungeon
|
||||
nethack.png
|
||||
nhsplash.xpm
|
||||
nhdat
|
||||
dlb.lst
|
||||
guioptions
|
||||
porthelp
|
||||
NetHack.ad
|
||||
gitinfo.txt
|
||||
|
@ -1,59 +0,0 @@
|
||||
-- NetHack Archeologist Arc-fila.lua $NHDT-Date: 1652195998 2022/05/10 15:19:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster("S")
|
||||
end
|
||||
});
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.monster("S")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster("S")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("S")
|
||||
des.monster("human mummy")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("S")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("S")
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,59 +0,0 @@
|
||||
-- NetHack Archeologist Arc-filb.lua $NHDT-Date: 1652195998 2022/05/10 15:19:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster("M")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.monster("M")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster("M")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("S")
|
||||
des.monster("human mummy")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("S")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("S")
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,115 +0,0 @@
|
||||
-- NetHack Archeologist Arc-goal.lua $NHDT-Date: 1652195998 2022/05/10 15:19:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
|
||||
---------
|
||||
|..|.|..|
|
||||
-----------|..S.S..|-----------
|
||||
|.|........|+-|.|-+|........|.|
|
||||
|.S........S..|.|..S........S.|
|
||||
|.|........|..|.|..|........|.|
|
||||
------------------+------------------
|
||||
|..|..........|.......|..........|..|
|
||||
|..|..........+.......|..........S..|
|
||||
|..S..........|.......+..........|..|
|
||||
|..|..........|.......|..........|..|
|
||||
------------------+------------------
|
||||
|.|........|..|.|..|........|.|
|
||||
|.S........S..|.|..S........S.|
|
||||
|.|........|+-|.|-+|........|.|
|
||||
-----------|..S.S..|-----------
|
||||
|..|.|..|
|
||||
---------
|
||||
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region(selection.area(35,02,36,03), "unlit")
|
||||
des.region(selection.area(40,02,41,03), "unlit")
|
||||
des.region(selection.area(24,04,24,06), "unlit")
|
||||
des.region(selection.area(26,04,33,06), "lit")
|
||||
des.region(selection.area(38,02,38,06), "unlit")
|
||||
des.region(selection.area(43,04,50,06), "lit")
|
||||
des.region(selection.area(52,04,52,06), "unlit")
|
||||
des.region(selection.area(35,05,36,06), "unlit")
|
||||
des.region(selection.area(40,05,41,06), "unlit")
|
||||
des.region(selection.area(21,08,22,11), "unlit")
|
||||
des.region(selection.area(24,08,33,11), "lit")
|
||||
des.region(selection.area(35,08,41,11), "unlit")
|
||||
des.region(selection.area(43,08,52,11), "lit")
|
||||
des.region(selection.area(54,08,55,11), "unlit")
|
||||
des.region(selection.area(24,13,24,15), "unlit")
|
||||
des.region(selection.area(26,13,33,15), "unlit")
|
||||
des.region(selection.area(35,13,36,14), "unlit")
|
||||
des.region(selection.area(35,16,36,17), "unlit")
|
||||
des.region(selection.area(38,13,38,17), "unlit")
|
||||
des.region(selection.area(40,13,41,14), "unlit")
|
||||
des.region(selection.area(40,16,41,17), "unlit")
|
||||
des.region({ region={43,13, 50,15}, lit=0, type="temple", filled=2 })
|
||||
des.region(selection.area(52,13,52,15), "unlit")
|
||||
-- Stairs
|
||||
des.stair("up", 38,10)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- The altar of Huhetotl. Unattended.
|
||||
des.altar({ x=50,y=14,align="chaos",type="altar" })
|
||||
-- Objects
|
||||
des.object({ id = "crystal ball", x=50, y=14,buc="blessed",spe=5,name="The Orb of Detection" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap("rolling boulder",46,14)
|
||||
-- Random monsters.
|
||||
des.monster("Minion of Huhetotl", 50, 14)
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("M")
|
@ -1,145 +0,0 @@
|
||||
-- NetHack Archeologist Arc-loca.lua $NHDT-Date: 1652195999 2022/05/10 15:19:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
........................-------------------------------.....................
|
||||
........................|....|.S......................|.....................
|
||||
........................|....|.|.|+------------------.|.....................
|
||||
........................|....|.|.|.|.........|......|.|.....................
|
||||
........................|....|.|.|.|.........|......|.|.....................
|
||||
........................|---+-.|.|.|..---....+......|.|.....................
|
||||
........................|....|.|.|.---|.|....|......|.|.....................
|
||||
........................|....S.|.|.+..S.|--S-----S--|.|.....................
|
||||
........................|....|.|.|.---|.|....|......+.|.....................
|
||||
........................|---+-.|.|.|..---....|.------.|.....................
|
||||
........................|....|.|.|.|.........|.|....+.|.....................
|
||||
........................|....|.|.|.|.........|+|....|-|.....................
|
||||
........................|....|.|.|------------+------.S.....................
|
||||
........................|....|.S......................|.....................
|
||||
........................-------------------------------.....................
|
||||
............................................................................
|
||||
............................................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region({ region={25,04, 28,07}, lit=1, type="temple", filled=2 })
|
||||
des.region({ region={25,09, 28,11}, lit=0, type="temple", filled=2 })
|
||||
des.region({ region={25,13, 28,16}, lit=1, type="temple", filled=2 })
|
||||
des.region(selection.area(30,04,30,16), "lit")
|
||||
des.region(selection.area(32,04,32,16), "unlit")
|
||||
des.region({ region={33,04, 53,04}, lit=0, type="ordinary", irregular=1 })
|
||||
des.region(selection.area(36,10,37,10), "unlit")
|
||||
des.region(selection.area(39,09,39,11), "unlit")
|
||||
des.region({ region={36,06, 42,08}, lit=0, type="ordinary", irregular=1 })
|
||||
des.region({ region={36,12, 42,14}, lit=0, type="ordinary", irregular=1 })
|
||||
des.region(selection.area(46,06,51,09), "unlit")
|
||||
des.region({ region={46,11, 49,11}, lit=0, type="ordinary", irregular=1 })
|
||||
des.region(selection.area(48,13,51,14), "unlit")
|
||||
-- Doors
|
||||
des.door("closed",31,04)
|
||||
des.door("closed",28,08)
|
||||
des.door("locked",29,10)
|
||||
des.door("closed",28,12)
|
||||
des.door("closed",31,16)
|
||||
des.door("locked",34,05)
|
||||
des.door("locked",35,10)
|
||||
des.door("locked",38,10)
|
||||
des.door("closed",43,10)
|
||||
des.door("closed",45,08)
|
||||
des.door("locked",46,14)
|
||||
des.door("locked",46,15)
|
||||
des.door("locked",49,10)
|
||||
des.door("locked",52,11)
|
||||
des.door("closed",52,13)
|
||||
des.door("closed",54,15)
|
||||
-- Stairs
|
||||
des.stair("up", 03,17)
|
||||
des.stair("down", 39,10)
|
||||
-- Altars - three types. All are unattended.
|
||||
des.altar({ x=26,y=05,align=align[1], type="altar" })
|
||||
des.altar({ x=26,y=10,align=align[2], type="altar" })
|
||||
des.altar({ x=26,y=15,align=align[3], type="altar" })
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Treasure?
|
||||
des.engraving({ type="engrave", text="X marks the spot." })
|
||||
des.engraving({ type="engrave", text="X marks the spot." })
|
||||
des.engraving({ type="engrave", text="X marks the spot." })
|
||||
des.engraving({ type="engrave", text="X marks the spot." })
|
||||
-- Random traps
|
||||
des.trap("spiked pit",24,02)
|
||||
des.trap("spiked pit",37,00)
|
||||
des.trap("spiked pit",23,05)
|
||||
des.trap("spiked pit",26,19)
|
||||
des.trap("spiked pit",55,10)
|
||||
des.trap("spiked pit",55,08)
|
||||
des.trap("pit",51,01)
|
||||
des.trap("pit",23,18)
|
||||
des.trap("pit",31,18)
|
||||
des.trap("pit",48,19)
|
||||
des.trap("pit",55,15)
|
||||
des.trap("magic",60,04)
|
||||
des.trap("statue",72,07)
|
||||
des.trap("statue")
|
||||
des.trap("statue")
|
||||
des.trap("anti magic",64,12)
|
||||
des.trap("sleep gas")
|
||||
des.trap("sleep gas")
|
||||
des.trap("dart")
|
||||
des.trap("dart")
|
||||
des.trap("dart")
|
||||
des.trap("rolling boulder",32,10)
|
||||
des.trap("rolling boulder",40,16)
|
||||
-- Random monsters.
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("S")
|
||||
des.monster("M")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("human mummy")
|
||||
des.monster("M")
|
@ -1,116 +0,0 @@
|
||||
-- NetHack Archeologist Arc-strt.lua $NHDT-Date: 1652195999 2022/05/10 15:19:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Lord Carnarvon
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
....................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.................
|
||||
....................}-------------------------------------}.................
|
||||
....................}|..S......+.................+.......|}.................
|
||||
....................}-S---------------+----------|.......|}.................
|
||||
....................}|.|...............|.......+.|.......|}.................
|
||||
....................}|.|...............---------.---------}.................
|
||||
....................}|.S.\.............+.................+..................
|
||||
....................}|.|...............---------.---------}.................
|
||||
....................}|.|...............|.......+.|.......|}.................
|
||||
....................}-S---------------+----------|.......|}.................
|
||||
....................}|..S......+.................+.......|}.................
|
||||
....................}-------------------------------------}.................
|
||||
....................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.................
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region(selection.area(22,06,23,06), "unlit")
|
||||
des.region(selection.area(25,06,30,06), "unlit")
|
||||
des.region(selection.area(32,06,48,06), "unlit")
|
||||
des.region(selection.area(50,06,56,08), "lit")
|
||||
des.region(selection.area(40,08,46,08), "unlit")
|
||||
des.region(selection.area(22,08,22,12), "unlit")
|
||||
des.region(selection.area(24,08,38,12), "unlit")
|
||||
des.region(selection.area(48,08,48,08), "lit")
|
||||
des.region(selection.area(40,10,56,10), "lit")
|
||||
des.region(selection.area(48,12,48,12), "lit")
|
||||
des.region(selection.area(40,12,46,12), "unlit")
|
||||
des.region(selection.area(50,12,56,14), "lit")
|
||||
des.region(selection.area(22,14,23,14), "unlit")
|
||||
des.region(selection.area(25,14,30,14), "unlit")
|
||||
des.region(selection.area(32,14,48,14), "unlit")
|
||||
-- Stairs
|
||||
des.stair("down", 55,07)
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {63,06,63,06}, type="branch" })
|
||||
-- Doors
|
||||
des.door("closed",22,07)
|
||||
des.door("closed",38,07)
|
||||
des.door("locked",47,08)
|
||||
des.door("locked",23,10)
|
||||
des.door("locked",39,10)
|
||||
des.door("locked",57,10)
|
||||
des.door("locked",47,12)
|
||||
des.door("closed",22,13)
|
||||
des.door("closed",38,13)
|
||||
des.door("locked",24,14)
|
||||
des.door("closed",31,14)
|
||||
des.door("locked",49,14)
|
||||
-- Lord Carnarvon
|
||||
des.monster({ id = "Lord Carnarvon", coord = {25, 10}, inventory = function()
|
||||
des.object({ id = "fedora", spe = 5 });
|
||||
des.object({ id = "bullwhip", spe = 4 });
|
||||
end })
|
||||
-- The treasure of Lord Carnarvon
|
||||
des.object("chest", 25, 10)
|
||||
-- student guards for the audience chamber
|
||||
des.monster("student", 26, 09)
|
||||
des.monster("student", 27, 09)
|
||||
des.monster("student", 28, 09)
|
||||
des.monster("student", 26, 10)
|
||||
des.monster("student", 28, 10)
|
||||
des.monster("student", 26, 11)
|
||||
des.monster("student", 27, 11)
|
||||
des.monster("student", 28, 11)
|
||||
-- city watch guards in the antechambers
|
||||
des.monster("watchman", 50, 06)
|
||||
des.monster("watchman", 50, 14)
|
||||
-- Eels in the moat
|
||||
des.monster("giant eel", 20, 10)
|
||||
des.monster("giant eel", 45, 04)
|
||||
des.monster("giant eel", 33, 16)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty.
|
||||
des.monster("S", 60, 09)
|
||||
des.monster("M", 60, 10)
|
||||
des.monster("S", 60, 11)
|
||||
des.monster("S", 60, 12)
|
||||
des.monster("M", 60, 13)
|
||||
des.monster("S", 61, 10)
|
||||
des.monster("S", 61, 11)
|
||||
des.monster("S", 61, 12)
|
||||
des.monster("S", 30, 03)
|
||||
des.monster("M", 20, 17)
|
||||
des.monster("S", 67, 02)
|
||||
des.monster("S", 10, 19)
|
@ -1,33 +0,0 @@
|
||||
-- NetHack Barbarian Bar-fila.lua $NHDT-Date: 1652195999 2022/05/10 15:19:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg=".", smoothed=true, joined=true, lit=0, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ class = "O", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
@ -1,44 +0,0 @@
|
||||
-- NetHack Barbarian Bar-filb.lua $NHDT-Date: 1652196000 2022/05/10 15:20:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, lit=0, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ class = "O", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ class = "T", peaceful=0 })
|
@ -1,95 +0,0 @@
|
||||
-- NetHack Barbarian Bar-goal.lua $NHDT-Date: 1652196000 2022/05/10 15:20:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
|
||||
.............
|
||||
..................
|
||||
.... ......................... ....
|
||||
....... .......................... .......
|
||||
...... ........................ .......
|
||||
.. ...................................... ..
|
||||
.. ..................... ..
|
||||
.. .................. ..
|
||||
.. ..S...S.............. ................
|
||||
.. ........ ...
|
||||
......... ..
|
||||
...... .. ... ....
|
||||
.. ... .. ...... ........
|
||||
.... .. .................. ........ ......
|
||||
...... ...................... ...... ..
|
||||
.... .................. ...........
|
||||
..............
|
||||
...........
|
||||
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "unlit")
|
||||
-- Secret doors
|
||||
des.door("locked",22,09)
|
||||
des.door("locked",26,09)
|
||||
-- Stairs
|
||||
des.stair("up", 36,05)
|
||||
-- The altar. Unattended.
|
||||
des.altar({ x=63,y=04,align="noncoaligned", type="altar" })
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object({ id = "luckstone", x=63, y=04,buc="blessed",spe=0,name="The Heart of Ahriman" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "Thoth Amon", x=63, y=04, peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ class = "O", peaceful=0 })
|
||||
des.monster({ class = "O", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ class = "T", peaceful=0 })
|
||||
des.wallify()
|
||||
|
@ -1,107 +0,0 @@
|
||||
-- NetHack Barbarian Bar-loca.lua $NHDT-Date: 1652196000 2022/05/10 15:20:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
..........PPP.........................................
|
||||
...........PP.......................................... .......
|
||||
..........PP...........-----..........------------------ ..........
|
||||
...........PP..........+...|..........|....S...........|.. ............
|
||||
..........PPP..........|...|..........|-----...........|... .............
|
||||
...........PPP.........-----..........+....+...........|... .............
|
||||
..........PPPPPPPPP...................+....+...........S.................
|
||||
........PPPPPPPPPPPPP.........-----...|-----...........|................
|
||||
......PPPPPPPPPPPPPP..P.......+...|...|....S...........| ...
|
||||
.....PPPPPPP......P..PPPP.....|...|...------------------.. ...
|
||||
....PPPPPPP.........PPPPPP....-----........................ ........
|
||||
...PPPPPPP..........PPPPPPP.................................. ..........
|
||||
....PPPPPPP........PPPPPPP.................................... ..........
|
||||
.....PPPPP........PPPPPPP.........-----........................ ........
|
||||
......PPP..PPPPPPPPPPPP...........+...|......................... .....
|
||||
..........PPPPPPPPPPP.............|...|......................... ....
|
||||
..........PPPPPPPPP...............-----......................... .
|
||||
..............PPP.................................................
|
||||
...............PP....................................................
|
||||
................PPP...................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region(selection.area(24,03,26,04), "unlit")
|
||||
des.region(selection.area(31,08,33,09), "unlit")
|
||||
des.region(selection.area(35,14,37,15), "unlit")
|
||||
des.region(selection.area(39,03,54,08), "lit")
|
||||
des.region(selection.area(56,00,75,08), "unlit")
|
||||
des.region(selection.area(64,09,75,16), "unlit")
|
||||
-- Doors
|
||||
des.door("open",23,03)
|
||||
des.door("open",30,08)
|
||||
des.door("open",34,14)
|
||||
des.door("locked",38,05)
|
||||
des.door("locked",38,06)
|
||||
des.door("closed",43,03)
|
||||
des.door("closed",43,05)
|
||||
des.door("closed",43,06)
|
||||
des.door("closed",43,08)
|
||||
des.door("locked",55,06)
|
||||
-- Stairs
|
||||
des.stair("up", 05,02)
|
||||
des.stair("down", 70,13)
|
||||
-- Objects
|
||||
des.object({ x = 42, y = 03 })
|
||||
des.object({ x = 42, y = 03 })
|
||||
des.object({ x = 42, y = 03 })
|
||||
des.object({ x = 41, y = 03 })
|
||||
des.object({ x = 41, y = 03 })
|
||||
des.object({ x = 41, y = 03 })
|
||||
des.object({ x = 41, y = 03 })
|
||||
des.object({ x = 41, y = 08 })
|
||||
des.object({ x = 41, y = 08 })
|
||||
des.object({ x = 42, y = 08 })
|
||||
des.object({ x = 42, y = 08 })
|
||||
des.object({ x = 42, y = 08 })
|
||||
des.object({ x = 71, y = 13 })
|
||||
des.object({ x = 71, y = 13 })
|
||||
des.object({ x = 71, y = 13 })
|
||||
-- Random traps
|
||||
des.trap("spiked pit",10,13)
|
||||
des.trap("spiked pit",21,07)
|
||||
des.trap("spiked pit",67,08)
|
||||
des.trap("spiked pit",68,09)
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "ogre", x=12, y=09, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=18, y=11, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=45, y=05, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=45, y=06, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=47, y=05, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=46, y=05, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=56, y=03, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=56, y=04, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=56, y=05, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=56, y=06, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=57, y=03, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=57, y=04, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=57, y=05, peaceful=0 })
|
||||
des.monster({ id = "ogre", x=57, y=06, peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ id = "ogre", peaceful=0 })
|
||||
des.monster({ class = "O", peaceful=0 })
|
||||
des.monster({ class = "T", peaceful=0 })
|
||||
des.monster({ id = "rock troll", x=46, y=06, peaceful=0 })
|
||||
des.monster({ id = "rock troll", x=47, y=06, peaceful=0 })
|
||||
des.monster({ id = "rock troll", x=56, y=07, peaceful=0 })
|
||||
des.monster({ id = "rock troll", x=57, y=07, peaceful=0 })
|
||||
des.monster({ id = "rock troll", x=70, y=13, peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ id = "rock troll", peaceful=0 })
|
||||
des.monster({ class = "T", peaceful=0 })
|
||||
|
@ -1,99 +0,0 @@
|
||||
-- NetHack Barbarian Bar-strt.lua $NHDT-Date: 1652196001 2022/05/10 15:20:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Pelias,
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
..................................PP........................................
|
||||
...................................PP.......................................
|
||||
...................................PP.......................................
|
||||
....................................PP......................................
|
||||
........--------------......-----....PPP....................................
|
||||
........|...S........|......+...|...PPP.....................................
|
||||
........|----........|......|...|....PP.....................................
|
||||
........|.\..........+......-----...........................................
|
||||
........|----........|...............PP.....................................
|
||||
........|...S........|...-----.......PPP....................................
|
||||
........--------------...+...|......PPPPP...................................
|
||||
.........................|...|.......PPP....................................
|
||||
...-----......-----......-----........PP....................................
|
||||
...|...+......|...+..--+--.............PP...................................
|
||||
...|...|......|...|..|...|..............PP..................................
|
||||
...-----......-----..|...|.............PPPP.................................
|
||||
.....................-----............PP..PP................................
|
||||
.....................................PP...PP................................
|
||||
....................................PP...PP.................................
|
||||
....................................PP....PP................................
|
||||
]]);
|
||||
|
||||
-- the forest beyond the river
|
||||
des.replace_terrain({ region={37,00, 59,19}, fromterrain=".", toterrain="T", chance=5 })
|
||||
des.replace_terrain({ region={60,00, 64,19}, fromterrain=".", toterrain="T", chance=10 })
|
||||
des.replace_terrain({ region={65,00, 75,19}, fromterrain=".", toterrain="T", chance=20 })
|
||||
-- guarantee a path and free spot for the portal
|
||||
des.terrain(selection.randline(selection.new(), 37,7, 62,02, 7), ".")
|
||||
des.terrain({62,02}, ".")
|
||||
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region(selection.area(09,05,11,05), "unlit")
|
||||
des.region(selection.area(09,07,11,07), "lit")
|
||||
des.region(selection.area(09,09,11,09), "unlit")
|
||||
des.region(selection.area(13,05,20,09), "lit")
|
||||
des.region(selection.area(29,05,31,06), "lit")
|
||||
des.region(selection.area(26,10,28,11), "lit")
|
||||
des.region(selection.area(04,13,06,14), "lit")
|
||||
des.region(selection.area(15,13,17,14), "lit")
|
||||
des.region(selection.area(22,14,24,15), "lit")
|
||||
-- Stairs
|
||||
des.stair("down", 09,09)
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {62,02,62,02}, type="branch" })
|
||||
-- Doors
|
||||
des.door("locked",12,05)
|
||||
des.door("locked",12,09)
|
||||
des.door("closed",21,07)
|
||||
des.door("open",07,13)
|
||||
des.door("open",18,13)
|
||||
des.door("open",23,13)
|
||||
des.door("open",25,10)
|
||||
des.door("open",28,05)
|
||||
-- Elder
|
||||
des.monster({ id = "Pelias", coord = {10, 07}, inventory = function()
|
||||
des.object({ id = "runesword", spe = 5 });
|
||||
des.object({ id = "chain mail", spe = 5 });
|
||||
end })
|
||||
-- The treasure of Pelias
|
||||
des.object("chest", 09, 05)
|
||||
-- chieftain guards for the audience chamber
|
||||
des.monster("chieftain", 10, 05)
|
||||
des.monster("chieftain", 10, 09)
|
||||
des.monster("chieftain", 11, 05)
|
||||
des.monster("chieftain", 11, 09)
|
||||
des.monster("chieftain", 14, 05)
|
||||
des.monster("chieftain", 14, 09)
|
||||
des.monster("chieftain", 16, 05)
|
||||
des.monster("chieftain", 16, 09)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- One trap to keep the ogres at bay.
|
||||
des.trap("spiked pit",37,07)
|
||||
-- Eels in the river
|
||||
des.monster("giant eel", 36, 01)
|
||||
des.monster("giant eel", 37, 09)
|
||||
des.monster("giant eel", 39, 15)
|
||||
-- Monsters on siege duty.
|
||||
local ogrelocs = selection.floodfill(37,7) & selection.area(40,03, 45,20)
|
||||
for i = 0, 11 do
|
||||
des.monster({ id = "ogre", coord = ogrelocs:rndcoord(1), peaceful = 0 })
|
||||
end
|
@ -1,35 +0,0 @@
|
||||
-- NetHack Caveman Cav-fila.lua $NHDT-Date: 1652196001 2022/05/10 15:20:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style = "mines", fg = ".", bg = " ", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ class = "h", peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
@ -1,41 +0,0 @@
|
||||
-- NetHack Caveman Cav-filb.lua $NHDT-Date: 1652196001 2022/05/10 15:20:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style = "mines", fg = ".", bg = " ", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ class = "h", peaceful=0 })
|
||||
des.monster({ class = "h", peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
@ -1,59 +0,0 @@
|
||||
-- NetHack Caveman Cav-goal.lua $NHDT-Date: 1652196002 2022/05/10 15:20:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
|
||||
.....................
|
||||
.......................
|
||||
.........................
|
||||
...........................
|
||||
.............................
|
||||
...............................
|
||||
.................................
|
||||
...................................
|
||||
.....................................
|
||||
.......................................
|
||||
.....................................
|
||||
...................................
|
||||
.................................
|
||||
...............................
|
||||
.............................
|
||||
...........................
|
||||
.........................
|
||||
.......................
|
||||
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
-- Stairs
|
||||
des.stair("up")
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object({ id = "mace", x=23, y=10, buc="blessed", spe=0, name="The Sceptre of Might" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- monsters.
|
||||
des.monster({ id = "Chromatic Dragon", x=23, y=10, asleep=1 })
|
||||
des.monster("shrieker", 26, 13)
|
||||
des.monster("shrieker", 25, 8)
|
||||
des.monster("shrieker", 45, 11)
|
||||
des.wallify()
|
@ -1,101 +0,0 @@
|
||||
-- NetHack Caveman Cav-loca.lua $NHDT-Date: 1652196002 2022/05/10 15:20:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
|
||||
............. ...........
|
||||
............... .............
|
||||
............. ............... ..........
|
||||
........... ............. ...............
|
||||
... ... ..................
|
||||
... .......... ... ..................
|
||||
... ............ BBB...................
|
||||
... .......... ......................
|
||||
..... .. .....B........................
|
||||
.... ............... . ........B..........................
|
||||
...... .. .............S.............. ..................
|
||||
.... .. ........... ...............
|
||||
.. ... ....................
|
||||
.... BB...................
|
||||
.. .. .. ...............
|
||||
.. ....... .... ..... .... .. ....... S
|
||||
............ ....... .. ....... ..... ... ....
|
||||
....... ..... ...... .......
|
||||
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "unlit")
|
||||
des.region({ region={52,06, 73,15}, lit=1, type="ordinary", irregular=1 })
|
||||
-- Doors
|
||||
des.door("locked",28,11)
|
||||
-- Stairs
|
||||
des.stair("up", 04,03)
|
||||
des.stair("down", 73,10)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "bugbear", x=02, y=10, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=03, y=11, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=04, y=12, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=02, y=11, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=16, y=16, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=17, y=17, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=18, y=18, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=19, y=16, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=30, y=06, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=31, y=07, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=32, y=08, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=33, y=06, peaceful=0 })
|
||||
des.monster({ id = "bugbear", x=34, y=07, peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ id = "bugbear", peaceful=0 })
|
||||
des.monster({ class = "h", peaceful=0 })
|
||||
des.monster({ class = "H", peaceful=0 })
|
||||
des.monster({ id = "hill giant", x=03, y=12, peaceful=0 })
|
||||
des.monster({ id = "hill giant", x=20, y=17, peaceful=0 })
|
||||
des.monster({ id = "hill giant", x=35, y=08, peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
||||
des.monster({ id = "hill giant", peaceful=0 })
|
||||
des.monster({ class = "H", peaceful=0 })
|
||||
des.wallify()
|
||||
|
||||
--
|
||||
-- The "goal" level for the quest.
|
||||
--
|
||||
-- Here you meet Tiamat your nemesis monster. You have to
|
||||
-- defeat Tiamat in combat to gain the artifact you have
|
||||
-- been assigned to retrieve.
|
||||
--
|
@ -1,94 +0,0 @@
|
||||
-- NetHack Caveman Cav-strt.lua $NHDT-Date: 1652196002 2022/05/10 15:20:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Shaman Karnov
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
|
||||
...... .......................... ... .... ......
|
||||
...... .......................... ........ .... .....
|
||||
..BB ............................. ......... .... ..
|
||||
.. ...................... ....... .. .... ..
|
||||
.. .................... .. ....... .. ...
|
||||
.. S BB ..... ....... .... ....
|
||||
.. ... . .. ........ .. .. .. ...
|
||||
.. ...... .. ............ .. ...
|
||||
. .... .. ........ .. ...........
|
||||
... .. .. ............. ...................
|
||||
..... ..... ............................... ...........
|
||||
.....B................ ... ...
|
||||
..... . .......... .... . ... .......... ...
|
||||
... .. ............. .. ................... ....
|
||||
BB .. ......... BB ... .......... .. ... ...
|
||||
...... ..... B ........ .. .. .... ...
|
||||
.......... .......... ..... ... ..... ........
|
||||
.. ... . ..... .... .. ... ..
|
||||
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "unlit")
|
||||
des.region({ region={13,01, 40,05}, lit=1, type="temple", filled=1, irregular=1 })
|
||||
-- The occupied rooms.
|
||||
des.region({ region={02,01, 08,03}, lit=1, type="ordinary", irregular=1 })
|
||||
des.region({ region={01,11, 06,14}, lit=1, type="ordinary", irregular=1 })
|
||||
des.region({ region={13,08, 18,10}, lit=1, type="ordinary", irregular=1 })
|
||||
des.region({ region={05,17, 14,18}, lit=1, type="ordinary", irregular=1 })
|
||||
des.region({ region={17,16, 23,18}, lit=1, type="ordinary", irregular=1 })
|
||||
des.region({ region={35,16, 44,18}, lit=1, type="ordinary", irregular=1 })
|
||||
-- Stairs
|
||||
des.stair("down", 02,03)
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {71,09,71,09}, type="branch" })
|
||||
-- Doors
|
||||
des.door("locked",19,06)
|
||||
-- The temple altar (this will force a priest(ess) to be created)
|
||||
des.altar({ x=36,y=02, align="coaligned", type="shrine" })
|
||||
-- Shaman Karnov
|
||||
des.monster({ id = "Shaman Karnov", coord = {35, 02}, inventory = function()
|
||||
des.object({ id = "leather armor", spe = 5 });
|
||||
des.object({ id = "club", spe = 5 });
|
||||
end })
|
||||
-- The treasure of Shaman Karnov
|
||||
des.object("chest", 34, 02)
|
||||
-- neanderthal guards for the audience chamber
|
||||
des.monster("neanderthal", 20, 03)
|
||||
des.monster("neanderthal", 20, 02)
|
||||
des.monster("neanderthal", 20, 01)
|
||||
des.monster("neanderthal", 21, 03)
|
||||
des.monster("neanderthal", 21, 02)
|
||||
des.monster("neanderthal", 21, 01)
|
||||
des.monster("neanderthal", 22, 01)
|
||||
des.monster("neanderthal", 26, 09)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Random traps
|
||||
des.trap("pit",47,11)
|
||||
des.trap("pit",57,10)
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty (in the outer caves).
|
||||
des.monster({ id ="bugbear", x=47, y=02, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=48, y=03, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=49, y=04, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=67, y=03, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=69, y=04, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=51, y=13, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=53, y=14, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=55, y=15, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=63, y=10, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=65, y=09, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=67, y=10, peaceful=0 })
|
||||
des.monster({ id ="bugbear", x=69, y=11, peaceful=0 })
|
||||
des.wallify()
|
@ -1,46 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# NetHack 3.7 GENFILES $NHDT-Date: 1596498242 2020/08/03 23:44:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) 2018 by Kenneth Lorber
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# 2 sections:
|
||||
# *.lev entries are generated by reading *.des
|
||||
# hardcoded entries are in __DATA__
|
||||
|
||||
($dir = $0) =~ s!^(.*/)(.*)!$1!;
|
||||
|
||||
#print "T (files generated by lev_comp at playground creation time)\n";
|
||||
#
|
||||
#foreach $des (<$dir*.des>){
|
||||
# open IN, "<", $des or warn("Can't open $des: $!");
|
||||
# while(<IN>){
|
||||
# m/^(MAZE|LEVEL):\s*"(.*?)"/ && do {
|
||||
# print "F $2.lev\n";
|
||||
# };
|
||||
# }
|
||||
# close IN;
|
||||
#}
|
||||
while(<DATA>){
|
||||
print;
|
||||
}
|
||||
|
||||
__DATA__
|
||||
T (tile files optionally generated for X ports at playground creation time)
|
||||
F pet_mark.xbm
|
||||
F rip.xpm
|
||||
F x11tiles
|
||||
T (files generated for Qt interface on macOS)
|
||||
F nethack.icns
|
||||
F Info.plist
|
||||
T (files generated for windows at compile time)
|
||||
F porthelp
|
||||
F dlb.lst
|
||||
T (files generated for windows tty at compile time)
|
||||
F ttyoptions
|
||||
T (files generated for windows gui at compile time)
|
||||
F guioptions
|
||||
T (files generated by makedefs at playground creation time)
|
||||
F data
|
||||
F options
|
||||
F oracles
|
||||
F rumors
|
@ -1,42 +0,0 @@
|
||||
-- NetHack Healer Hea-fila.lua $NHDT-Date: 1652196003 2022/05/10 15:20:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "P" });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster("rabid rat")
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
des.monster("giant eel")
|
||||
des.monster("giant eel")
|
||||
des.monster("electric eel")
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,50 +0,0 @@
|
||||
-- NetHack Healer Hea-filb.lua $NHDT-Date: 1652196003 2022/05/10 15:20:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "P" });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
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({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,90 +0,0 @@
|
||||
-- NetHack Healer Hea-goal.lua $NHDT-Date: 1652196003 2022/05/10 15:20:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "P" });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
--
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
.P....................................PP.
|
||||
PP.......PPPPPPP....PPPPPPP....PPPP...PP.
|
||||
...PPPPPPP....PPPPPPP.....PPPPPP..PPP...P
|
||||
...PP..............................PPP...
|
||||
..PP..............................PP.....
|
||||
..PP..............................PPP....
|
||||
..PPP..............................PP....
|
||||
.PPP..............................PPPP...
|
||||
...PP............................PPP...PP
|
||||
..PPPP...PPPPP..PPPP...PPPPP.....PP...PP.
|
||||
P....PPPPP...PPPP..PPPPP...PPPPPPP...PP..
|
||||
PPP..................................PPP.
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,40,11), "lit")
|
||||
-- Stairs
|
||||
des.stair("up", 39,10)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,40,11))
|
||||
-- Objects
|
||||
des.object({ id = "quarterstaff", x=20, y=06, buc="blessed", spe=0, name="The Staff of Aesculapius" })
|
||||
des.object("wand of lightning", 20, 06)
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "Cyclops", x=20, y=06, peaceful=0 })
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
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("shark")
|
||||
des.monster("shark")
|
||||
des.monster({ class = ";", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
|
@ -1,97 +0,0 @@
|
||||
-- NetHack Healer Hea-loca.lua $NHDT-Date: 1652196004 2022/05/10 15:20:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor");
|
||||
--
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=true ,joined=true, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
PPPPPPPPPPPPP.......PPPPPPPPPPP
|
||||
PPPPPPPP...............PPPPPPPP
|
||||
PPPP.....-------------...PPPPPP
|
||||
PPPPP....|.S.........|....PPPPP
|
||||
PPP......+.|.........|...PPPPPP
|
||||
PPP......+.|.........|..PPPPPPP
|
||||
PPPP.....|.S.........|..PPPPPPP
|
||||
PPPPP....-------------....PPPPP
|
||||
PPPPPPPP...............PPPPPPPP
|
||||
PPPPPPPPPPP........PPPPPPPPPPPP
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,30,09), "lit")
|
||||
des.region({ region={12,03, 20,06}, lit=1, type="temple", filled=1 })
|
||||
-- Doors
|
||||
des.door("closed",09,04)
|
||||
des.door("closed",09,05)
|
||||
des.door("locked",11,03)
|
||||
des.door("locked",11,06)
|
||||
-- Stairs
|
||||
des.stair("up", 04,04)
|
||||
des.stair("down", 20,06)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(11,02,21,07))
|
||||
-- Altar in the temple.
|
||||
des.altar({ x=13,y=05, align="chaos", type="shrine" })
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster({ class = "r", peaceful=0 })
|
||||
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("kraken")
|
||||
des.monster("shark")
|
||||
des.monster("shark")
|
||||
des.monster({ class = ";", peaceful=0 })
|
||||
des.monster({ class = ";", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
@ -1,109 +0,0 @@
|
||||
-- NetHack Healer Hea-strt.lua $NHDT-Date: 1652196004 2022/05/10 15:20:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Hippocrates
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
|
||||
PPPP........PPPP.....PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.P..PPPPP......PPPPPPPP
|
||||
PPP..........PPPP...PPPPP.........................PPPP..PPPPP........PPPPPPP
|
||||
PP............PPPPPPPP..............................PPP...PPPP......PPPPPPPP
|
||||
P.....PPPPPPPPPPPPPPP................................PPPPPPPPPPPPPPPPPPPPPPP
|
||||
PPPP....PPPPPPPPPPPP...................................PPPPP.PPPPPPPPPPPPPPP
|
||||
PPPP........PPPPP.........-----------------------........PP...PPPPPPP.....PP
|
||||
PPP............PPPPP....--|.|......S..........S.|--.....PPPP.PPPPPPP.......P
|
||||
PPPP..........PPPPP.....|.S.|......-----------|S|.|......PPPPPP.PPP.......PP
|
||||
PPPPPP......PPPPPP......|.|.|......|...|......|.|.|.....PPPPPP...PP.......PP
|
||||
PPPPPPPPPPPPPPPPPPP.....+.|.|......S.\.S......|.|.+......PPPPPP.PPPP.......P
|
||||
PPP...PPPPP...PPPP......|.|.|......|...|......|.|.|.......PPPPPPPPPPP.....PP
|
||||
PP.....PPP.....PPP......|.|S|-----------......|.S.|......PPPPPPPPPPPPPPPPPPP
|
||||
PPP..PPPPP...PPPP.......--|.S..........S......|.|--.....PPPPPPPPP....PPPPPPP
|
||||
PPPPPPPPPPPPPPPP..........-----------------------..........PPPPP..........PP
|
||||
PPPPPPPPPPPPPPPPP........................................PPPPPP............P
|
||||
PPP.............PPPP...................................PPP..PPPP..........PP
|
||||
PP...............PPPPP................................PPPP...PPPP........PPP
|
||||
PPP.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP....PPPPPP
|
||||
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
|
||||
]]);
|
||||
|
||||
des.replace_terrain({ region={01,01, 74,18}, fromterrain="P", toterrain=".", chance=10 })
|
||||
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
-- Stairs
|
||||
des.stair("down", 37,9)
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {04,12,04,12}, type="branch" })
|
||||
-- altar for the Temple
|
||||
des.altar({ x=32,y=09,align="neutral",type="altar" })
|
||||
-- Doors
|
||||
des.door("locked",24,10)
|
||||
des.door("closed",26,08)
|
||||
des.door("closed",27,12)
|
||||
des.door("locked",28,13)
|
||||
des.door("closed",35,07)
|
||||
des.door("locked",35,10)
|
||||
des.door("locked",39,10)
|
||||
des.door("closed",39,13)
|
||||
des.door("locked",46,07)
|
||||
des.door("closed",47,08)
|
||||
des.door("closed",48,12)
|
||||
des.door("locked",50,10)
|
||||
-- Hippocrates
|
||||
des.monster({ id = "Hippocrates", coord = {37, 10}, inventory = function()
|
||||
des.object({ id = "silver dagger", spe = 5 });
|
||||
end })
|
||||
-- The treasure of Hippocrates
|
||||
des.object("chest", 37, 10)
|
||||
-- intern guards for the audience chamber
|
||||
des.monster("attendant", 29, 08)
|
||||
des.monster("attendant", 29, 09)
|
||||
des.monster("attendant", 29, 10)
|
||||
des.monster("attendant", 29, 11)
|
||||
des.monster("attendant", 40, 09)
|
||||
des.monster("attendant", 40, 10)
|
||||
des.monster("attendant", 40, 11)
|
||||
des.monster("attendant", 40, 13)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty.
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("rabid rat")
|
||||
des.monster("giant eel")
|
||||
des.monster("shark")
|
||||
des.monster(";")
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "D", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
||||
des.monster({ class = "S", peaceful=0 })
|
@ -1,35 +0,0 @@
|
||||
-- NetHack Knight Kni-fila.lua $NHDT-Date: 1652196004 2022/05/10 15:20:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "." });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ class = "i", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,40 +0,0 @@
|
||||
-- NetHack Knight Kni-filb.lua $NHDT-Date: 1652196005 2022/05/10 15:20:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "." });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ class = "i", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,99 +0,0 @@
|
||||
-- NetHack Knight Kni-goal.lua $NHDT-Date: 1652196005 2022/05/10 15:20:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
....PPPP..PPP..
|
||||
.PPPPP...PP.. .......... .................................
|
||||
..PPPPP...P.. ........... ...................................
|
||||
..PPP....... ........... ......................................
|
||||
...PPP....... ......... ............... .....................
|
||||
........... ............ ............ ......................
|
||||
............ ............. ....... .....................
|
||||
.............................. .........................
|
||||
............................... ..................................
|
||||
............................. ....................................
|
||||
......... ......................................................
|
||||
.....PP... .....................................................
|
||||
.....PPP.... ....................................................
|
||||
......PPP.... .............. ....................................
|
||||
.......PPP.... ............. .....................................
|
||||
........PP... ............ ......................................
|
||||
...PPP........ .......... ..................................
|
||||
..PPPPP........ .......... ..............................
|
||||
....PPPPP...... ......... ..........................
|
||||
.......PPPP...
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,14,19), "lit")
|
||||
des.region(selection.area(15,00,75,19), "unlit")
|
||||
-- Stairs
|
||||
des.stair("up", 03,08)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object({ id = "mirror", x=50,y=06, buc="blessed", spe=0, name="The Magic Mirror of Merlin" })
|
||||
des.object({ coord = { 33, 01 } })
|
||||
des.object({ coord = { 33, 02 } })
|
||||
des.object({ coord = { 33, 03 } })
|
||||
des.object({ coord = { 33, 04 } })
|
||||
des.object({ coord = { 33, 05 } })
|
||||
des.object({ coord = { 34, 01 } })
|
||||
des.object({ coord = { 34, 02 } })
|
||||
des.object({ coord = { 34, 03 } })
|
||||
des.object({ coord = { 34, 04 } })
|
||||
des.object({ coord = { 34, 05 } })
|
||||
des.object({ coord = { 35, 01 } })
|
||||
des.object({ coord = { 35, 02 } })
|
||||
des.object({ coord = { 35, 03 } })
|
||||
des.object({ coord = { 35, 04 } })
|
||||
des.object({ coord = { 35, 05 } })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap("spiked pit",13,07)
|
||||
des.trap("spiked pit",12,08)
|
||||
des.trap("spiked pit",12,09)
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "Ixoth", x=50, y=06, peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ class = "i", peaceful=0 })
|
||||
des.monster({ class = "i", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ class = "j", peaceful=0 })
|
@ -1,137 +0,0 @@
|
||||
-- NetHack Knight Kni-loca.lua $NHDT-Date: 1652196005 2022/05/10 15:20:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor")
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
xxxxxxxxx......xxxx...........xxxxxxxxxx
|
||||
xxxxxxx.........xxx.............xxxxxxxx
|
||||
xxxx..............................xxxxxx
|
||||
xx.................................xxxxx
|
||||
....................................xxxx
|
||||
.......................................x
|
||||
........................................
|
||||
xx...................................xxx
|
||||
xxxx..............................xxxxxx
|
||||
xxxxxx..........................xxxxxxxx
|
||||
xxxxxxxx.........xx..........xxxxxxxxxxx
|
||||
xxxxxxxxx.......xxxxxx.....xxxxxxxxxxxxx
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
-- The Isle of Glass is a Tor rising out of the swamps surrounding it.
|
||||
des.region(selection.area(00,00,39,11), "lit")
|
||||
-- The top area of the Tor is a holy site.
|
||||
des.region({ region={09,02, 27,09}, lit=1, type="temple", filled=2 })
|
||||
-- Stairs
|
||||
des.stair("up", 38,0)
|
||||
des.stair("down", 18,05)
|
||||
-- The altar atop the Tor and its attendant (creating altar makes the priest).
|
||||
des.altar({ x=17, y=05, align="neutral", type="shrine" })
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
-- All of the avenues are guarded by magic except for the East.
|
||||
-- South
|
||||
des.trap("magic",08,11)
|
||||
des.trap("magic",09,11)
|
||||
des.trap("magic",10,11)
|
||||
des.trap("magic",11,11)
|
||||
des.trap("magic",12,11)
|
||||
des.trap("magic",13,11)
|
||||
des.trap("magic",14,11)
|
||||
des.trap("magic",15,11)
|
||||
des.trap("magic",16,11)
|
||||
des.trap("magic",20,11)
|
||||
des.trap("magic",21,11)
|
||||
des.trap("magic",22,11)
|
||||
des.trap("magic",23,11)
|
||||
des.trap("magic",24,11)
|
||||
des.trap("magic",25,11)
|
||||
des.trap("magic",26,11)
|
||||
des.trap("magic",27,11)
|
||||
des.trap("magic",28,11)
|
||||
-- West
|
||||
des.trap("magic",00,03)
|
||||
des.trap("magic",00,04)
|
||||
des.trap("magic",00,05)
|
||||
des.trap("magic",00,06)
|
||||
-- North
|
||||
des.trap("magic",06,00)
|
||||
des.trap("magic",07,00)
|
||||
des.trap("magic",08,00)
|
||||
des.trap("magic",09,00)
|
||||
des.trap("magic",10,00)
|
||||
des.trap("magic",11,00)
|
||||
des.trap("magic",12,00)
|
||||
des.trap("magic",13,00)
|
||||
des.trap("magic",14,00)
|
||||
des.trap("magic",19,00)
|
||||
des.trap("magic",20,00)
|
||||
des.trap("magic",21,00)
|
||||
des.trap("magic",22,00)
|
||||
des.trap("magic",23,00)
|
||||
des.trap("magic",24,00)
|
||||
des.trap("magic",25,00)
|
||||
des.trap("magic",26,00)
|
||||
des.trap("magic",27,00)
|
||||
des.trap("magic",28,00)
|
||||
des.trap("magic",29,00)
|
||||
des.trap("magic",30,00)
|
||||
des.trap("magic",31,00)
|
||||
des.trap("magic",32,00)
|
||||
-- Even so, there are magic "sinkholes" around.
|
||||
des.trap("anti magic")
|
||||
des.trap("anti magic")
|
||||
des.trap("anti magic")
|
||||
des.trap("anti magic")
|
||||
des.trap("anti magic")
|
||||
des.trap("anti magic")
|
||||
des.trap("anti magic")
|
||||
-- Random monsters.
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ id = "quasit", peaceful=0 })
|
||||
des.monster({ class = "i", peaceful=0 })
|
||||
des.monster({ class = "j", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ id = "ochre jelly", peaceful=0 })
|
||||
des.monster({ class = "j", peaceful=0 })
|
@ -1,109 +0,0 @@
|
||||
-- NetHack Knight Kni-strt.lua $NHDT-Date: 1652196006 2022/05/10 15:20:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, King Arthur
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "." });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
-- This is a kludge to init the level as a lit field.
|
||||
des.level_init({ style="mines", fg=".", bg=".", smoothed=false, joined=false, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
..................................................
|
||||
.-----......................................-----.
|
||||
.|...|......................................|...|.
|
||||
.--|+-------------------++-------------------+|--.
|
||||
...|...................+..+...................|...
|
||||
...|.|-----------------|++|-----------------|.|...
|
||||
...|.|.................|..|.........|.......|.|...
|
||||
...|.|...\.............+..+.........|.......|.|...
|
||||
...|.|.................+..+.........+.......|.|...
|
||||
...|.|.................|..|.........|.......|.|...
|
||||
...|.|--------------------------------------|.|...
|
||||
...|..........................................|...
|
||||
.--|+----------------------------------------+|--.
|
||||
.|...|......................................|...|.
|
||||
.-----......................................-----.
|
||||
..................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,49,15), "lit")
|
||||
des.region(selection.area(04,04,45,11), "unlit")
|
||||
des.region({ region={06,06,22,09}, lit=1, type="throne", filled=2 })
|
||||
des.region(selection.area(27,06,43,09), "lit")
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {20,14,20,14}, type="branch" })
|
||||
-- Stairs
|
||||
des.stair("down", 40,7)
|
||||
-- Doors
|
||||
-- Outside Doors
|
||||
des.door("locked",24,03)
|
||||
des.door("locked",25,03)
|
||||
-- Inside Doors
|
||||
des.door("closed",23,04)
|
||||
des.door("closed",26,04)
|
||||
des.door("locked",24,05)
|
||||
des.door("locked",25,05)
|
||||
des.door("closed",23,07)
|
||||
des.door("closed",26,07)
|
||||
des.door("closed",23,08)
|
||||
des.door("closed",26,08)
|
||||
des.door("closed",36,08)
|
||||
-- Watchroom Doors
|
||||
des.door("closed",04,03)
|
||||
des.door("closed",45,03)
|
||||
des.door("closed",04,12)
|
||||
des.door("closed",45,12)
|
||||
-- King Arthur
|
||||
des.monster({ id = "King Arthur", coord = {09, 07}, inventory = function()
|
||||
des.object({ id = "long sword", spe = 4, buc = "blessed", name = "Excalibur" });
|
||||
des.object({ id = "plate mail", spe = 4 });
|
||||
end })
|
||||
-- The treasure of King Arthur
|
||||
des.object("chest", 09, 07)
|
||||
-- knight guards for the watchrooms
|
||||
des.monster({ id = "knight", x=04, y=02, peaceful = 1 })
|
||||
des.monster({ id = "knight", x=04, y=13, peaceful = 1 })
|
||||
des.monster({ id = "knight", x=45, y=02, peaceful = 1 })
|
||||
des.monster({ id = "knight", x=45, y=13, peaceful = 1 })
|
||||
-- page guards for the audience chamber
|
||||
des.monster("page", 16, 06)
|
||||
des.monster("page", 18, 06)
|
||||
des.monster("page", 20, 06)
|
||||
des.monster("page", 16, 09)
|
||||
des.monster("page", 18, 09)
|
||||
des.monster("page", 20, 09)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,49,15))
|
||||
-- Random traps
|
||||
des.trap("sleep gas",24,04)
|
||||
des.trap("sleep gas",25,04)
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty.
|
||||
des.monster({ id = "quasit", x=14, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=16, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=18, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=20, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=22, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=24, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=26, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=28, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=30, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=32, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=34, y=00, peaceful=0 })
|
||||
des.monster({ id = "quasit", x=36, y=00, peaceful=0 })
|
||||
|
||||
-- Some warhorses
|
||||
for i = 1, 2 + nh.rn2(3) do
|
||||
des.monster({ id = "warhorse", peaceful = 1, inventory = function() if percent(50) then des.object("saddle"); end end });
|
||||
end
|
@ -1,61 +0,0 @@
|
||||
-- NetHack Monk Mon-fila.lua $NHDT-Date: 1652196006 2022/05/10 15:20:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster({ class = "E", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.monster({ class = "E", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster("xorn")
|
||||
des.monster("earth elemental")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster({ class = "E", peaceful=0 })
|
||||
des.monster("earth elemental")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster({ class = "X", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("earth elemental")
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,60 +0,0 @@
|
||||
-- NetHack Monk Mon-filb.lua $NHDT-Date: 1652196006 2022/05/10 15:20:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster({ class = "X", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.monster({ class = "X", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster({ class = "E", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster({ class = "E", peaceful=0 })
|
||||
des.monster("earth elemental")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster({ class = "X", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("earth elemental")
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,75 +0,0 @@
|
||||
-- NetHack Monk Mon-goal.lua $NHDT-Date: 1652196007 2022/05/10 15:20:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
-- des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.level_init({ style="mines", fg="L", bg=".", smoothed=false, joined=false, lit=0, walled=false })
|
||||
|
||||
des.map([[
|
||||
xxxxxx..xxxxxx...xxxxxxxxx
|
||||
xxxx......xx......xxxxxxxx
|
||||
xx.xx.............xxxxxxxx
|
||||
x....................xxxxx
|
||||
......................xxxx
|
||||
......................xxxx
|
||||
xx........................
|
||||
xxx......................x
|
||||
xxx................xxxxxxx
|
||||
xxxx.....x.xx.......xxxxxx
|
||||
xxxxx...xxxxxx....xxxxxxxx
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
local place = { {14,04},{13,07} }
|
||||
local placeidx = math.random(1, #place);
|
||||
|
||||
des.region(selection.area(00,00,25,10), "unlit")
|
||||
-- Stairs
|
||||
des.stair("up", 20,05)
|
||||
-- Objects
|
||||
des.object({ id = "lenses", coord = place[placeidx], buc="blessed", spe=0, name="The Eyes of the Overworld" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("Master Kaen",place[placeidx])
|
||||
des.altar({ coord = place[placeidx], align="noalign", type="altar" })
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
@ -1,98 +0,0 @@
|
||||
-- NetHack Monk Mon-loca.lua $NHDT-Date: 1652196007 2022/05/10 15:20:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
-- 1 2 3 4 5 6 7
|
||||
--123456789012345678901234567890123456789012345678901234567890123456789012345
|
||||
des.map([[
|
||||
---------------------------------------------------- --------
|
||||
---.................................................- --.....|
|
||||
---...--------........------........................--- ---...|
|
||||
---.....- --.......- ----..................---- --.--
|
||||
---.....---- --------- --..................-- --..|
|
||||
---...----- ----.----.....----.....--- --..||
|
||||
----..---- -----..--- |...--- |.......--- --...|
|
||||
|...--- ----....--- |.--- |.........-- --...||
|
||||
|...- ----.....--- ---- |..........---....|
|
||||
|...---- ----......--- | |...|.......-....||
|
||||
|......----- ---.........- | -----...|............|
|
||||
|..........----- ----...........--- -------......||...........||
|
||||
|..............-----................--- |............|||..........|
|
||||
|-S----...............................--- |...........|| |.........||
|
||||
|.....|..............------.............-----..........|| ||........|
|
||||
|.....|.............-- ---.........................|| |.......||
|
||||
|.....|.............- ---.....................--| ||......|
|
||||
|---S--------.......---- --.................---- |.....||
|
||||
|...........|..........--------..............----- ||....|
|
||||
|...........|............................----- |....|
|
||||
------------------------------------------ ------
|
||||
]]);
|
||||
-- Random Monsters
|
||||
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,20), "lit")
|
||||
-- Stairs
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,20))
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- since vegetarian monks shouldn't eat giant corpses, give a chance for
|
||||
-- Str boost that isn't throttled by exercise restrictions;
|
||||
-- make a modest effort (Elbereth only) to prevent xorns from eating the tins
|
||||
local tinplace = selection.negate():filter_mapchar('.')
|
||||
local tinloc = tinplace:rndcoord(0)
|
||||
des.object({ id="tin", coord=tinloc, quantity=2, buc="blessed",
|
||||
montype="spinach" })
|
||||
des.engraving({ coord=tinloc, type="burn", text="Elbereth" })
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("earth elemental")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
||||
des.monster("xorn")
|
@ -1,106 +0,0 @@
|
||||
-- NetHack Monk Mon-strt.lua $NHDT-Date: 1652196007 2022/05/10 15:20:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, the Grand Master
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
....................------------------------------------....................
|
||||
....................|................|.....|.....|.....|....................
|
||||
....................|..------------..|--+-----+-----+--|....................
|
||||
....................|..|..........|..|.................|....................
|
||||
....................|..|..........|..|+---+---+-----+--|....................
|
||||
..................---..|..........|......|...|...|.....|....................
|
||||
..................+....|..........+......|...|...|.....|....................
|
||||
..................+....|..........+......|...|...|.....|....................
|
||||
..................---..|..........|......|...|...|.....|....................
|
||||
....................|..|..........|..|+-----+---+---+--|....................
|
||||
....................|..|..........|..|.................|....................
|
||||
....................|..------------..|--+-----+-----+--|....................
|
||||
....................|................|.....|.....|.....|....................
|
||||
....................------------------------------------....................
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region({ region={24,06, 33,13}, lit=1, type="temple" })
|
||||
|
||||
des.replace_terrain({ region={00,00, 10,19}, fromterrain=".", toterrain="T", chance=10 })
|
||||
des.replace_terrain({ region={65,00, 75,19}, fromterrain=".", toterrain="T", chance=10 })
|
||||
|
||||
local spacelocs = selection.floodfill(05,04);
|
||||
|
||||
-- Portal arrival point
|
||||
des.terrain({05,04}, ".")
|
||||
des.levregion({ region = {05,04,05,04}, type="branch" })
|
||||
-- Stairs
|
||||
des.stair("down", 52,09)
|
||||
-- Doors
|
||||
des.door("locked",18,09)
|
||||
des.door("locked",18,10)
|
||||
des.door("closed",34,09)
|
||||
des.door("closed",34,10)
|
||||
des.door("closed",40,05)
|
||||
des.door("closed",46,05)
|
||||
des.door("closed",52,05)
|
||||
des.door("locked",38,07)
|
||||
des.door("closed",42,07)
|
||||
des.door("closed",46,07)
|
||||
des.door("closed",52,07)
|
||||
des.door("locked",38,12)
|
||||
des.door("closed",44,12)
|
||||
des.door("closed",48,12)
|
||||
des.door("closed",52,12)
|
||||
des.door("closed",40,14)
|
||||
des.door("closed",46,14)
|
||||
des.door("closed",52,14)
|
||||
-- Unattended Altar - unaligned due to conflict - player must align it.
|
||||
des.altar({ x=28,y=09, align="noalign", type="altar" })
|
||||
-- The Grand Master
|
||||
des.monster({ id = "Grand Master", coord = {28, 10}, inventory = function()
|
||||
des.object({ id = "robe", spe = 6 });
|
||||
end })
|
||||
-- No treasure chest!
|
||||
-- guards for the audience chamber
|
||||
des.monster("abbot", 32, 07)
|
||||
des.monster("abbot", 32, 08)
|
||||
des.monster("abbot", 32, 11)
|
||||
des.monster("abbot", 32, 12)
|
||||
des.monster("abbot", 33, 07)
|
||||
des.monster("abbot", 33, 08)
|
||||
des.monster("abbot", 33, 11)
|
||||
des.monster("abbot", 33, 12)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(18,03,55,16))
|
||||
-- Random traps
|
||||
for i = 1, 2 do
|
||||
des.trap("dart", spacelocs:rndcoord(1))
|
||||
end
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty.
|
||||
for i = 1, 8 do
|
||||
des.monster("earth elemental", spacelocs:rndcoord(1))
|
||||
end
|
||||
for i = 1, 4 do
|
||||
des.monster("xorn", spacelocs:rndcoord(1))
|
||||
end
|
||||
-- next to leader, so possibly tricky to pick up if not ready for quest yet;
|
||||
-- there's no protection against a xorn eating these tins; BUC state is random
|
||||
des.object({ id="tin", coord = {29, 9}, quantity=2, montype="spinach" })
|
@ -1,55 +0,0 @@
|
||||
-- NetHack Priest Pri-fila.lua $NHDT-Date: 1652196008 2022/05/10 15:20:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster("human zombie")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster("human zombie")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "morgue",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("wraith")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "morgue",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,62 +0,0 @@
|
||||
-- NetHack Priest Pri-filb.lua $NHDT-Date: 1652196008 2022/05/10 15:20:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster("human zombie")
|
||||
des.monster("wraith")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "morgue",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster("human zombie")
|
||||
des.monster("wraith")
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "morgue",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.monster("human zombie")
|
||||
des.monster("wraith")
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
des.room({ type = "morgue",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,84 +0,0 @@
|
||||
-- NetHack Priest Pri-goal.lua $NHDT-Date: 1687033651 2023/06/17 20:27:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.level_init({ style="mines", fg="L", bg=".", smoothed=false, joined=false, lit=0, walled=false })
|
||||
|
||||
des.map([[
|
||||
xxxxxx..xxxxxx...xxxxxxxxx
|
||||
xxxx......xx......xxxxxxxx
|
||||
xx.xx.............xxxxxxxx
|
||||
x....................xxxxx
|
||||
......................xxxx
|
||||
......................xxxx
|
||||
xx........................
|
||||
xxx......................x
|
||||
xxx................xxxxxxx
|
||||
xxxx.....x.xx.......xxxxxx
|
||||
xxxxx...xxxxxx....xxxxxxxx
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
local place = { {14,04}, {13,07} }
|
||||
local placeidx = math.random(1, #place);
|
||||
|
||||
des.region(selection.area(00,00,25,10), "unlit")
|
||||
-- Stairs
|
||||
des.stair("up", 20,05)
|
||||
-- Objects [note: eroded=-1 => obj->oerodeproof=1]
|
||||
des.object({ id = "helm of brilliance", coord = place[placeidx],
|
||||
buc="blessed", spe=0, eroded=-1, name="The Mitre of Holiness" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("Nalzok",place[placeidx])
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("human zombie")
|
||||
des.monster("Z")
|
||||
des.monster("Z")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("wraith")
|
||||
des.monster("W")
|
@ -1,73 +0,0 @@
|
||||
-- NetHack Priest Pri-loca.lua $NHDT-Date: 1652196009 2022/05/10 15:20:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor", "noflip")
|
||||
-- This is a kludge to init the level as a lit field.
|
||||
des.level_init({ style="mines", fg=".", bg=".", smoothed=false, joined=false, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
........................................
|
||||
........................................
|
||||
..........----------+----------.........
|
||||
..........|........|.|........|.........
|
||||
..........|........|.|........|.........
|
||||
..........|----.----.----.----|.........
|
||||
..........+...................+.........
|
||||
..........+...................+.........
|
||||
..........|----.----.----.----|.........
|
||||
..........|........|.|........|.........
|
||||
..........|........|.|........|.........
|
||||
..........----------+----------.........
|
||||
........................................
|
||||
........................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region({ region={00,00, 09,13}, lit=0, type="morgue", filled=1 })
|
||||
des.region({ region={09,00, 30,01}, lit=0, type="morgue", filled=1 })
|
||||
des.region({ region={09,12, 30,13}, lit=0, type="morgue", filled=1 })
|
||||
des.region({ region={31,00, 39,13}, lit=0, type="morgue", filled=1 })
|
||||
des.region({ region={11,03, 29,10}, lit=1, type="temple", filled=1, irregular=1 })
|
||||
-- The altar inside the temple
|
||||
des.altar({ x=20,y=07, align="noalign", type="shrine" })
|
||||
des.monster({ id = "aligned cleric", x=20, y=07, align="noalign", peaceful = 0 })
|
||||
-- Doors
|
||||
des.door("locked",10,06)
|
||||
des.door("locked",10,07)
|
||||
des.door("locked",20,02)
|
||||
des.door("locked",20,11)
|
||||
des.door("locked",30,06)
|
||||
des.door("locked",30,07)
|
||||
-- Stairs
|
||||
-- Note: The up stairs are *intentionally* off of the map.
|
||||
des.stair("up", 43,05)
|
||||
des.stair("down", 20,06)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(10,02,30,13))
|
||||
-- Objects (inside the antechambers).
|
||||
des.object({ coord = { 14, 03 } })
|
||||
des.object({ coord = { 15, 03 } })
|
||||
des.object({ coord = { 16, 03 } })
|
||||
des.object({ coord = { 14, 10 } })
|
||||
des.object({ coord = { 15, 10 } })
|
||||
des.object({ coord = { 16, 10 } })
|
||||
des.object({ coord = { 17, 10 } })
|
||||
des.object({ coord = { 24, 03 } })
|
||||
des.object({ coord = { 25, 03 } })
|
||||
des.object({ coord = { 26, 03 } })
|
||||
des.object({ coord = { 27, 03 } })
|
||||
des.object({ coord = { 24, 10 } })
|
||||
des.object({ coord = { 25, 10 } })
|
||||
des.object({ coord = { 26, 10 } })
|
||||
des.object({ coord = { 27, 10 } })
|
||||
-- Random traps
|
||||
des.trap({ coord = { 15,04 } })
|
||||
des.trap({ coord = { 25,04 } })
|
||||
des.trap({ coord = { 15,09 } })
|
||||
des.trap({ coord = { 25,09 } })
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- No random monsters - the morgue generation will put them in.
|
@ -1,102 +0,0 @@
|
||||
-- NetHack Priest Pri-strt.lua $NHDT-Date: 1652196009 2022/05/10 15:20:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.5 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, High Priest
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
....................------------------------------------....................
|
||||
....................|................|.....|.....|.....|....................
|
||||
....................|..------------..|--+-----+-----+--|....................
|
||||
....................|..|..........|..|.................|....................
|
||||
....................|..|..........|..|+---+---+-----+--|....................
|
||||
..................---..|..........|......|...|...|.....|....................
|
||||
..................+....|..........+......|...|...|.....|....................
|
||||
..................+....|..........+......|...|...|.....|....................
|
||||
..................---..|..........|......|...|...|.....|....................
|
||||
....................|..|..........|..|+-----+---+---+--|....................
|
||||
....................|..|..........|..|.................|....................
|
||||
....................|..------------..|--+-----+-----+--|....................
|
||||
....................|................|.....|.....|.....|....................
|
||||
....................------------------------------------....................
|
||||
............................................................................
|
||||
............................................................................
|
||||
............................................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region({ region={24,06, 33,13}, lit=1, type="temple", filled=2 })
|
||||
|
||||
des.replace_terrain({ region={00,00, 10,19}, fromterrain=".", toterrain="T", chance=10 })
|
||||
des.replace_terrain({ region={65,00, 75,19}, fromterrain=".", toterrain="T", chance=10 })
|
||||
des.terrain({05,04}, ".")
|
||||
|
||||
local spacelocs = selection.floodfill(05,04);
|
||||
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {05,04,05,04}, type="branch" })
|
||||
-- Stairs
|
||||
des.stair("down", 52,09)
|
||||
-- Doors
|
||||
des.door("locked",18,09)
|
||||
des.door("locked",18,10)
|
||||
des.door("closed",34,09)
|
||||
des.door("closed",34,10)
|
||||
des.door("closed",40,05)
|
||||
des.door("closed",46,05)
|
||||
des.door("closed",52,05)
|
||||
des.door("locked",38,07)
|
||||
des.door("closed",42,07)
|
||||
des.door("closed",46,07)
|
||||
des.door("closed",52,07)
|
||||
des.door("locked",38,12)
|
||||
des.door("closed",44,12)
|
||||
des.door("closed",48,12)
|
||||
des.door("closed",52,12)
|
||||
des.door("closed",40,14)
|
||||
des.door("closed",46,14)
|
||||
des.door("closed",52,14)
|
||||
-- Unattended Altar - unaligned due to conflict - player must align it.
|
||||
des.altar({ x=28, y=09, align="noalign", type="altar" })
|
||||
-- High Priest
|
||||
des.monster({ id = "Arch Priest", coord = {28, 10}, inventory = function()
|
||||
des.object({ id = "robe", spe = 4 });
|
||||
des.object({ id = "mace", spe = 4 });
|
||||
end })
|
||||
-- The treasure of High Priest
|
||||
des.object("chest", 27, 10)
|
||||
-- knight guards for the audience chamber
|
||||
des.monster("acolyte", 32, 07)
|
||||
des.monster("acolyte", 32, 08)
|
||||
des.monster("acolyte", 32, 11)
|
||||
des.monster("acolyte", 32, 12)
|
||||
des.monster("acolyte", 33, 07)
|
||||
des.monster("acolyte", 33, 08)
|
||||
des.monster("acolyte", 33, 11)
|
||||
des.monster("acolyte", 33, 12)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(18,03,55,16))
|
||||
-- Random traps
|
||||
for i = 1, 2 do
|
||||
des.trap("dart", spacelocs:rndcoord(1))
|
||||
end
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty.
|
||||
for i = 1, 12 do
|
||||
des.monster("human zombie", spacelocs:rndcoord(1));
|
||||
end
|
@ -1,35 +0,0 @@
|
||||
-- NetHack Ranger Ran-fila.lua $NHDT-Date: 1652196009 2022/05/10 15:20:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="T", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ class = "C", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
@ -1,39 +0,0 @@
|
||||
-- NetHack Ranger Ran-filb.lua $NHDT-Date: 1652196010 2022/05/10 15:20:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ class = "C", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
@ -1,106 +0,0 @@
|
||||
-- NetHack Ranger Ran-goal.lua $NHDT-Date: 1652196010 2022/05/10 15:20:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
|
||||
... ...
|
||||
..........................................................................
|
||||
... + ...
|
||||
. ............ ....... . ....... .
|
||||
. ............................. . ........ .........S.. .
|
||||
. ............ . ...... . . . ....... .. .
|
||||
. ......... . .... + . ... . .. .
|
||||
. S . ......... .S. .S............... .
|
||||
. ... . ... . ......... . .
|
||||
. ........ .....S.+.......+....\....+........+. .
|
||||
. ... ... S ......... .. ..... .
|
||||
. .. ......... .. ...... .
|
||||
. ....... ... + .... .... .......... .
|
||||
. .............. .. . ...... .. ............. .
|
||||
. ............. . .......... ...... .
|
||||
... + ...
|
||||
..........................................................................
|
||||
... ...
|
||||
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
-- Stairs
|
||||
des.stair("up", 19,10)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object({ id = "bow", x=37, y=10, buc="blessed", spe=0, name="The Longbow of Diana" })
|
||||
des.object("chest", 37, 10)
|
||||
des.object({ coord = { 36, 09 } })
|
||||
des.object({ coord = { 36, 10 } })
|
||||
des.object({ coord = { 36, 11 } })
|
||||
des.object({ coord = { 37, 09 } })
|
||||
des.object({ coord = { 37, 11 } })
|
||||
des.object({ coord = { 38, 09 } })
|
||||
des.object({ coord = { 38, 10 } })
|
||||
des.object({ coord = { 38, 11 } })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- doors
|
||||
des.door("locked",12,08)
|
||||
des.door("closed",22,10)
|
||||
des.door("locked",24,10)
|
||||
des.door("closed",25,11)
|
||||
des.door("closed",32,10)
|
||||
des.door("closed",37,03)
|
||||
des.door("closed",37,07)
|
||||
des.door("closed",37,13)
|
||||
des.door("closed",37,16)
|
||||
des.door("closed",42,10)
|
||||
des.door("locked",46,08)
|
||||
des.door("closed",51,10)
|
||||
des.door("locked",53,08)
|
||||
des.door("closed",65,05)
|
||||
-- Random monsters.
|
||||
des.monster({ id = "Scorpius", x=37, y=10, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=36, y=09, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=36, y=10, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=36, y=11, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=37, y=09, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=37, y=11, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=38, y=09, peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", x=38, y=10, peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", x=38, y=11, peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", x=02, y=02, peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", x=71, y=02, peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", x=02, y=16, peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", x=71, y=16, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ class = "C", peaceful=0 })
|
||||
des.monster({ class = "C", peaceful=0 })
|
||||
des.monster({ id = "scorpion", x=03, y=02, peaceful=0 })
|
||||
des.monster({ id = "scorpion", x=72, y=02, peaceful=0 })
|
||||
des.monster({ id = "scorpion", x=03, y=17, peaceful=0 })
|
||||
des.monster({ id = "scorpion", x=72, y=17, peaceful=0 })
|
||||
des.monster({ id = "scorpion", x=41, y=10, peaceful=0 })
|
||||
des.monster({ id = "scorpion", x=33, y=09, peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ class = "s", peaceful=0 })
|
||||
|
||||
des.wallify()
|
@ -1,79 +0,0 @@
|
||||
-- NetHack Ranger Ran-loca.lua $NHDT-Date: 1652196010 2022/05/10 15:20:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor")
|
||||
--1234567890123456789012345678901234567890123456789012345678901234567890
|
||||
des.map([[
|
||||
....... ......... .......
|
||||
................... ...................
|
||||
.... ....... ....... ....
|
||||
... ..... . ..... . ..... ...
|
||||
. .......... ..... ........... ..... .......... .
|
||||
. .. ..... .......... ..... .......... ..... .. .
|
||||
. . . ..... . ..... . . .
|
||||
. . ..... ............. ..... . .
|
||||
. . ................ ....... ................ . .
|
||||
. . ..... ....... ..... . .
|
||||
. . . ...... ...... . . .
|
||||
. . ........... ......... ........... . .
|
||||
. . .......... .......... . .
|
||||
. .. ..... . ..... . ..... .. .
|
||||
. .......... ..... ........... ..... .......... .
|
||||
. ..... .......... ..... .......... ..... .
|
||||
. . ..... . ..... . .
|
||||
... ....... ....... ....... ...
|
||||
.............. ............. ..............
|
||||
....... ....... ....... ....... .......
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,54,19), "lit")
|
||||
-- Stairs
|
||||
des.stair("up", 25,05)
|
||||
des.stair("down", 27,18)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,54,19))
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap("spiked pit")
|
||||
des.trap("spiked pit")
|
||||
des.trap("teleport")
|
||||
des.trap("teleport")
|
||||
des.trap("arrow")
|
||||
des.trap("arrow")
|
||||
-- Random monsters.
|
||||
des.monster({ id = "wumpus", x=27, y=18, peaceful=0, asleep=1 })
|
||||
des.monster({ id = "giant bat", peaceful=0 })
|
||||
des.monster({ id = "giant bat", peaceful=0 })
|
||||
des.monster({ id = "giant bat", peaceful=0 })
|
||||
des.monster({ id = "giant bat", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "forest centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "mountain centaur", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ class = "s", peaceful=0 })
|
||||
des.monster({ class = "s", peaceful=0 })
|
||||
|
@ -1,101 +0,0 @@
|
||||
-- NetHack Ranger Ran-strt.lua $NHDT-Date: 1652196011 2022/05/10 15:20:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Orion,
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "." });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor", "arboreal")
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg=".", smoothed=true, joined=true, lit=1, walled=false })
|
||||
des.replace_terrain({ region={00,00, 76,19}, fromterrain=".", toterrain="T", chance=5 })
|
||||
--1234567890123456789012345678901234567890123456789012345678901234567890
|
||||
des.map({ halign = "left", valign = "center", map = [[
|
||||
xx
|
||||
................................... x
|
||||
.. ..
|
||||
.. ...............F............... ..
|
||||
. .. .F. .. .
|
||||
. .. .............F............. .. .
|
||||
. . .. .. . .
|
||||
. . .. ....................... .. ...
|
||||
. . . .. .. .
|
||||
... . .. .|..................... ......
|
||||
FFF . . ..S..................
|
||||
... . .. .|................. .... ...
|
||||
. . . .. .. . . .
|
||||
. . .. ....................... .. . .
|
||||
. . .. .. . .
|
||||
. .. .............F............. .. .
|
||||
. .. .F. .. .
|
||||
.. ...............F............... ..
|
||||
.. ..
|
||||
................................... x
|
||||
xx
|
||||
]] });
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,40,20), "lit")
|
||||
-- Stairs
|
||||
des.stair("down", 10,10)
|
||||
-- Portal arrival point; just about anywhere on the right hand side of the map
|
||||
des.levregion({ region = {51,2,77,18}, region_islev = 1, type="branch" })
|
||||
-- Orion
|
||||
des.monster({ id = "Orion", coord = {20, 10}, inventory = function()
|
||||
des.object({ id = "leather armor", spe = 4 });
|
||||
des.object({ id = "yumi", spe = 4 });
|
||||
des.object({ id = "arrow", spe = 4, quantity = 50 });
|
||||
end })
|
||||
-- The treasure of Orion
|
||||
des.object("chest", 20, 10)
|
||||
-- Guards for the audience chamber
|
||||
des.monster("hunter", 19, 09)
|
||||
des.monster("hunter", 20, 09)
|
||||
des.monster("hunter", 21, 09)
|
||||
des.monster("hunter", 19, 10)
|
||||
des.monster("hunter", 21, 10)
|
||||
des.monster("hunter", 19, 11)
|
||||
des.monster("hunter", 20, 11)
|
||||
des.monster("hunter", 21, 11)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,40,20))
|
||||
-- Traps
|
||||
des.trap("arrow",30,09)
|
||||
des.trap("arrow",30,10)
|
||||
des.trap("pit",40,09)
|
||||
des.trap("spiked pit")
|
||||
des.trap("bear")
|
||||
des.trap("bear")
|
||||
-- Monsters on siege duty.
|
||||
des.monster({ id = "minotaur", x=33, y=09, peaceful=0, asleep=1 })
|
||||
des.monster({ id = "forest centaur", x=19, y=03, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=19, y=04, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=19, y=05, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=21, y=03, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=21, y=04, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=21, y=05, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=01, y=09, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=02, y=09, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=03, y=09, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=01, y=11, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=02, y=11, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=03, y=11, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=19, y=15, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=19, y=16, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=19, y=17, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=21, y=15, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=21, y=16, peaceful=0 })
|
||||
des.monster({ id = "forest centaur", x=21, y=17, peaceful=0 })
|
||||
des.monster({ id = "plains centaur", peaceful=0 })
|
||||
des.monster({ id = "plains centaur", peaceful=0 })
|
||||
des.monster({ id = "plains centaur", peaceful=0 })
|
||||
des.monster({ id = "plains centaur", peaceful=0 })
|
||||
des.monster({ id = "plains centaur", peaceful=0 })
|
||||
des.monster({ id = "plains centaur", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
||||
des.monster({ id = "scorpion", peaceful=0 })
|
@ -1,64 +0,0 @@
|
||||
-- NetHack Rogue Rog-fila.lua $NHDT-Date: 1652196011 2022/05/10 15:20:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1992 by Dean Luick
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster({ id = "water nymph", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.monster({ class = "l", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "water nymph", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,64 +0,0 @@
|
||||
-- NetHack Rogue Rog-filb.lua $NHDT-Date: 1652196011 2022/05/10 15:20:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1992 by Dean Luick
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("up")
|
||||
des.object()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.object()
|
||||
des.monster({ id = "water nymph", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.stair("down")
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.monster({ class = "l", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.room({ type = "ordinary",
|
||||
contents = function()
|
||||
des.object()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "water nymph", peaceful=0 })
|
||||
end
|
||||
})
|
||||
|
||||
des.random_corridors()
|
@ -1,110 +0,0 @@
|
||||
-- NetHack Rogue Rog-goal.lua $NHDT-Date: 1652196012 2022/05/10 15:20:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1992 by Dean Luick
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport")
|
||||
|
||||
-- 1 2 3 4 5 6 7
|
||||
--123456789012345678901234567890123456789012345678901234567890123456789012345
|
||||
des.map([[
|
||||
----- -------.......................................|-----------------|
|
||||
|...| -----.....|.......................................|.................|
|
||||
|...----...|.....|.......................................|....---------....|
|
||||
|.---......---..--.................................------------.......|....|
|
||||
|...............|..................................|..|...|...----........-|
|
||||
|.....-----....--.................................|-..--..-|.....----S----|
|
||||
|--S---...|....|.................................|-........-|....|........|
|
||||
|.........---------.............................|-....}}....-|...|...|....|
|
||||
|....|.....S......|............................|-.....}}.....-|..--.------|
|
||||
|-----.....--.....|...........................|-...}}}}}}}}...-|....|.....--
|
||||
|...........--....------S-----...............|-....}}}}}}}}....-|..........|
|
||||
|............--........|...| |..............--.....}}.}}........----------S-
|
||||
|.............|........|...| |..............|......}}}}}}}}......|...|.....|
|
||||
|S-.---.---.---.---.---|...| ------------...--........}}.}}.....--..---....|
|
||||
|.---.---.---.---.-S-..----- |....|.....|....|-....}}}}}}}}....---..S.|--..|
|
||||
|...|.......|..........|...---....---...S.....|-...}}}}}}}}...-|.S..|...|..|
|
||||
|...|..|....|..........|............|..--..----|-.....}}.....-|..----...-S--
|
||||
|...|---....----.......|----- ......|...---| |-....}}....-|...|..--.--..|
|
||||
-----.....---.....--.---....--...--------..| |-........-|....|.........|
|
||||
|.............|..........|.............S... |S-------|.....|..-----..|
|
||||
---------------------------------------- ...... ---------- ----
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,20), "lit")
|
||||
-- Stairs
|
||||
des.levregion({ region={01,00,15,20}, region_islev=1, exclude={01,18,04,20}, type="stair-up" });
|
||||
-- Doors
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,20))
|
||||
-- One trap to keep the gnomes at bay.
|
||||
des.trap("spiked pit",37,07)
|
||||
-- Objects
|
||||
des.object({ id = "skeleton key", x=38, y=10, buc="blessed", spe=0, name="The Master Key of Thievery" })
|
||||
des.object({ id = "tin", x=26, y=12, montype="chameleon" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "Master Assassin", x=38, y=10, peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ class = "l", peaceful=0 })
|
||||
des.monster({ class = "l", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ class = "N", peaceful=0 })
|
||||
des.monster({ class = "N", peaceful=0 })
|
||||
des.monster({ class = "N", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "shark", x=51, y=14, peaceful=0 })
|
||||
des.monster({ id = "shark", x=53, y=09, peaceful=0 })
|
||||
des.monster({ id = "shark", x=55, y=15, peaceful=0 })
|
||||
des.monster({ id = "shark", x=58, y=10, peaceful=0 })
|
@ -1,99 +0,0 @@
|
||||
-- NetHack Rogue Rog-loca.lua $NHDT-Date: 1652196012 2022/05/10 15:20:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1992 by Dean Luick
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
-- 1 2 3 4 5 6 7
|
||||
--123456789012345678901234567890123456789012345678901234567890123456789012345
|
||||
des.map([[
|
||||
---------------------------------------------------- --------
|
||||
---.................................................- --.....|
|
||||
---...--------........-------.......................--- ---...|
|
||||
---.....- ---......- ---..................---- --.--
|
||||
---.....---- -------- --..................-- --..|
|
||||
---...----- ----.----.....----.....--- --..||
|
||||
----..---- -----..--- |...--- |.......--- --...|
|
||||
|...--- ----....--- |.--- |.........-- --...||
|
||||
|...- ----.....--- ---- |..........---....|
|
||||
|...---- ----......--- | |...|.......-....||
|
||||
|......----- ---.........- | -----...|............|
|
||||
|..........----- ----...........--- -------......||...........||
|
||||
|..............-----................--- |............|||..........|
|
||||
|------...............................--- |...........|| |.........||
|
||||
|.....|..............------.............-----..........|| ||........|
|
||||
|.....|.............-- ---.........................|| |.......||
|
||||
|.....|.............- ---.....................--| ||......|
|
||||
|-S----------.......---- --.................---- |.....||
|
||||
|...........|..........--------..............----- ||....|
|
||||
|...........|............................----- |....|
|
||||
------------------------------------------ ------
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,20), "lit")
|
||||
-- Doors
|
||||
--DOOR:locked|closed|open,(xx,yy)
|
||||
-- Stairs
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,20))
|
||||
-- Objects
|
||||
des.object({ id = "scroll of teleportation", x=11, y=18, buc="cursed", spe=0 })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ id = "leprechaun", peaceful=0 })
|
||||
des.monster({ class = "l", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ id = "guardian naga", peaceful=0 })
|
||||
des.monster({ class = "N", peaceful=0 })
|
||||
des.monster({ class = "N", peaceful=0 })
|
||||
des.monster({ class = "N", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
||||
des.monster({ id = "chameleon", peaceful=0 })
|
@ -1,166 +0,0 @@
|
||||
-- NetHack Rogue Rog-strt.lua $NHDT-Date: 1652196012 2022/05/10 15:20:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1992 by Dean Luick
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Master of Thieves
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor", "nommap")
|
||||
|
||||
-- 1 2 3 4 5 6 7
|
||||
--123456789012345678901234567890123456789012345678901234567890123456789012345
|
||||
des.map([[
|
||||
---------------------------------.------------------------------------------
|
||||
|.....|.||..........|....|......|.|.........|.......+............---.......|
|
||||
|.....|..+..........+....---....S.|...-S-----.-----.|............+.+.......|
|
||||
|.....+.||........---......|....|.|...|.....|.|...|.---.....------.--------|
|
||||
|-----|.-------|..|........------.-----.....|.--..|...-------..............|
|
||||
|.....|........------+------..........+.....|..--S---.........------.-----..
|
||||
|.....|.------...............-----.}}.--------.|....-------.---....|.+...--|
|
||||
|..-+--.|....|-----.--------.|...|.....+.....|.|....|.....+.+......|.--....|
|
||||
|..|....|....|....+.|......|.|...-----.|.....|.--...|.....|.|......|..|....|
|
||||
|..|.-----S----...|.+....-----...|...|.----..|..|.---....--.---S-----.|----|
|
||||
|..|.|........|...------.|.S.....|...|....-----.+.|......|..|.......|.|....|
|
||||
|---.-------..|...|....|.|.|.....|...----.|...|.|---.....|.|-.......|.---..|
|
||||
...........|..S...|....---.----S----..|...|...+.|..-------.---+-....|...--+|
|
||||
|---------.---------...|......|....S..|.---...|.|..|...........----.---....|
|
||||
|........|.........|...+.------....|---.---...|.--+-.----.----....|.+...--+|
|
||||
|........|.---+---.|----.--........|......-----......|..|..|.--+-.|.-S-.|..|
|
||||
|........|.|.....|........----------.----.......---.--..|-.|....|.-----.|..|
|
||||
|----....+.|.....----+---............|..|--------.+.|...SS.|....|.......|..|
|
||||
|...--+-----.....|......|.------------............---...||.------+--+----..|
|
||||
|..........S.....|......|.|..........S............|.....||...|.....|....|..|
|
||||
-------------------------.--------------------------------------------------
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
--REGION:(00,00,75,20),lit,"ordinary"
|
||||
|
||||
local streets = selection.floodfill(0,12)
|
||||
|
||||
-- The down stairs is at one of the 4 "exits". The others are mimics,
|
||||
-- mimicing stairwells.
|
||||
local place = { {33,0}, {0,12}, {25,20}, {75,05} }
|
||||
shuffle(place)
|
||||
|
||||
des.stair({ dir = "down", coord = place[1] })
|
||||
des.monster({ id = "giant mimic", coord = place[2], appear_as = "ter:staircase down" })
|
||||
des.monster({ id = "large mimic", coord = place[3], appear_as = "ter:staircase down" })
|
||||
des.monster({ id = "small mimic", coord = place[4], appear_as = "ter:staircase down" })
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {19,09,19,09}, type="branch" })
|
||||
-- Doors (secret)
|
||||
--DOOR:locked|closed|open,(xx,yy)
|
||||
des.door("locked", 32, 2)
|
||||
des.door("locked", 63, 9)
|
||||
des.door("locked", 27,10)
|
||||
des.door("locked", 31,12)
|
||||
des.door("locked", 35,13)
|
||||
des.door("locked", 69,15)
|
||||
des.door("locked", 56,17)
|
||||
des.door("locked", 57,17)
|
||||
des.door("locked", 11,19)
|
||||
des.door("locked", 37,19)
|
||||
des.door("locked", 39, 2)
|
||||
des.door("locked", 49, 5)
|
||||
des.door("locked", 10, 9)
|
||||
des.door("locked", 14,12)
|
||||
-- Doors (regular)
|
||||
des.door("closed", 52, 1)
|
||||
des.door("closed", 9, 2)
|
||||
des.door("closed", 20, 2)
|
||||
des.door("closed", 65, 2)
|
||||
des.door("closed", 67, 2)
|
||||
des.door("closed", 6, 3)
|
||||
des.door("closed", 21, 5)
|
||||
des.door("closed", 38, 5)
|
||||
des.door("closed", 69, 6)
|
||||
des.door("closed", 4, 7)
|
||||
des.door("closed", 39, 7)
|
||||
des.door("closed", 58, 7)
|
||||
des.door("closed", 60, 7)
|
||||
des.door("closed", 18, 8)
|
||||
des.door("closed", 20, 9)
|
||||
des.door("closed", 48,10)
|
||||
des.door("closed", 46,12)
|
||||
des.door("closed", 62,12)
|
||||
des.door("closed", 74,12)
|
||||
des.door("closed", 23,14)
|
||||
des.door("closed", 23,14)
|
||||
des.door("closed", 50,14)
|
||||
des.door("closed", 68,14)
|
||||
des.door("closed", 74,14)
|
||||
des.door("closed", 14,15)
|
||||
des.door("closed", 63,15)
|
||||
des.door("closed", 9,17)
|
||||
des.door("closed", 21,17)
|
||||
des.door("closed", 50,17)
|
||||
des.door("closed", 6,18)
|
||||
des.door("closed", 65,18)
|
||||
des.door("closed", 68,18)
|
||||
-- Master of Thieves
|
||||
des.monster({ id = "Master of Thieves", coord = {36, 11}, inventory = function()
|
||||
des.object({ id = "leather armor", spe = 5 });
|
||||
des.object({ id = "silver dagger", spe = 4 });
|
||||
des.object({ id = "dagger", spe = 2, quantity = d(2,4), buc = "not-cursed" });
|
||||
end })
|
||||
-- The treasure of Master of Thieves
|
||||
des.object("chest", 36, 11)
|
||||
-- thug guards, room #1
|
||||
des.monster("thug", 28, 10)
|
||||
des.monster("thug", 29, 11)
|
||||
des.monster("thug", 30, 09)
|
||||
des.monster("thug", 31, 07)
|
||||
-- thug guards, room #2
|
||||
des.monster("thug", 31, 13)
|
||||
des.monster("thug", 33, 14)
|
||||
des.monster("thug", 30, 15)
|
||||
--thug guards, room #3
|
||||
des.monster("thug", 35, 09)
|
||||
des.monster("thug", 36, 13)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,20))
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
-- Monsters to get in the way.
|
||||
--
|
||||
-- West exit
|
||||
des.monster({ id = "leprechaun", x=01, y=12, peaceful=0 })
|
||||
des.monster({ id = "water nymph", x=02, y=12, peaceful=0 })
|
||||
-- North exit
|
||||
des.monster({ id = "water nymph", x=33, y=01, peaceful=0 })
|
||||
des.monster({ id = "leprechaun", x=33, y=02, peaceful=0 })
|
||||
-- East exit
|
||||
des.monster({ id = "water nymph", x=74, y=05, peaceful=0 })
|
||||
des.monster({ id = "leprechaun", x=74, y=04, peaceful=0 })
|
||||
-- South exit
|
||||
des.monster({ id = "leprechaun", x=25, y=19, peaceful=0 })
|
||||
des.monster({ id = "water nymph", x=25, y=18, peaceful=0 })
|
||||
-- Wandering the streets.
|
||||
for i=1,4 + math.random(1 - 1,1*3) do
|
||||
des.monster({ id = "water nymph", coord = streets:rndcoord(1), peaceful=0 })
|
||||
des.monster({ id = "leprechaun", coord = streets:rndcoord(1), peaceful=0 })
|
||||
end
|
||||
for i=1,7 + math.random(1 - 1,1*3) do
|
||||
des.monster({ id = "chameleon", coord = streets:rndcoord(1), peaceful=0 })
|
||||
end
|
@ -1,37 +0,0 @@
|
||||
-- NetHack Samurai Sam-fila.lua $NHDT-Date: 1652196013 2022/05/10 15:20:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="P", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster("d")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("stalker")
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,60 +0,0 @@
|
||||
-- NetHack Samurai Sam-filb.lua $NHDT-Date: 1652196013 2022/05/10 15:20:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
------------- -------------
|
||||
|...........| |...........|
|
||||
|...-----...|----------------------------------|...-----...|
|
||||
|...| |...|..................................|...| |...|
|
||||
|...-----..........................................-----...|
|
||||
|...........|--S----------------------------S--|...........|
|
||||
----...--------.|..........................|.--------...----
|
||||
|...|........+..........................+........|...|
|
||||
|...|........+..........................+........|...|
|
||||
----...--------.|..........................|.--------...----
|
||||
|...........|--S----------------------------S--|...........|
|
||||
|...-----..........................................-----...|
|
||||
|...| |...|..................................|...| |...|
|
||||
|...-----...|----------------------------------|...-----...|
|
||||
|...........| |...........|
|
||||
------------- -------------
|
||||
]]);
|
||||
des.region(selection.area(00,00,59,15), "unlit")
|
||||
-- Doors
|
||||
des.door("closed",16,07)
|
||||
des.door("closed",16,08)
|
||||
des.door("closed",43,07)
|
||||
des.door("closed",43,08)
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster("d")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,111 +0,0 @@
|
||||
-- NetHack Samurai Sam-goal.lua $NHDT-Date: 1652196013 2022/05/10 15:20:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport");
|
||||
|
||||
des.map([[
|
||||
|
||||
.......................
|
||||
......-------------------......
|
||||
......----.................----......
|
||||
....----.....-------------.....----....
|
||||
....--.....----...........----.....--....
|
||||
...||....---....---------....---....||...
|
||||
...|....--....---.......---....--....|...
|
||||
....|...||...---...--+--...---...||...|....
|
||||
....|...|....|....|-...-|....|....|...|....
|
||||
....|...|....|....+.....+....|....|...|....
|
||||
....|...|....|....|-...-|....|....|...|....
|
||||
....|...||...---...--+--...---...||...|....
|
||||
...|....--....---.......---....--....|...
|
||||
...||....---....---------....---....||...
|
||||
....--.....----...........----.....--....
|
||||
....----.....-------------.....----....
|
||||
......----.................----......
|
||||
......-------------------......
|
||||
.......................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
local place = { {02,11},{42,09} }
|
||||
local placeidx = math.random(1, #place);
|
||||
|
||||
des.region(selection.area(00,00,44,19), "unlit")
|
||||
-- Doors
|
||||
des.door("closed",19,10)
|
||||
des.door("closed",22,08)
|
||||
des.door("closed",22,12)
|
||||
des.door("closed",25,10)
|
||||
-- Stairs
|
||||
des.stair({ dir = "up", coord = place[placeidx] })
|
||||
|
||||
-- Holes in the concentric ring walls
|
||||
local place = { {22,14},{30,10},{22, 6},{14,10} }
|
||||
local placeidx = math.random(1, #place);
|
||||
des.terrain(place[placeidx], ".")
|
||||
local place = { {22, 4},{35,10},{22,16},{ 9,10} }
|
||||
local placeidx = math.random(1, #place);
|
||||
des.terrain(place[placeidx], ".")
|
||||
local place = { {22, 2},{22,18} }
|
||||
local placeidx = math.random(1, #place);
|
||||
des.terrain(place[placeidx], ".")
|
||||
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,44,19))
|
||||
-- Objects
|
||||
des.object({ id = "tsurugi", x=22, y=10, buc="blessed", spe=0, name="The Tsurugi of Muramasa" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap("board",22,09)
|
||||
des.trap("board",24,10)
|
||||
des.trap("board",22,11)
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("Ashikaga Takauji", 22, 10)
|
||||
des.monster({ id = "samurai", peaceful=0 })
|
||||
des.monster({ id = "samurai", peaceful=0 })
|
||||
des.monster({ id = "samurai", peaceful=0 })
|
||||
des.monster({ id = "samurai", peaceful=0 })
|
||||
des.monster({ id = "samurai", peaceful=0 })
|
||||
des.monster({ id = "ninja", peaceful=0 })
|
||||
des.monster({ id = "ninja", peaceful=0 })
|
||||
des.monster({ id = "ninja", peaceful=0 })
|
||||
des.monster({ id = "ninja", peaceful=0 })
|
||||
des.monster({ id = "ninja", peaceful=0 })
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("wolf")
|
||||
des.monster("d")
|
||||
des.monster("d")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
@ -1,141 +0,0 @@
|
||||
-- NetHack Samurai Sam-loca.lua $NHDT-Date: 1652196014 2022/05/10 15:20:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor");
|
||||
|
||||
des.map([[
|
||||
............................................................................
|
||||
............................................................................
|
||||
........-----..................................................-----........
|
||||
........|...|..................................................|...|........
|
||||
........|...---..}..--+------------------------------+--..}..---...|........
|
||||
........|-|...|.....|...|....|....|....|....|....|.|...|.....|...|-|........
|
||||
..........|...-------...|....|....|....|....|....S.|...-------...|..........
|
||||
..........|-|.........------+----+-+-------+-+--------.........|-|..........
|
||||
............|..--------.|}........................}|.--------..|............
|
||||
............|..+........+..........................+........+..|............
|
||||
............|..+........+..........................+........+..|............
|
||||
............|..--------.|}........................}|.--------..|............
|
||||
..........|-|.........--------+-+-------+-+----+------.........|-|..........
|
||||
..........|...-------...|.S....|....|....|....|....|...-------...|..........
|
||||
........|-|...|.....|...|.|....|....|....|....|....|...|.....|...|-|........
|
||||
........|...---..}..--+------------------------------+--..}..---...|........
|
||||
........|...|..................................................|...|........
|
||||
........-----..................................................-----........
|
||||
............................................................................
|
||||
............................................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
-- Doors
|
||||
des.door("locked",22,04)
|
||||
des.door("locked",22,15)
|
||||
des.door("locked",53,04)
|
||||
des.door("locked",53,15)
|
||||
des.door("locked",49,06)
|
||||
des.door("locked",26,13)
|
||||
des.door("locked",28,07)
|
||||
des.door("locked",30,12)
|
||||
des.door("locked",33,07)
|
||||
des.door("locked",32,12)
|
||||
des.door("locked",35,07)
|
||||
des.door("locked",40,12)
|
||||
des.door("locked",43,07)
|
||||
des.door("locked",42,12)
|
||||
des.door("locked",45,07)
|
||||
des.door("locked",47,12)
|
||||
des.door("closed",15,09)
|
||||
des.door("closed",15,10)
|
||||
des.door("closed",24,09)
|
||||
des.door("closed",24,10)
|
||||
des.door("closed",51,09)
|
||||
des.door("closed",51,10)
|
||||
des.door("closed",60,09)
|
||||
des.door("closed",60,10)
|
||||
-- Stairs
|
||||
des.stair("up", 10,10)
|
||||
des.stair("down", 25,14)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Objects
|
||||
des.object("*", 25, 05)
|
||||
des.object("*", 26, 05)
|
||||
des.object("*", 27, 05)
|
||||
des.object("*", 28, 05)
|
||||
des.object("*", 25, 06)
|
||||
des.object("*", 26, 06)
|
||||
des.object("*", 27, 06)
|
||||
des.object("*", 28, 06)
|
||||
--
|
||||
des.object("[", 40, 05)
|
||||
des.object("[", 41, 05)
|
||||
des.object("[", 42, 05)
|
||||
des.object("[", 43, 05)
|
||||
des.object("[", 40, 06)
|
||||
des.object("[", 41, 06)
|
||||
des.object("[", 42, 06)
|
||||
des.object("[", 43, 06)
|
||||
--
|
||||
des.object(")", 27, 13)
|
||||
des.object(")", 28, 13)
|
||||
des.object(")", 29, 13)
|
||||
des.object(")", 30, 13)
|
||||
des.object(")", 27, 14)
|
||||
des.object(")", 28, 14)
|
||||
des.object(")", 29, 14)
|
||||
des.object(")", 30, 14)
|
||||
--
|
||||
des.object("(", 37, 13)
|
||||
des.object("(", 38, 13)
|
||||
des.object("(", 39, 13)
|
||||
des.object("(", 40, 13)
|
||||
des.object("(", 37, 14)
|
||||
des.object("(", 38, 14)
|
||||
des.object("(", 39, 14)
|
||||
des.object("(", 40, 14)
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster({ id = "ninja", x=15, y=05, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=16, y=05, peaceful=0 })
|
||||
des.monster("wolf", 17, 05)
|
||||
des.monster("wolf", 18, 05)
|
||||
des.monster({ id = "ninja", x=19, y=05, peaceful=0 })
|
||||
des.monster("wolf", 15, 14)
|
||||
des.monster("wolf", 16, 14)
|
||||
des.monster({ id = "ninja", x=17, y=14, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=18, y=14, peaceful=0 })
|
||||
des.monster("wolf", 56, 05)
|
||||
des.monster({ id = "ninja", x=57, y=05, peaceful=0 })
|
||||
des.monster("wolf", 58, 05)
|
||||
des.monster("wolf", 59, 05)
|
||||
des.monster({ id = "ninja", x=56, y=14, peaceful=0 })
|
||||
des.monster("wolf", 57, 14)
|
||||
des.monster({ id = "ninja", x=58, y=14, peaceful=0 })
|
||||
des.monster("d", 59, 14)
|
||||
des.monster("wolf", 60, 14)
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
des.monster("stalker")
|
||||
-- "guards" for the central courtyard.
|
||||
des.monster({ id = "samurai", x=30, y=05, peaceful=0 })
|
||||
des.monster({ id = "samurai", x=31, y=05, peaceful=0 })
|
||||
des.monster({ id = "samurai", x=32, y=05, peaceful=0 })
|
||||
des.monster({ id = "samurai", x=32, y=14, peaceful=0 })
|
||||
des.monster({ id = "samurai", x=33, y=14, peaceful=0 })
|
||||
des.monster({ id = "samurai", x=34, y=14, peaceful=0 })
|
@ -1,98 +0,0 @@
|
||||
-- NetHack Samurai Sam-strt.lua $NHDT-Date: 1695932714 2023/09/28 20:25:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Lord Sato
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
-- The throne room designation produces random atmospheric
|
||||
-- messages (until the room is entered) but this one doesn't
|
||||
-- actually contain any throne.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
|
||||
des.map([[
|
||||
..............................................................PP............
|
||||
...............................................................PP...........
|
||||
..........---------------------------------------------------...PPP.........
|
||||
..........|......|.........|...|..............|...|.........|....PPPPP......
|
||||
......... |......|.........S...|..............|...S.........|.....PPPP......
|
||||
..........|......|.........|---|..............|---|.........|.....PPP.......
|
||||
..........+......|.........+...-------++-------...+.........|......PP.......
|
||||
..........+......|.........|......................|.........|......PP.......
|
||||
......... |......---------------------++--------------------|........PP.....
|
||||
..........|.................................................|.........PP....
|
||||
..........|.................................................|...........PP..
|
||||
..........----------------------------------------...-------|............PP.
|
||||
..........................................|.................|.............PP
|
||||
.............. ................. .........|.................|..............P
|
||||
............. } ............... } ........|.................|...............
|
||||
.............. ........PP....... .........|.................|...............
|
||||
.....................PPP..................|.................|...............
|
||||
......................PP..................-------------------...............
|
||||
............................................................................
|
||||
............................................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region({ region={18,03, 26,07}, lit=1, type="throne", filled=2 })
|
||||
-- Portal arrival zone
|
||||
des.levregion({ region = {62,12,70,17}, type="branch" })
|
||||
-- Stairs
|
||||
des.stair("down", 29,04)
|
||||
-- Doors
|
||||
des.door("locked",10,06)
|
||||
des.door("locked",10,07)
|
||||
des.door("closed",27,04)
|
||||
des.door("closed",27,06)
|
||||
des.door("closed",38,06)
|
||||
des.door("locked",38,08)
|
||||
des.door("closed",39,06)
|
||||
des.door("locked",39,08)
|
||||
des.door("closed",50,04)
|
||||
des.door("closed",50,06)
|
||||
-- Lord Sato
|
||||
des.monster({ id = "Lord Sato", coord = {20, 04}, inventory = function()
|
||||
des.object({ id = "splint mail", spe = 5, eroded=-1, buc="not-cursed" });
|
||||
des.object({ id = "katana", spe = 4, eroded=-1, buc="not-cursed" });
|
||||
end })
|
||||
-- The treasure of Lord Sato
|
||||
des.object("chest", 20, 04)
|
||||
-- roshi guards for the audience chamber
|
||||
des.monster("roshi", 18, 04)
|
||||
des.monster("roshi", 18, 05)
|
||||
des.monster("roshi", 18, 06)
|
||||
des.monster("roshi", 18, 07)
|
||||
des.monster("roshi", 26, 04)
|
||||
des.monster("roshi", 26, 05)
|
||||
des.monster("roshi", 26, 06)
|
||||
des.monster("roshi", 26, 07)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Monsters on siege duty.
|
||||
des.monster({ id = "ninja", x=64, y=00, peaceful=0 })
|
||||
des.monster("wolf", 65, 01)
|
||||
des.monster({ id = "ninja", x=67, y=02, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=69, y=05, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=69, y=06, peaceful=0 })
|
||||
des.monster("wolf", 69, 07)
|
||||
des.monster({ id = "ninja", x=70, y=06, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=70, y=07, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=72, y=01, peaceful=0 })
|
||||
des.monster("wolf", 75, 09)
|
||||
des.monster({ id = "ninja", x=73, y=05, peaceful=0 })
|
||||
des.monster({ id = "ninja", x=68, y=02, peaceful=0 })
|
||||
des.monster("stalker")
|
@ -1,35 +0,0 @@
|
||||
-- NetHack Tourist Tou-fila.lua $NHDT-Date: 1652196014 2022/05/10 15:20:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "soldier", peaceful = 0 })
|
||||
des.monster({ id = "soldier", peaceful = 0 })
|
||||
des.monster({ id = "soldier", peaceful = 0 })
|
||||
des.monster({ id = "soldier", peaceful = 0 })
|
||||
des.monster({ id = "soldier", peaceful = 0 })
|
||||
des.monster({ class = "H", peaceful = 0 })
|
||||
des.monster({ class = "C", peaceful = 0 })
|
@ -1,39 +0,0 @@
|
||||
-- NetHack Tourist Tou-filb.lua $NHDT-Date: 1652196015 2022/05/10 15:20:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noflip");
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
--
|
||||
des.monster({ id = "soldier", peaceful = 0 })
|
||||
des.monster({ id = "captain", peaceful = 0 })
|
||||
des.monster({ id = "captain", peaceful = 0 })
|
||||
des.monster({ class = "H", peaceful = 0 })
|
||||
des.monster({ class = "H", peaceful = 0 })
|
||||
des.monster({ class = "C", peaceful = 0 })
|
||||
des.monster("s")
|
@ -1,159 +0,0 @@
|
||||
-- NetHack Tourist Tou-goal.lua $NHDT-Date: 1652196015 2022/05/10 15:20:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel");
|
||||
|
||||
des.map([[
|
||||
----------------------------------------------------------------------------
|
||||
|.........|.........|..........|..| |.................|........|........|..|
|
||||
|.........|.........|..........|..| |....--------.....|........|........|..|
|
||||
|------S--|--+-----------+------..| |....|......|.....|........|........|..|
|
||||
|.........|.......................| |....|......+.....--+-------------+--..|
|
||||
|.........|.......................| |....|......|..........................|
|
||||
|-S-----S-|......----------.......| |....|......|..........................|
|
||||
|..|..|...|......|........|.......| |....-----------.........----..........|
|
||||
|..+..+...|......|........|.......| |....|.........|.........|}}|..........|
|
||||
|..|..|...|......+........|.......| |....|.........+.........|}}|..........|
|
||||
|..|..|...|......|........|.......S.S....|.........|.........----..........|
|
||||
|---..----|......|........|.......| |....|.........|.......................|
|
||||
|.........+......|+F-+F-+F|.......| |....-----------.......................|
|
||||
|---..----|......|..|..|..|.......| |......................--------------..|
|
||||
|..|..|...|......--F-F--F--.......| |......................+............|..|
|
||||
|..+..+...|.......................| |--.---...-----+-----..|............|..|
|
||||
|--|..----|--+-----------+------..| |.....|...|.........|..|------------|..|
|
||||
|..+..+...|.........|..........|..| |.....|...|.........|..+............|..|
|
||||
|..|..|...|.........|..........|..| |.....|...|.........|..|............|..|
|
||||
----------------------------------------------------------------------------
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
-- The Inn
|
||||
des.region(selection.area(01,01,09,02), "lit")
|
||||
des.region({ region = {01,04,09,05}, lit=1, type = "barracks", filled = 1 })
|
||||
des.region(selection.area(01,07,02,10), "unlit")
|
||||
des.region(selection.area(07,07,09,10), "unlit")
|
||||
des.region(selection.area(01,14,02,15), "unlit")
|
||||
des.region(selection.area(07,14,09,15), "unlit")
|
||||
des.region(selection.area(01,17,02,18), "unlit")
|
||||
des.region(selection.area(07,17,09,18), "unlit")
|
||||
--
|
||||
des.region({ region = {11,01,19,02}, lit = 0, type = "barracks", filled = 1 })
|
||||
des.region(selection.area(21,01,30,02), "unlit")
|
||||
des.region({ region = {11,17,19,18}, lit = 0, type = "barracks", filled = 1 })
|
||||
des.region(selection.area(21,17,30,18), "unlit")
|
||||
-- Police Station
|
||||
des.region(selection.area(18,07,25,11), "lit")
|
||||
des.region(selection.area(18,13,19,13), "unlit")
|
||||
des.region(selection.area(21,13,22,13), "unlit")
|
||||
des.region(selection.area(24,13,25,13), "unlit")
|
||||
-- The town itself
|
||||
des.region(selection.area(42,03,47,06), "unlit")
|
||||
des.region(selection.area(42,08,50,11), "unlit")
|
||||
des.region({ region = {37,16,41,18}, lit = 0, type = "morgue", filled = 1 })
|
||||
des.region(selection.area(47,16,55,18), "unlit")
|
||||
des.region(selection.area(55,01,62,03), "unlit")
|
||||
des.region(selection.area(64,01,71,03), "unlit")
|
||||
des.region({ region = {60,14,71,15}, lit = 1, type = "shop", filled = 1 })
|
||||
des.region({ region = {60,17,71,18}, lit = 1, type = "shop", filled = 1 })
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Stairs
|
||||
des.stair("up", 70,08)
|
||||
-- Doors
|
||||
des.door("locked",07,03)
|
||||
des.door("locked",02,06)
|
||||
des.door("locked",08,06)
|
||||
des.door("closed",03,08)
|
||||
des.door("closed",06,08)
|
||||
des.door("open",10,12)
|
||||
des.door("closed",03,15)
|
||||
des.door("closed",06,15)
|
||||
des.door("closed",03,17)
|
||||
des.door("closed",06,17)
|
||||
des.door("closed",13,03)
|
||||
des.door("random",25,03)
|
||||
des.door("closed",13,16)
|
||||
des.door("random",25,16)
|
||||
des.door("locked",17,09)
|
||||
des.door("locked",18,12)
|
||||
des.door("locked",21,12)
|
||||
des.door("locked",24,12)
|
||||
des.door("locked",34,10)
|
||||
des.door("locked",36,10)
|
||||
des.door("random",48,04)
|
||||
des.door("random",56,04)
|
||||
des.door("random",70,04)
|
||||
des.door("random",51,09)
|
||||
des.door("random",51,15)
|
||||
des.door("open",59,14)
|
||||
des.door("open",59,17)
|
||||
-- Objects
|
||||
des.object({ id = "credit card", x=04, y=01, buc="blessed", spe=0, name="The Platinum Yendorian Express Card" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps - must avoid the 2 shops
|
||||
local validtraps = selection.area(00,00,75,19):filter_mapchar('.')
|
||||
validtraps = validtraps - selection.area(60,14,71,18)
|
||||
for i=1,6 do
|
||||
des.trap(validtraps:rndcoord(1))
|
||||
end
|
||||
-- Random monsters.
|
||||
des.monster({ id = "Master of Thieves", x=04, y=01, peaceful = 0 })
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("s")
|
||||
des.monster("s")
|
||||
-- ladies of the evening
|
||||
des.monster("succubus", 02, 08)
|
||||
des.monster("succubus", 08, 08)
|
||||
des.monster("incubus", 02, 14)
|
||||
des.monster("incubus", 08, 14)
|
||||
des.monster("incubus", 02, 17)
|
||||
des.monster("incubus", 08, 17)
|
||||
-- Police station (with drunken prisoners)
|
||||
des.monster({ id = "Kop Kaptain", x=24, y=09, peaceful = 0 })
|
||||
des.monster({ id = "Kop Lieutenant", x=20, y=09, peaceful = 0 })
|
||||
des.monster({ id = "Kop Lieutenant", x=22, y=11, peaceful = 0 })
|
||||
des.monster({ id = "Kop Lieutenant", x=22, y=07, peaceful = 0 })
|
||||
des.monster({ id = "Keystone Kop", x=19, y=07, peaceful = 0 })
|
||||
des.monster({ id = "Keystone Kop", x=19, y=08, peaceful = 0 })
|
||||
des.monster({ id = "Keystone Kop", x=22, y=09, peaceful = 0 })
|
||||
des.monster({ id = "Keystone Kop", x=24, y=11, peaceful = 0 })
|
||||
des.monster({ id = "Keystone Kop", x=19, y=11, peaceful = 0 })
|
||||
des.monster("prisoner", 19, 13)
|
||||
des.monster("prisoner", 21, 13)
|
||||
des.monster("prisoner", 24, 13)
|
||||
--
|
||||
des.monster({ id = "watchman", x=33, y=10, peaceful = 0 })
|
||||
|
||||
des.wallify()
|
@ -1,153 +0,0 @@
|
||||
-- NetHack Tourist Tou-loca.lua $NHDT-Date: 1652196015 2022/05/10 15:20:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor")
|
||||
des.map([[
|
||||
----------------------------------------------------------------------------
|
||||
|....|......|..........|......|......|...|....|.....|......|...............|
|
||||
|....|......|.|------|.|......|......|.|.|....|..}..|......|.|----------|..|
|
||||
|....|--+----.|......|.|-S---+|+-----|.|.S....|.....|---+--|.|..........+..|
|
||||
|....|........|......|.|...|.........|.|------|..............|..........|-+|
|
||||
|....+...}}...+......|.|...|.|-----|.|..............|--+----------------|..|
|
||||
|----|........|------|.|---|.|.....|......|-----+-|.|.......|...........|--|
|
||||
|............................|.....|.|--+-|.......|.|.......|...........|..|
|
||||
|----|.....|-------------|...|--+--|.|....|.......|.|-----------+-------|..|
|
||||
|....+.....+.........S...|...........|....|-------|........................|
|
||||
|....|.....|.........|...|.|---------|....|.........|-------|.|----------|.|
|
||||
|....|.....|---------|---|.|......|..+....|-------|.|.......|.+......S.\.|.|
|
||||
|....|.....+.........S...|.|......|..|....|.......|.|.......|.|......|...|.|
|
||||
|-------|..|.........|---|.|+-------------------+-|.|.......+.|----------|.|
|
||||
|.......+..|---------|.........|.........|..........|.......|.|..........|.|
|
||||
|.......|..............|--+--|.|.........|.|----+-----------|.|..........|.|
|
||||
|---------+-|--+-----|-|.....|.|.........|.|........|.|.....+.|..........+.|
|
||||
|...........|........|.S.....|.|----+----|.|--------|.|.....|.|----------|.|
|
||||
|...........|........|.|.....|........................|.....|..............|
|
||||
----------------------------------------------------------------------------
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
--
|
||||
des.region({ region={01,01, 04,05}, lit=0, type="morgue", filled=1 })
|
||||
des.region({ region={15,03, 20,05}, lit=1, type="shop", filled=1 })
|
||||
des.region({ region={62,03, 71,04}, lit=1, type="shop", filled=1 })
|
||||
des.region({ region={01,17, 11,18}, lit=1, type="barracks", filled=1 })
|
||||
des.region({ region={12,09, 20,10}, lit=1, type="barracks", filled=1 })
|
||||
des.region({ region={53,11, 59,14}, lit=1, type="zoo", filled=1 })
|
||||
des.region({ region={63,14, 72,16}, lit=1, type="barracks", filled=1 })
|
||||
des.region({ region={32,14, 40,16}, lit=1, type="temple", filled=1 })
|
||||
--
|
||||
des.region({ region = {06,01,11,02}, type = "ordinary" })
|
||||
des.region({ region = {24,01,29,02}, type = "ordinary" })
|
||||
des.region({ region = {31,01,36,02}, type = "ordinary" })
|
||||
des.region({ region = {42,01,45,03}, type = "ordinary" })
|
||||
des.region({ region = {53,01,58,02}, type = "ordinary" })
|
||||
des.region({ region = {24,04,26,05}, type = "ordinary" })
|
||||
des.region({ region = {30,06,34,07}, type = "ordinary" })
|
||||
des.region(selection.area(73,05,74,05), "unlit")
|
||||
des.region({ region = {01,09,04,12}, type = "ordinary" })
|
||||
des.region({ region = {01,14,07,15}, type = "ordinary" })
|
||||
des.region({ region = {12,12,20,13}, type = "ordinary" })
|
||||
des.region({ region = {13,17,20,18}, type = "ordinary" })
|
||||
des.region({ region = {22,09,24,10}, type = "ordinary" })
|
||||
des.region({ region = {22,12,24,12}, type = "ordinary" })
|
||||
des.region({ region = {24,16,28,18}, type = "ordinary" })
|
||||
des.region({ region = {28,11,33,12}, type = "ordinary" })
|
||||
des.region(selection.area(35,11,36,12), "lit")
|
||||
des.region({ region = {38,08,41,12}, type = "ordinary" })
|
||||
des.region({ region = {43,07,49,08}, type = "ordinary" })
|
||||
des.region({ region = {43,12,49,12}, type = "ordinary" })
|
||||
des.region({ region = {44,16,51,16}, type = "ordinary" })
|
||||
des.region({ region = {53,06,59,07}, type = "ordinary" })
|
||||
des.region({ region = {61,06,71,07}, type = "ordinary" })
|
||||
des.region({ region = {55,16,59,18}, type = "ordinary" })
|
||||
des.region({ region = {63,11,68,12}, type = "ordinary" })
|
||||
des.region({ region = {70,11,72,12}, type = "ordinary" })
|
||||
-- Stairs
|
||||
des.stair("up", 10,04)
|
||||
des.stair("down", 73,05)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
des.door("closed",05,05)
|
||||
des.door("closed",05,09)
|
||||
des.door("closed",08,14)
|
||||
des.door("closed",08,03)
|
||||
des.door("closed",11,09)
|
||||
des.door("closed",11,12)
|
||||
des.door("closed",10,16)
|
||||
des.door("closed",14,05)
|
||||
des.door("closed",15,16)
|
||||
des.door("locked",21,09)
|
||||
des.door("locked",21,12)
|
||||
des.door("closed",23,17)
|
||||
des.door("closed",25,03)
|
||||
des.door("closed",26,15)
|
||||
des.door("closed",29,03)
|
||||
des.door("closed",28,13)
|
||||
des.door("closed",31,03)
|
||||
des.door("closed",32,08)
|
||||
des.door("closed",37,11)
|
||||
des.door("closed",36,17)
|
||||
des.door("locked",41,03)
|
||||
des.door("closed",40,07)
|
||||
des.door("closed",48,06)
|
||||
des.door("closed",48,13)
|
||||
des.door("closed",48,15)
|
||||
des.door("closed",56,03)
|
||||
des.door("closed",55,05)
|
||||
des.door("closed",72,03)
|
||||
des.door("locked",74,04)
|
||||
des.door("closed",64,08)
|
||||
des.door("closed",62,11)
|
||||
des.door("closed",69,11)
|
||||
des.door("closed",60,13)
|
||||
des.door("closed",60,16)
|
||||
des.door("closed",73,16)
|
||||
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Toilet paper
|
||||
des.object("blank paper", 71, 12)
|
||||
des.object("blank paper", 71, 12)
|
||||
-- Random traps - must avoid the 2 shops
|
||||
local validtraps = selection.area(00,00,75,19):filter_mapchar('.')
|
||||
validtraps = validtraps - (selection.area(15,03,20,05) + selection.area(62,03,71,04))
|
||||
for i = 1,9 do
|
||||
des.trap(validtraps:rndcoord(1))
|
||||
end
|
||||
-- Random monsters.
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("s")
|
||||
des.monster("s")
|
@ -1,134 +0,0 @@
|
||||
-- NetHack Tourist Tou-strt.lua $NHDT-Date: 1652196016 2022/05/10 15:20:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991,92 by M. Stephenson, P. Winner
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, Twoflower
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor")
|
||||
des.map([[
|
||||
.......}}....---------..-------------------------------------------------...
|
||||
........}}...|.......|..|.-------------------------------------------...|...
|
||||
.........}}..|.......|..|.|......|......|.............|......|......|...|...
|
||||
..........}}.|.......|..|.|......+......+.............+......+..\...|...|...
|
||||
...........}}}..........|.|......|......|.............|......|......|...|...
|
||||
.............}}.........|.|----S-|--S---|S----------S-|---S--|------|...|...
|
||||
..............}}}.......|...............................................|...
|
||||
................}}}.....----S------++--S----------S----------S-----------...
|
||||
..................}}........... .. ...................................
|
||||
......-------......}}}}........}}}}..}}}}..}}}}..}}}}.......................
|
||||
......|.....|.......}}}}}}..}}}} .. }}}}..}}}}..}}}.....................
|
||||
......|.....+...........}}}}}}........................}}}..}}}}..}}}..}}}...
|
||||
......|.....|...........................................}}}}..}}}..}}}}.}}}}
|
||||
......-------...............................................................
|
||||
............................................................................
|
||||
...-------......-------.....................................................
|
||||
...|.....|......|.....|.....................................................
|
||||
...|.....+......+.....|.....................................................
|
||||
...|.....|......|.....|.....................................................
|
||||
...-------......-------.....................................................
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
des.region({ region={14,01, 20,03}, lit=0, type="morgue", filled=1 })
|
||||
des.region(selection.area(07,10,11,12), "unlit")
|
||||
des.region(selection.area(04,16,08,18), "unlit")
|
||||
des.region(selection.area(17,16,21,18), "unlit")
|
||||
des.region(selection.area(27,02,32,04), "unlit")
|
||||
des.region(selection.area(34,02,39,04), "unlit")
|
||||
des.region(selection.area(41,02,53,04), "unlit")
|
||||
des.region(selection.area(55,02,60,04), "unlit")
|
||||
des.region(selection.area(62,02,67,04), "lit")
|
||||
-- Stairs
|
||||
des.stair("down", 66,03)
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {68,14,68,14}, type="branch" })
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,75,19))
|
||||
-- Doors
|
||||
des.door("locked",31,05)
|
||||
des.door("locked",36,05)
|
||||
des.door("locked",41,05)
|
||||
des.door("locked",52,05)
|
||||
des.door("locked",58,05)
|
||||
des.door("locked",28,07)
|
||||
des.door("locked",39,07)
|
||||
des.door("locked",50,07)
|
||||
des.door("locked",61,07)
|
||||
des.door("closed",33,03)
|
||||
des.door("closed",40,03)
|
||||
des.door("closed",54,03)
|
||||
des.door("closed",61,03)
|
||||
des.door("open",12,11)
|
||||
des.door("open",09,17)
|
||||
des.door("open",16,17)
|
||||
des.door("locked",35,07)
|
||||
des.door("locked",36,07)
|
||||
-- Monsters on siege duty.
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("giant spider")
|
||||
des.monster("s")
|
||||
des.monster("s")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("forest centaur")
|
||||
des.monster("C")
|
||||
-- Twoflower
|
||||
des.monster({ id = "Twoflower", coord = {64, 03}, inventory = function()
|
||||
des.object({ id = "walking shoes", spe = 3 });
|
||||
des.object({ id = "hawaiian shirt", spe = 3 });
|
||||
end })
|
||||
-- The treasure of Twoflower
|
||||
des.object("chest", 64, 03)
|
||||
-- guides for the audience chamber
|
||||
des.monster("guide", 29, 03)
|
||||
des.monster("guide", 32, 04)
|
||||
des.monster("guide", 35, 02)
|
||||
des.monster("guide", 38, 03)
|
||||
des.monster("guide", 45, 03)
|
||||
des.monster("guide", 48, 02)
|
||||
des.monster("guide", 49, 04)
|
||||
des.monster("guide", 51, 03)
|
||||
des.monster("guide", 57, 03)
|
||||
des.monster("guide", 62, 04)
|
||||
des.monster("guide", 66, 04)
|
||||
-- path guards
|
||||
des.monster("watchman", 35, 08)
|
||||
des.monster("watchman", 36, 08)
|
||||
-- river monsters
|
||||
des.monster("giant eel", 62, 12)
|
||||
des.monster("piranha", 47, 10)
|
||||
des.monster("piranha", 29, 11)
|
||||
des.monster("kraken", 34, 09)
|
||||
des.monster("kraken", 37, 09)
|
||||
-- Random traps
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,40 +0,0 @@
|
||||
-- NetHack Valkyrie Val-fila.lua $NHDT-Date: 1652196016 2022/05/10 15:20:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "I" });
|
||||
|
||||
des.level_flags("mazelevel", "icedpools", "noflip")
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="I", smoothed=true, joined=true, lit=1, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("a")
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
--
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,42 +0,0 @@
|
||||
-- NetHack Valkyrie Val-filb.lua $NHDT-Date: 1652196016 2022/05/10 15:20:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "L" });
|
||||
|
||||
des.level_flags("mazelevel", "icedpools", "noflip")
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="L", smoothed=true, joined=true, lit=1, walled=false })
|
||||
|
||||
--
|
||||
des.stair("up")
|
||||
des.stair("down")
|
||||
--
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
--
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("a")
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
--
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap()
|
||||
des.trap()
|
@ -1,104 +0,0 @@
|
||||
-- NetHack Valkyrie Val-goal.lua $NHDT-Date: 1652196017 2022/05/10 15:20:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.5 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = "L" });
|
||||
|
||||
des.level_flags("mazelevel", "icedpools")
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="L", smoothed=true, joined=true, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
xxxxxx.....................xxxxxxxx
|
||||
xxxxx.......LLLLL.LLLLL......xxxxxx
|
||||
xxxx......LLLLLLLLLLLLLLL......xxxx
|
||||
xxxx.....LLL|---------|LLL.....xxxx
|
||||
xxxx....LL|--.........--|LL.....xxx
|
||||
x......LL|-...LLLLLLL...-|LL.....xx
|
||||
.......LL|...LL.....LL...|LL......x
|
||||
......LL|-..LL.......LL..-|LL......
|
||||
......LL|.................|LL......
|
||||
......LL|-..LL.......LL..-|LL......
|
||||
.......LL|...LL.....LL...|LL.......
|
||||
xx.....LL|-...LLLLLLL...-|LL......x
|
||||
xxx.....LL|--.........--|LL.....xxx
|
||||
xxxx.....LLL|---------|LLL...xxxxxx
|
||||
xxxxx.....LLLLLLLLLLLLLLL...xxxxxxx
|
||||
xxxxxx......LLLLL.LLLLL.....xxxxxxx
|
||||
xxxxxxxxx..................xxxxxxxx
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,34,16), "lit")
|
||||
-- Stairs
|
||||
-- Note: The up stairs are *intentionally* off of the map.
|
||||
-- if the stairs are surrounded by lava, maybe give some room
|
||||
des.replace_terrain({ region = {44,09, 46,11}, fromterrain='L', toterrain='.', chance=50 });
|
||||
des.stair("up", 45,10)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,34,16))
|
||||
-- Drawbridges; northern one opens from the south (portcullis) to further
|
||||
-- north (lowered span), southern one from the north to further south
|
||||
des.drawbridge({ x=17, y=02, dir="south", state="random" })
|
||||
if percent(75) then
|
||||
des.drawbridge({ x=17, y=14, dir="north", state="open" })
|
||||
else
|
||||
des.drawbridge({ x=17, y=14, dir="north", state="random" })
|
||||
end
|
||||
-- Objects
|
||||
des.object({ id = "crystal ball", x=17, y=08, buc="blessed", spe=5, name="The Orb of Fate" })
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Traps
|
||||
des.trap("board",13,08)
|
||||
des.trap("board",21,08)
|
||||
-- Random traps
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("board")
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("Lord Surtur", 17, 08)
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("a")
|
||||
des.monster("a")
|
||||
des.monster({ id = "fire giant", x=10, y=06, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=10, y=07, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=10, y=08, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=10, y=09, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=10, y=10, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=24, y=06, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=24, y=07, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=24, y=08, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=24, y=09, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=24, y=10, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ class = "H", peaceful = 0 })
|
||||
|
||||
--
|
||||
-- The "fill" levels for the quest.
|
||||
--
|
||||
-- These levels are used to fill out any levels not occupied by specific
|
||||
-- levels as defined above. "filla" is the upper filler, between the
|
||||
-- start and locate levels, and "fillb" the lower between the locate
|
||||
-- and goal levels.
|
||||
--
|
@ -1,85 +0,0 @@
|
||||
-- NetHack Valkyrie Val-loca.lua $NHDT-Date: 1652196017 2022/05/10 15:20:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
des.level_init({ style = "solidfill", fg = " " });
|
||||
|
||||
des.level_flags("mazelevel", "hardfloor", "icedpools", "noflip")
|
||||
|
||||
des.level_init({ style="mines", fg=".", bg="I", smoothed=true, joined=false, lit=1, walled=false })
|
||||
|
||||
des.map([[
|
||||
PPPPxxxx xxxxPPPPPx
|
||||
PLPxxx xPPLLLPP
|
||||
PPP ....................... PPPLLP
|
||||
xx ............................ PPPP
|
||||
x ............................... xxxx
|
||||
................................. xx
|
||||
.................................... x
|
||||
...................................
|
||||
x .................................. x
|
||||
xx .............................. PP
|
||||
xPPP .......................... PLP
|
||||
xPLLP xxPLLP
|
||||
xPPPPxx xxxxPPPP
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,39,12), "lit")
|
||||
-- Stairs
|
||||
des.stair("up", 48,14)
|
||||
des.stair("down", 20,06)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(00,00,39,12))
|
||||
-- Objects
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
des.object()
|
||||
-- Random traps
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap()
|
||||
des.trap()
|
||||
-- Random monsters.
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("fire ant")
|
||||
des.monster("a")
|
||||
des.monster({ class = "H", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ id = "fire giant", peaceful = 0 })
|
||||
des.monster({ class = "H", peaceful = 0 })
|
||||
|
@ -1,100 +0,0 @@
|
||||
-- NetHack Valkyrie Val-strt.lua $NHDT-Date: 1652196017 2022/05/10 15:20:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
-- Copyright (c) 1989 by Jean-Christophe Collet
|
||||
-- Copyright (c) 1991-2 by M. Stephenson
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
--
|
||||
--
|
||||
-- The "start" level for the quest.
|
||||
--
|
||||
-- Here you meet your (besieged) class leader, the Norn,
|
||||
-- and receive your quest assignment.
|
||||
--
|
||||
|
||||
des.level_flags("mazelevel", "noteleport", "hardfloor", "icedpools")
|
||||
des.level_init({ style = "solidfill", fg = "I" })
|
||||
|
||||
local pools = selection.new()
|
||||
-- random locations
|
||||
for i = 1,13 do
|
||||
pools:set();
|
||||
end
|
||||
-- some bigger ones
|
||||
pools = pools | selection.grow(selection.set(selection.new()), "west")
|
||||
pools = pools | selection.grow(selection.set(selection.new()), "north")
|
||||
pools = pools | selection.grow(selection.set(selection.new()), "random")
|
||||
|
||||
-- Lava pools surrounded by water
|
||||
des.terrain(pools:clone():grow("all"), "P")
|
||||
des.terrain(pools, "L")
|
||||
|
||||
des.map([[
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..{..xxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxx.....xxxxxxxxxxxxx|----------------|xxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxx..xxx...xxxxxxxxxxx|................|xxxxxxxxxx..xxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxx..xxxxxx......xxxxx.|................|.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxx..xxxxxxxxxxxx.......+................+...xxxxxxx.xxxxxxxxxxxxxxxxxxxxx
|
||||
xxxx..xxxxxxxxx.....xxxxx.|................|.x...xxxxx.xxxxxxxxxxxxxxxxxxxxx
|
||||
xxx..xxxxxxxxx..xxxxxxxxxx|................|xxxx.......xxxxxxxxxxxxxxxxxxxxx
|
||||
xxxx..xxxxxxx..xxxxxxxxxxx|----------------|xxxxxxxxxx...xxxxxxxxxxxxxxxxxxx
|
||||
xxxxxx..xxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxx
|
||||
xxxxxxx......xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxx
|
||||
xxxxxxxxx...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...x......xxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
]]);
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,75,19), "lit")
|
||||
-- Portal arrival point
|
||||
des.levregion({ region = {66,17,66,17}, type="branch" })
|
||||
-- Stairs
|
||||
des.stair("down", 18,01)
|
||||
des.feature("fountain", 53,02)
|
||||
-- Doors
|
||||
des.door("locked",26,10)
|
||||
des.door("locked",43,10)
|
||||
-- Norn
|
||||
des.monster({ id = "Norn", coord = {35, 10}, inventory = function()
|
||||
des.object({ id = "banded mail", spe = 5 });
|
||||
des.object({ id = "long sword", spe = 4 });
|
||||
end })
|
||||
-- The treasure of the Norn
|
||||
des.object("chest", 36, 10)
|
||||
-- valkyrie guards for the audience chamber
|
||||
des.monster("warrior", 27, 08)
|
||||
des.monster("warrior", 27, 09)
|
||||
des.monster("warrior", 27, 11)
|
||||
des.monster("warrior", 27, 12)
|
||||
des.monster("warrior", 42, 08)
|
||||
des.monster("warrior", 42, 09)
|
||||
des.monster("warrior", 42, 11)
|
||||
des.monster("warrior", 42, 12)
|
||||
-- Non diggable walls
|
||||
des.non_diggable(selection.area(26,07,43,13))
|
||||
-- Random traps
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
des.trap("fire")
|
||||
-- Monsters on siege duty.
|
||||
des.monster("fire ant", 04, 12)
|
||||
des.monster("fire ant", 08, 08)
|
||||
des.monster("fire ant", 14, 04)
|
||||
des.monster("fire ant", 17, 11)
|
||||
des.monster("fire ant", 24, 10)
|
||||
des.monster("fire ant", 45, 10)
|
||||
des.monster("fire ant", 54, 02)
|
||||
des.monster("fire ant", 55, 07)
|
||||
des.monster("fire ant", 58, 14)
|
||||
des.monster("fire ant", 63, 17)
|
||||
des.monster({ id = "fire giant", x=18, y=01, peaceful = 0 })
|
||||
des.monster({ id = "fire giant", x=10, y=16, peaceful = 0 })
|
||||
|
@ -1,59 +0,0 @@
|
||||
-- NetHack Wizard Wiz-fila.lua $NHDT-Date: 1652196018 2022/05/10 15:20:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
|
||||
-- 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()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue