Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-10-31 12:26:27 -04:00
8 changed files with 106 additions and 59 deletions

View File

@@ -1,4 +1,4 @@
.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.317 $ $NHDT-Date: 1572448817 2019/10/30 15:20:17 $
.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.319 $ $NHDT-Date: 1572525093 2019/10/31 12:31:33 $
.\"
.\" This is an excerpt from the 'roff' man page from the 'groff' package.
.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines.
@@ -2683,7 +2683,9 @@ HACKDIR, must be writable.
.lp TROUBLEDIR
The location that a record of game aborts and self-diagnosed game problems
is kept. Defaults to HACKDIR, must be writable.
.\"
.\" config file entries beyond this point are shown alphabetically
.\"
.lp AUTOCOMPLETE
Enable or disable an extended command autocompletion.
Autocompletion has no effect for the X11 windowport.
@@ -2749,7 +2751,7 @@ See the \(lqModifying NetHack Symbols\(rq section.
.lp ""
Example:
.sd
\f(CR# replace small punctuation (tick marks) with easier to see digits\fP
\f(CR# replace small punctuation (tick marks) with digits\fP
\f(CRSYMBOLS=S_boulder:0,S_golem:7\fP
.ed
.lp WIZKIT
@@ -4576,8 +4578,8 @@ X S_xorn (xorn)
Y S_yeti (apelike creature)
Z S_zombie (zombie)
z S_zruty (zruty)
S_pet_override (pet override if sysconf accessibility is set)
S_player_override (player override if sysconf accessibility is set)
\ S_pet_override (any pet if sysconf accessibility is set)
\ S_player_override (hero if sysconf accessibility is set)
.\"TABLE_END Do not delete this line.
.TE
.pg
@@ -4660,7 +4662,7 @@ of moving 8 units at a time.
.lp nostatus_updates
Prevent updates to the status lines at the bottom of the screen, if
your screen-reader reads those lines. The same information can be
seen via the #attributes command.
seen via the \(lq#attributes\(rq command.
.hn 2
Global Configuration for System Administrators
.pg

View File

@@ -2895,9 +2895,13 @@ Section names are case insensitive.
%.pg
You can use different configuration statements in the file, some
of which can be used multiple times. In general, the statements are
of which can be used multiple times.
In general, the statements are
written in capital letters, followed by an equals sign, followed by
settings particular to that statement. Here is a list of allowed statements:
settings particular to that statement.
%.pg
Here is a list of allowed statements:
%.lp
\blist{}
@@ -2912,7 +2916,7 @@ You can specify multiple OPTIONS statements, and multiple options
separated by commas in a single OPTIONS statement.
(Comma separated options are processed from right to left.)
%.pg
%.lp ""
Example:
%.sd
\begin{verbatim}
@@ -2946,6 +2950,9 @@ HACKDIR, must be writable.
\item[\bb{TROUBLEDIR}]
The location that a record of game aborts and self-diagnosed game problems
is kept. Defaults to HACKDIR, must be writable.
%
% config file entries beyond this point are shown alphabetically
%
%.lp
\item[\bb{AUTOCOMPLETE}]
Enable or disable an extended command autocompletion.
@@ -2955,11 +2962,11 @@ autocompletion, list the extended command. Prefix the
command with ``{{\tt !}}'' to disable the autocompletion
for that command.
%.pg
%.lp ""
Example:
%.sd
\begin{verbatim}
AUTOCOMPLETE=zap,!annotate
AUTOCOMPLETE=zap,!annotate
\end{verbatim}
%.ed
@@ -2974,7 +2981,7 @@ extended commands. You can specify multiple bindings. Format is key
followed by the command, separated by a colon.
See the ``Changing Key Bindings`` section for more information.
%.pg
%.lp ""
Example:
%.sd
\begin{verbatim}
@@ -2987,7 +2994,7 @@ Example:
Chooses at random one of the comma-separated parameters as an active
section name. Lines in other sections are ignored.
%.pg
%.lp ""
Example:
%.sd
\begin{verbatim}
@@ -3000,23 +3007,37 @@ Example:
\end{verbatim}
%.ed
%.lp
\item[\bb{MSGTYPE}]
Change the way messages are shown in the top status line.
See the ``Configuring Message Types`` section.
%.lp
\item[\bb{MENUCOLOR}]
Highlight menu lines with different colors.
See the ``Configuring Menu Colors`` section.
%.lp
\item[\bb{SYMBOLS},\bb{ROGUESYMBOLS}]
Override one or more symbols in the symbols files.
\item[\bb{MSGTYPE}]
Change the way messages are shown in the top status line.
See the ``Configuring Message Types`` section.
%.lp
\item[\bb{ROGUESYMBOLS}]
Custom symbols for for the rogue level's symbol set.
See {\it SYMBOLS} below.
%.lp
\item[\bb{SOUND}]
Define a sound mapping.
See the ``Configuring User Sounds'' section.
%.lp
\item[\bb{SOUNDDIR}]
Define the directory that contains the sound files.
See the ``Configuring User Sounds'' section.
%.lp
\item[\bb{SYMBOLS}
Override one or more symbols in the symbol set used for all dungeon
levels except for the special rogue level.
See the ``Modifying {\it NetHack\/} Symbols'' section.
%.pg
Example:
%.sd
\begin{verbatim}
SYMBOLS=S_boulder:0
# replace small punctuation (tick marks) with digits
SYMBOLS=S_boulder:0,S_golem:7
\end{verbatim}
%.ed
@@ -3026,22 +3047,17 @@ Debug mode only: extra items to add to initial inventory.
Value is the name of a text file containing a list of item names,
one per line, up to a maximum of 128 lines.
Each line is processed by the function that handles wishing.
%.pg
%.lp ""
Example:
%.sd
\begin{verbatim}
WIZKIT=~/wizkit.txt
WIZKIT=~/wizkit.txt
\end{verbatim}
%.ed
%.lp
\item[\bb{SOUNDDIR}]
Define the directory that contains the sound files.
See the ``Configuring User Sounds'' section.
%.lp
\item[\bb{SOUND}]
Define a sound mapping. See the ``Configuring User Sounds'' section.
\elist
%.lp ""
%.pg
Here is a short example of config file contents:
%.sd
@@ -4876,11 +4892,13 @@ on the rogue level.
\elist
You can also override one or more symbols using the {\it SYMBOLS\/} and
{\it ROGUESYMBOLS\/} config file options. Symbols are specified as
{\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes
the {\it value\/} string in conventional C fashion. This means that `\verb+\+'
is a prefix to take the following character literally. Thus `\verb+\+' needs
to be represented as `\verb+\\+'.
{\it ROGUESYMBOLS\/} config file options.
Symbols are specified as {\it name:value\/} pairs.
Note that {\it NetHack\/} escape-processes
the {\it value\/} string in conventional C fashion.
This means that `\verb+\+' is a prefix to take the following character
literally.
Thus `\verb+\+' needs to be represented as `\verb+\\+'.
The special prefix
`\verb+\m+' switches on the meta bit in the symbol value, and the
`{\tt \^{}}' prefix causes the following character to be treated as a control
@@ -5067,8 +5085,8 @@ Default & Symbol Name & Description\\
\verb@Y@ & S\verb+_+yeti & (apelike creature)\\
\verb@Z@ & S\verb+_+zombie & (zombie)\\
\verb@z@ & S\verb+_+zruty & (zruty)\\
\verb@ @ & S\verb+_+pet\verb+_+override & (pet override if sysconf accessibility is set)\\
\verb@ @ & S\verb+_+player\verb+_+override & (player override if sysconf accessibility is set)
\verb@ @ & S\verb+_+pet\verb+_+override & (any pet if sysconf accessibility is set)\\
\verb@ @ & S\verb+_+player\verb+_+override & (hero if sysconf accessibility is set)
\end{longtable}%
}

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ $NHDT-Date: 1572141706 2019/10/27 02:01:46 $
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ $NHDT-Date: 1572530225 2019/10/31 13:57:05 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -208,6 +208,8 @@ parsing for the argument to 'scores' option was sloppy; "3a/o" (slash) and
"3a 1o" (space and digit one, not lowercase L) both worked but "3a o"
(just space) was supposed to but didn't
wizmakemap could leave genocided monsters on map
when entering Astral level, initial rendering of guardian angel didn't show
it as tame; noticeable if the level was entered with 'hilite_pet' On
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository

View File

@@ -79,6 +79,12 @@
*/
#define MAIL
#define CONFIG_FILE "defaults.nh"
#define CONFIG_TEMPLATE "defaults.template"
#define SYSCF_TEMPLATE "sysconf.template"
#define SYMBOLS_TEMPLATE "symbols.template"
#define GUIDEBOOK_FILE "Guidebook.txt"
/* Stuff to help the user with some common, yet significant errors */
#define INTERJECT_PANIC 0
#define INTERJECTION_TYPES (INTERJECT_PANIC + 1)

View File

@@ -21,6 +21,11 @@
* Note: 3.6.x was not verified with Symantec C.
*/
#if defined(MSDOS)
#define CONFIG_FILE "defaults.nh"
#define GUIDEBOOK_FILE "Guidebook.txt"
#endif
/*
* The following options are somewhat configurable depending on
* your compiler.

View File

@@ -2141,7 +2141,7 @@ const char *default_configfile =
"NetHack Defaults";
#else
#if defined(MSDOS) || defined(WIN32)
"defaults.nh";
CONFIG_FILE;
#else
"NetHack.cnf";
#endif

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 minion.c $NHDT-Date: 1544998886 2018/12/16 22:21:26 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.40 $ */
/* NetHack 3.6 minion.c $NHDT-Date: 1572530226 2019/10/31 13:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.43 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2008. */
/* NetHack may be freely redistributed. See license for details. */
@@ -460,15 +460,18 @@ gain_guardian_angel()
&& (mtmp = mk_roamer(&mons[PM_ANGEL], u.ualign.type, mm.x, mm.y,
TRUE)) != 0) {
mtmp->mstrategy &= ~STRAT_APPEARMSG;
/* guardian angel -- the one case mtame doesn't imply an
* edog structure, so we don't want to call tamedog().
* [Note: this predates mon->mextra which allows a monster
* to have both emin and edog at the same time.]
*/
mtmp->mtame = 10;
/* for 'hilite_pet'; after making tame, before next message */
newsym(mtmp->mx, mtmp->my);
if (!Blind)
pline("An angel appears near you.");
else
You_feel("the presence of a friendly angel near you.");
/* guardian angel -- the one case mtame doesn't
* imply an edog structure, so we don't want to
* call tamedog().
*/
mtmp->mtame = 10;
/* make him strong enough vs. endgame foes */
mtmp->m_lev = rn1(8, 15);
mtmp->mhp = mtmp->mhpmax =

View File

@@ -300,7 +300,8 @@ update_file(
const char * dst_folder,
const char * dst_name,
const char * src_folder,
const char * src_name)
const char * src_name,
BOOL save_copy)
{
char dst_path[MAX_PATH];
strcpy(dst_path, dst_folder);
@@ -310,12 +311,20 @@ update_file(
strcpy(src_path, src_folder);
strcat(src_path, src_name);
char save_path[MAX_PATH];
strcpy(save_path, dst_folder);
strcat(save_path, dst_name);
strcat(save_path, ".save");
if(!file_exists(src_path))
error("Unable to copy file '%s' as it does not exist", src_path);
if (!file_newer(src_path, dst_path))
return;
if (file_exists(dst_path) && save_copy)
CopyFileA(dst_path, save_path, FALSE);
BOOL success = CopyFileA(src_path, dst_path, FALSE);
if(!success) error("Failed to update '%s' to '%s'", src_path, dst_path);
@@ -324,37 +333,39 @@ update_file(
void copy_config_content()
{
/* Keep templates up to date */
update_file(g.fqn_prefix[CONFIGPREFIX], "defaults.tmp",
g.fqn_prefix[DATAPREFIX], "defaults.nh");
update_file(g.fqn_prefix[SYSCONFPREFIX], "sysconf.tmp",
g.fqn_prefix[DATAPREFIX], SYSCF_FILE);
/* TODO: Update the package to store config file as .nethackrc */
update_file(g.fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE,
g.fqn_prefix[DATAPREFIX], CONFIG_FILE, FALSE);
update_file(g.fqn_prefix[SYSCONFPREFIX], SYSCF_TEMPLATE,
g.fqn_prefix[DATAPREFIX], SYSCF_FILE, FALSE);
/* If the required early game file does not exist, copy it */
copy_file(g.fqn_prefix[CONFIGPREFIX], "defaults.nh",
g.fqn_prefix[DATAPREFIX], "defaults.nh");
/* NOTE: We never replace .nethackrc or sysconf */
copy_file(g.fqn_prefix[CONFIGPREFIX], CONFIG_FILE,
g.fqn_prefix[DATAPREFIX], CONFIG_FILE);
copy_file(g.fqn_prefix[SYSCONFPREFIX], SYSCF_FILE,
g.fqn_prefix[DATAPREFIX], SYSCF_FILE);
/* If a required game file does not exist, copy it */
/* Update symbols and save a copy if we are replacing */
/* TODO: Can't HACKDIR be changed during option parsing
causing us to perhaps be checking options against the wrong
symbols file? */
copy_file(g.fqn_prefix[HACKPREFIX], SYMBOLS,
g.fqn_prefix[DATAPREFIX], SYMBOLS);
update_file(g.fqn_prefix[HACKPREFIX], SYMBOLS,
g.fqn_prefix[DATAPREFIX], SYMBOLS, TRUE);
}
void
copy_hack_content()
{
/* Keep Guidebook and opthelp up to date */
update_file(g.fqn_prefix[HACKPREFIX], "Guidebook.txt",
g.fqn_prefix[DATAPREFIX], "Guidebook.txt");
update_file(g.fqn_prefix[HACKPREFIX], "opthelp",
g.fqn_prefix[DATAPREFIX], "opthelp");
update_file(g.fqn_prefix[HACKPREFIX], GUIDEBOOK_FILE,
g.fqn_prefix[DATAPREFIX], GUIDEBOOK_FILE, FALSE);
update_file(g.fqn_prefix[HACKPREFIX], OPTIONFILE,
g.fqn_prefix[DATAPREFIX], OPTIONFILE, FALSE);
/* Keep templates up to date */
update_file(g.fqn_prefix[HACKPREFIX], "symbols.tmp",
g.fqn_prefix[DATAPREFIX], "symbols");
update_file(g.fqn_prefix[HACKPREFIX], SYMBOLS_TEMPLATE,
g.fqn_prefix[DATAPREFIX], SYMBOLS, FALSE);
}