Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

This commit is contained in:
nhmall
2019-02-13 14:57:47 -05:00
9 changed files with 123 additions and 95 deletions

View File

@@ -1,4 +1,4 @@
.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.292 $ $NHDT-Date: 1546984605 2019/01/08 21:56:45 $ .\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.296 $ $NHDT-Date: 1549931433 2019/02/12 00:30:33 $
.\" .\"
.\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" This is an excerpt from the 'roff' man page from the 'groff' package.
.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines.
@@ -2638,15 +2638,15 @@ Prefix a boolean option with \(lqno\(rq or \(oq!\(cq to turn it off.
For compound options, the option name and value are separated by a colon. For compound options, the option name and value are separated by a colon.
Some options are persistent, and apply only to new games. Some options are persistent, and apply only to new games.
You can specify multiple OPTIONS statements, and multiple options You can specify multiple OPTIONS statements, and multiple options
in a single OPTIONS statement. separated by commas in a single OPTIONS statement.
(Comma separated options are processed from right to left.)
.pg .pg
Example: Example:
.sd .sd
.ft CR .ft CR
OPTIONS=dogname:Fido OPTIONS=dogname:Fido
.\" '\(dq' == double quote; including a literal double quote here works .\" '\(dq' == double quote; including a literal double quote here works
.\" for formatting but confuses Emacs' nroff-mode into thinking .\" for formatting but confuses Emacs' nroff-mode
.\" that the \fP is part of a string rather than a font toggle
OPTIONS=!legacy,autopickup,pickup_types:$\(dq=/!?+ OPTIONS=!legacy,autopickup,pickup_types:$\(dq=/!?+
.ft .ft
.ed .ed
@@ -2802,6 +2802,13 @@ to that shell), or the pair of commands
.ED .ED
in \fIsh\fP, \fIksh\fP, or \fIbash\fP. in \fIsh\fP, \fIksh\fP, or \fIbash\fP.
.pg .pg
The NETHACKOPTIONS value is effectively the same as a single OPTIONS
statement in a configuration file.
The \(lqOPTIONS=\(rq prefix is implied and comma separated options are
processed from right to left.
Other types of configuration statements such as BIND or MSGTYPE are
not allowed.
.pg
Instead of a comma-separated list of options, Instead of a comma-separated list of options,
NETHACKOPTIONS can be set to the full name of a configuration file you NETHACKOPTIONS can be set to the full name of a configuration file you
want to use. want to use.
@@ -4945,7 +4952,7 @@ and in days past, devnull.net (gone for now, but not forgotten).
.pg .pg
From time to time, some depraved individual out there in netland sends a From time to time, some depraved individual out there in netland sends a
particularly intriguing modification to help out with the game. The NetHack particularly intriguing modification to help out with the game. The NetHack
Develpment Team sometimes makes note of the names of the worst of these Development Team sometimes makes note of the names of the worst of these
miscreants in this, the list of Dungeoneers: miscreants in this, the list of Dungeoneers:
. .
.TS S .TS S

View File

@@ -2885,7 +2885,8 @@ Prefix a boolean option with `no' or `!' to turn it off.
For compound options, the option name and value are separated by a colon. For compound options, the option name and value are separated by a colon.
Some options are persistent, and apply only to new games. Some options are persistent, and apply only to new games.
You can specify multiple OPTIONS statements, and multiple options You can specify multiple OPTIONS statements, and multiple options
in a single OPTIONS statement. separated by commas in a single OPTIONS statement.
(Comma separated options are processed from right to left.)
%.pg %.pg
Example: Example:
@@ -3075,6 +3076,14 @@ to that shell), or the pair of commands
\nd in {\it sh}, {\it ksh}, or {\it bash}. \nd in {\it sh}, {\it ksh}, or {\it bash}.
%.pg
The NETHACKOPTIONS value is effectively the same as a single OPTIONS
statement in a configuration file.
The ``OPTIONS='' prefix is implied and comma separated options are
processed from right to left.
Other types of configuration statements such as BIND or MSGTYPE are
not allowed.
%.pg %.pg
Instead of a comma-separated list of options, Instead of a comma-separated list of options,
NETHACKOPTIONS can be set to the full name of a configuration file you NETHACKOPTIONS can be set to the full name of a configuration file you

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.255 $ $NHDT-Date: 1549849509 2019/02/11 01:45:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.257 $ $NHDT-Date: 1550014802 2019/02/12 23:40:02 $
This fixes36.2 file is here to capture information about updates in the 3.6.x This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however, lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -427,6 +427,9 @@ when engulfed while in a shop, dropping an item into the engulfer and then
using ':' to look at current location could cause a crash using ':' to look at current location could cause a crash
when items were on the floor just inside a shop's door where the shopkeeper when items were on the floor just inside a shop's door where the shopkeeper
doesn't buy and sell stuff, those items showed a 'for sale' price doesn't buy and sell stuff, those items showed a 'for sale' price
after 'when donning armor, enchanment becomes known even if interrupted' fix,
wearing a leather jacket, fedora, or dented pot (no multi-turn delay
worn in a slot which usually has one) didn't make +/- become known
having an artifact wish be refused ("for a moment you feel <artifact> in having an artifact wish be refused ("for a moment you feel <artifact> in
your hands, but it disappears") would immediately segfault your hands, but it disappears") would immediately segfault
tty: turn off an optimization that is the suspected cause of Windows reported tty: turn off an optimization that is the suspected cause of Windows reported
@@ -458,6 +461,37 @@ move 'perm_invent' value from flags to iflags to keep it out of save files;
always define shell and suspend commands so that key bindings copied from one always define shell and suspend commands so that key bindings copied from one
platform to another work even if second one disables those commands platform to another work even if second one disables those commands
amiga: fix missing line continuation characters in Makefile amiga: fix missing line continuation characters in Makefile
MacOSX: add curses window port
MacOSX: add Xcode project to sys/unixNetHack.xcodeproj
MacOSX: add Xcode supporting files README.xcode and XCode.xcconfig
containing important build info
Qt: add Qt5 specific hints file for linux and Mac OS X (Ray Chason)
Qt: enable compiling Qt5 on Windows (Ray Chason)
Qt: entering extended commands, hide non-matching ones
Qt: remember tile and font size
tty: significant optimizations for performance and per field rendering
tty: use WC2_FLUSH_STATUS to buffer changes until BL_FLUSH is received
tty: support BL_RESET in status_update to force an update to all status fields
tty: stop hitpointbar from jumping to 100% health at zero hit points
tty: try harder to prevent a disconnected terminal (SIGHUP) from running amok
and using up all available CPU time
tty: suppress intermediate 'Count: 123' prompt and getpos autodescribe
feedback from being included in ^P message recall
tty: ^P feedback with msg_window:full/combination/reverse containing output
from dolook/whatis could show strange characters for DECgraphics
unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make'
extension when using $(VERBOSEMAKE) to reduce build-time feedback;
replace with $(QUIETCC) which operates the same but defaults to
verbose so doesn't use '$<' for multi-prerequisite targets unless
specifically requested; use 'make QUIETCC=1 <target>' to get the
3.6.1 behavior back
unix: add curses window port
vms: data file processing and playground setup were missing post-3.4.3 files
engrave, epitaph, and bogusmon made from corresponding *.txt
windows: Added ntassert() mechanism for Windows based port use
windows: heed OPTIONS=symset:default in config file if it is present
windows: add curses window port which can co-exist with tty in exe and be
selectable in user config file via OPTIONS=windowtype:curses
windows-gui: In nethackw, there could be conflicts between menu accelerators windows-gui: In nethackw, there could be conflicts between menu accelerators
and an extra choice accelerator to fix H7132. and an extra choice accelerator to fix H7132.
windows-gui: recognize new BL_RESET in status_update; no change in behavior yet windows-gui: recognize new BL_RESET in status_update; no change in behavior yet
@@ -487,37 +521,6 @@ windows-tty: add support for mouse_support:0 (disabled), mouse_support:1
(fully-functional including disabling QuickEdit on Windows console (fully-functional including disabling QuickEdit on Windows console
because QuickEdit intercepts the mouse clicks so NetHack never sees because QuickEdit intercepts the mouse clicks so NetHack never sees
them), or mouse_support:2 (NetHack support on but QuickEdit left as is) them), or mouse_support:2 (NetHack support on but QuickEdit left as is)
windows: Added ntassert() mechanism for Windows based port use
windows: heed OPTIONS=symset:default in config file if it is present
windows: add curses window port which can co-exist with tty in exe and be
selectable in user config file via OPTIONS=windowtype:curses
tty: significant optimizations for performance and per field rendering
tty: use WC2_FLUSH_STATUS to buffer changes until BL_FLUSH is received
tty: support BL_RESET in status_update to force an update to all status fields
tty: stop hitpointbar from jumping to 100% health at zero hit points
tty: try harder to prevent a disconnected terminal (SIGHUP) from running amok
and using up all available CPU time
tty: suppress intermediate 'Count: 123' prompt and getpos autodescribe
feedback from being included in ^P message recall
tty: ^P feedback with msg_window:full/combination/reverse containing output
from dolook/whatis could show strange characters for DECgraphics
MacOSX: add curses window port
MacOSX: add Xcode project to sys/unixNetHack.xcodeproj
MacOSX: add Xcode supporting files README.xcode and XCode.xcconfig
containing important build info
unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make'
extension when using $(VERBOSEMAKE) to reduce build-time feedback;
replace with $(QUIETCC) which operates the same but defaults to
verbose so doesn't use '$<' for multi-prerequisite targets unless
specifically requested; use 'make QUIETCC=1 <target>' to get the
3.6.1 behavior back
unix: add curses window port
vms: data file processing and playground setup were missing post-3.4.3 files
engrave, epitaph, and bogusmon made from corresponding *.txt
Qt: add Qt5 specific hints file for linux and Mac OS X (Ray Chason)
Qt: enable compiling Qt5 on Windows (Ray Chason)
Qt: entering extended commands, hide non-matching ones
Qt: remember tile and font size
X11: implement menucolors and allow menus to obey some attributes X11: implement menucolors and allow menus to obey some attributes
X11: make key translations work with menus on Linux X11: make key translations work with menus on Linux
X11: allow mouse wheel scrolling to work in menus by default X11: allow mouse wheel scrolling to work in menus by default

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1549157811 2019/02/03 01:36:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.692 $ */ /* NetHack 3.6 extern.h $NHDT-Date: 1549921169 2019/02/11 21:39:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.693 $ */
/* Copyright (c) Steve Creps, 1988. */ /* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -2222,7 +2222,7 @@ E void FDECL(make_happy_shoppers, (BOOLEAN_P));
E void FDECL(hot_pursuit, (struct monst *)); E void FDECL(hot_pursuit, (struct monst *));
E void FDECL(make_angry_shk, (struct monst *, XCHAR_P, XCHAR_P)); E void FDECL(make_angry_shk, (struct monst *, XCHAR_P, XCHAR_P));
E int NDECL(dopay); E int NDECL(dopay);
E boolean FDECL(paybill, (int)); E boolean FDECL(paybill, (int, BOOLEAN_P));
E void NDECL(finish_paybill); E void NDECL(finish_paybill);
E struct obj *FDECL(find_oid, (unsigned)); E struct obj *FDECL(find_oid, (unsigned));
E long FDECL(contained_cost, E long FDECL(contained_cost,
@@ -2592,7 +2592,7 @@ E char FDECL(vault_occupied, (char *));
E void FDECL(uleftvault, (struct monst *)); E void FDECL(uleftvault, (struct monst *));
E void NDECL(invault); E void NDECL(invault);
E int FDECL(gd_move, (struct monst *)); E int FDECL(gd_move, (struct monst *));
E void NDECL(paygd); E void FDECL(paygd, (BOOLEAN_P));
E long NDECL(hidden_gold); E long NDECL(hidden_gold);
E boolean NDECL(gd_sound); E boolean NDECL(gd_sound);
E void FDECL(vault_gd_watching, (unsigned int)); E void FDECL(vault_gd_watching, (unsigned int));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 do_wear.c $NHDT-Date: 1549758452 2019/02/10 00:27:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.106 $ */ /* NetHack 3.6 do_wear.c $NHDT-Date: 1550014802 2019/02/12 23:40:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.107 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1928,26 +1928,31 @@ struct obj *obj;
obj->known = 1; obj->known = 1;
*/ */
setworn(obj, mask); setworn(obj, mask);
/* if there's no delay, we'll execute 'aftermv' immediately */
if (obj == uarm)
afternmv = Armor_on;
else if (obj == uarmh)
afternmv = Helmet_on;
else if (obj == uarmg)
afternmv = Gloves_on;
else if (obj == uarmf)
afternmv = Boots_on;
else if (obj == uarms)
afternmv = Shield_on;
else if (obj == uarmc)
afternmv = Cloak_on;
else if (obj == uarmu)
afternmv = Shirt_on;
else
panic("wearing armor not worn as armor? [%08lx]", obj->owornmask);
delay = -objects[obj->otyp].oc_delay; delay = -objects[obj->otyp].oc_delay;
if (delay) { if (delay) {
nomul(delay); nomul(delay);
multi_reason = "dressing up"; multi_reason = "dressing up";
if (is_boots(obj))
afternmv = Boots_on;
if (is_helmet(obj))
afternmv = Helmet_on;
if (is_gloves(obj))
afternmv = Gloves_on;
if (obj == uarm)
afternmv = Armor_on;
nomovemsg = "You finish your dressing maneuver."; nomovemsg = "You finish your dressing maneuver.";
} else { } else {
if (is_cloak(obj)) unmul(""); /* call (*aftermv)(), clear it+nomovemsg+multi_reason */
(void) Cloak_on();
if (is_shield(obj))
(void) Shield_on();
if (is_shirt(obj))
(void) Shirt_on();
on_msg(obj); on_msg(obj);
} }
context.takeoff.mask = context.takeoff.what = 0L; context.takeoff.mask = context.takeoff.what = 0L;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 end.c $NHDT-Date: 1545786454 2018/12/26 01:07:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.162 $ */ /* NetHack 3.6 end.c $NHDT-Date: 1549921169 2019/02/11 21:39:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.163 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1149,6 +1149,10 @@ int how;
program_state.gameover = 1; program_state.gameover = 1;
/* in case of a subsequent panic(), there's no point trying to save */ /* in case of a subsequent panic(), there's no point trying to save */
program_state.something_worth_saving = 0; program_state.something_worth_saving = 0;
#ifdef HANGUPHANDLING
if (program_state.done_hup)
done_stopprint++;
#endif
/* render vision subsystem inoperative */ /* render vision subsystem inoperative */
iflags.vision_inited = 0; iflags.vision_inited = 0;
@@ -1173,8 +1177,8 @@ int how;
* On those rare occasions you get hosed immediately, go out * On those rare occasions you get hosed immediately, go out
* smiling... :-) -3. * smiling... :-) -3.
*/ */
if (moves <= 1 && how < PANICKED) /* You die... --More-- */ if (moves <= 1 && how < PANICKED && !done_stopprint)
pline("Do not pass go. Do not collect 200 %s.", currency(200L)); pline("Do not pass Go. Do not collect 200 %s.", currency(200L));
if (have_windows) if (have_windows)
wait_synch(); /* flush screen output */ wait_synch(); /* flush screen output */
@@ -1220,9 +1224,11 @@ int how;
fixup_death(how); /* actually, fixup multi_reason */ fixup_death(how); /* actually, fixup multi_reason */
if (how != PANICKED) { if (how != PANICKED) {
boolean silently = done_stopprint ? TRUE : FALSE;
/* these affect score and/or bones, but avoid them during panic */ /* these affect score and/or bones, but avoid them during panic */
taken = paybill((how == ESCAPED) ? -1 : (how != QUIT)); taken = paybill((how == ESCAPED) ? -1 : (how != QUIT), silently);
paygd(); paygd(silently);
clearpriests(); clearpriests();
} else } else
taken = FALSE; /* lint; assert( !bones_ok ); */ taken = FALSE; /* lint; assert( !bones_ok ); */
@@ -1329,7 +1335,7 @@ int how;
} }
} }
if (u.ugrave_arise >= LOW_PM) { if (u.ugrave_arise >= LOW_PM && !done_stopprint) {
/* give this feedback even if bones aren't going to be created, /* give this feedback even if bones aren't going to be created,
so that its presence or absence doesn't tip off the player to so that its presence or absence doesn't tip off the player to
new bones or their lack; it might be a lie if makemon fails */ new bones or their lack; it might be a lie if makemon fails */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 shk.c $NHDT-Date: 1549849510 2019/02/11 01:45:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.155 $ */ /* NetHack 3.6 shk.c $NHDT-Date: 1549921170 2019/02/11 21:39:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.156 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -56,7 +56,7 @@ STATIC_DCL long FDECL(getprice, (struct obj *, BOOLEAN_P));
STATIC_DCL void FDECL(shk_names_obj, (struct monst *, struct obj *, STATIC_DCL void FDECL(shk_names_obj, (struct monst *, struct obj *,
const char *, long, const char *)); const char *, long, const char *));
STATIC_DCL struct obj *FDECL(bp_to_obj, (struct bill_x *)); STATIC_DCL struct obj *FDECL(bp_to_obj, (struct bill_x *));
STATIC_DCL boolean FDECL(inherits, (struct monst *, int, int)); STATIC_DCL boolean FDECL(inherits, (struct monst *, int, int, BOOLEAN_P));
STATIC_DCL void FDECL(set_repo_loc, (struct monst *)); STATIC_DCL void FDECL(set_repo_loc, (struct monst *));
STATIC_DCL boolean NDECL(angry_shk_exists); STATIC_DCL boolean NDECL(angry_shk_exists);
STATIC_DCL void FDECL(rile_shk, (struct monst *)); STATIC_DCL void FDECL(rile_shk, (struct monst *));
@@ -1686,8 +1686,9 @@ static struct repo { /* repossession context */
/* routine called after dying (or quitting) */ /* routine called after dying (or quitting) */
boolean boolean
paybill(croaked) paybill(croaked, silently)
int croaked; /* -1: escaped dungeon; 0: quit; 1: died */ int croaked; /* -1: escaped dungeon; 0: quit; 1: died */
boolean silently; /* maybe avoid messages */
{ {
struct monst *mtmp, *mtmp2, *firstshk, *resident, *creditor, *hostile, struct monst *mtmp, *mtmp2, *firstshk, *resident, *creditor, *hostile,
*localshk; *localshk;
@@ -1752,7 +1753,7 @@ int croaked; /* -1: escaped dungeon; 0: quit; 1: died */
: localshk; : localshk;
if (firstshk) { if (firstshk) {
numsk++; numsk++;
taken = inherits(firstshk, numsk, croaked); taken = inherits(firstshk, numsk, croaked, silently);
} }
/* now handle the rest */ /* now handle the rest */
@@ -1763,7 +1764,7 @@ int croaked; /* -1: escaped dungeon; 0: quit; 1: died */
local = on_level(&eshkp->shoplevel, &u.uz); local = on_level(&eshkp->shoplevel, &u.uz);
if (mtmp != firstshk) { if (mtmp != firstshk) {
numsk++; numsk++;
taken |= inherits(mtmp, numsk, croaked); taken |= inherits(mtmp, numsk, croaked, silently);
} }
/* for bones: we don't want a shopless shk around */ /* for bones: we don't want a shopless shk around */
if (!local) if (!local)
@@ -1773,23 +1774,20 @@ int croaked; /* -1: escaped dungeon; 0: quit; 1: died */
} }
STATIC_OVL boolean STATIC_OVL boolean
inherits(shkp, numsk, croaked) inherits(shkp, numsk, croaked, silently)
struct monst *shkp; struct monst *shkp;
int numsk; int numsk;
int croaked; int croaked;
boolean silently;
{ {
long loss = 0L; long loss = 0L;
long umoney; long umoney;
struct eshk *eshkp = ESHK(shkp); struct eshk *eshkp = ESHK(shkp);
boolean take = FALSE, taken = FALSE, verbose; boolean take = FALSE, taken = FALSE;
unsigned save_minvis = shkp->minvis; unsigned save_minvis = shkp->minvis;
int roomno = *u.ushops; int roomno = *u.ushops;
char takes[BUFSZ]; char takes[BUFSZ];
verbose = !program_state.stopprint;
#ifdef HANGUPHANDLING
verbose &= !program_state.done_hup;
#endif
/* not strictly consistent; affects messages and prevents next player /* not strictly consistent; affects messages and prevents next player
(if bones are saved) from blundering into or being ambused by an (if bones are saved) from blundering into or being ambused by an
invisible shopkeeper */ invisible shopkeeper */
@@ -1797,7 +1795,7 @@ int croaked;
/* The simplifying principle is that first-come /* The simplifying principle is that first-come
already took everything you had. */ already took everything you had. */
if (numsk > 1) { if (numsk > 1) {
if (verbose && cansee(shkp->mx, shkp->my) && croaked) { if (cansee(shkp->mx, shkp->my) && croaked && !silently) {
takes[0] = '\0'; takes[0] = '\0';
if (has_head(shkp->data) && !rn2(2)) if (has_head(shkp->data) && !rn2(2))
Sprintf(takes, ", shakes %s %s,", noit_mhis(shkp), Sprintf(takes, ", shakes %s %s,", noit_mhis(shkp),
@@ -1817,7 +1815,7 @@ int croaked;
&& !eshkp->robbed && !eshkp->debit && NOTANGRY(shkp) && !eshkp->robbed && !eshkp->debit && NOTANGRY(shkp)
&& !eshkp->following && u.ugrave_arise < LOW_PM) { && !eshkp->following && u.ugrave_arise < LOW_PM) {
taken = (invent != 0); taken = (invent != 0);
if (taken && verbose) if (taken && !silently)
pline("%s gratefully inherits all your possessions.", pline("%s gratefully inherits all your possessions.",
Shknam(shkp)); Shknam(shkp));
set_repo_loc(shkp); set_repo_loc(shkp);
@@ -1851,7 +1849,7 @@ int croaked;
money2mon(shkp, umoney); money2mon(shkp, umoney);
context.botl = 1; context.botl = 1;
} }
if (verbose) if (!silently)
pline("%s %s all your possessions.", Shknam(shkp), takes); pline("%s %s all your possessions.", Shknam(shkp), takes);
taken = TRUE; taken = TRUE;
/* where to put player's invent (after disclosure) */ /* where to put player's invent (after disclosure) */
@@ -1859,7 +1857,7 @@ int croaked;
} else { } else {
money2mon(shkp, loss); money2mon(shkp, loss);
context.botl = 1; context.botl = 1;
if (verbose) if (!silently)
pline("%s %s the %ld %s %sowed %s.", Shknam(shkp), pline("%s %s the %ld %s %sowed %s.", Shknam(shkp),
takes, loss, currency(loss), takes, loss, currency(loss),
strncmp(eshkp->customer, plname, PL_NSIZ) ? "" : "you ", strncmp(eshkp->customer, plname, PL_NSIZ) ? "" : "you ",

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 vault.c $NHDT-Date: 1549849513 2019/02/11 01:45:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.61 $ */ /* NetHack 3.6 vault.c $NHDT-Date: 1549921171 2019/02/11 21:39:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.62 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -49,7 +49,8 @@ boolean forceshow;
{ {
register int fcx, fcy, fcbeg; register int fcx, fcy, fcbeg;
struct monst *mtmp; struct monst *mtmp;
boolean sawcorridor = FALSE; boolean sawcorridor = FALSE,
silently = program_state.stopprint ? TRUE : FALSE;
struct egd *egrd = EGD(grd); struct egd *egrd = EGD(grd);
struct trap *trap; struct trap *trap;
struct rm *lev; struct rm *lev;
@@ -101,11 +102,13 @@ boolean forceshow;
vision_full_recalc = 1; vision_full_recalc = 1;
egrd->fcbeg++; egrd->fcbeg++;
} }
if (sawcorridor) if (sawcorridor && !silently)
pline_The("corridor disappears."); pline_The("corridor disappears.");
/* only give encased message if hero is still alive (might get here /* only give encased message if hero is still alive (might get here
via paygd() when game is over; died: no message, quit: message) */ via paygd() -> mongone() -> grddead() when game is over;
if (IS_ROCK(levl[u.ux][u.uy].typ) && (Upolyd ? u.mh : u.uhp) > 0) died: no message, quit: message) */
if (IS_ROCK(levl[u.ux][u.uy].typ) && (Upolyd ? u.mh : u.uhp) > 0
&& !silently)
You("are encased in rock."); You("are encased in rock.");
return TRUE; return TRUE;
} }
@@ -1061,35 +1064,30 @@ register struct monst *grd;
/* Routine when dying or quitting with a vault guard around */ /* Routine when dying or quitting with a vault guard around */
void void
paygd() paygd(silently)
boolean silently;
{ {
register struct monst *grd = findgd(); register struct monst *grd = findgd();
long umoney = money_cnt(invent); long umoney = money_cnt(invent);
struct obj *coins, *nextcoins; struct obj *coins, *nextcoins;
int gx, gy; int gx, gy;
char buf[BUFSZ]; char buf[BUFSZ];
boolean verbose;
if (!umoney || !grd) if (!umoney || !grd)
return; return;
verbose = !program_state.stopprint;
#ifdef HANGUPHANDLING
verbose &= !program_state.done_hup;
#endif
if (u.uinvault) { if (u.uinvault) {
if (verbose) if (!silently)
Your("%ld %s goes into the Magic Memory Vault.", Your("%ld %s goes into the Magic Memory Vault.",
umoney, currency(umoney)); umoney, currency(umoney));
gx = u.ux; gx = u.ux;
gy = u.uy; gy = u.uy;
} else { } else {
if (grd->mpeaceful) { /* guard has no "right" to your gold */ if (grd->mpeaceful) /* peaceful guard has no "right" to your gold */
mongone(grd); goto remove_guard;
return;
}
mnexto(grd); mnexto(grd);
if (verbose) if (!silently)
pline("%s remits your gold to the vault.", Monnam(grd)); pline("%s remits your gold to the vault.", Monnam(grd));
gx = rooms[EGD(grd)->vroom].lx + rn2(2); gx = rooms[EGD(grd)->vroom].lx + rn2(2);
gy = rooms[EGD(grd)->vroom].ly + rn2(2); gy = rooms[EGD(grd)->vroom].ly + rn2(2);
@@ -1105,7 +1103,9 @@ paygd()
stackobj(coins); stackobj(coins);
} }
} }
remove_guard:
mongone(grd); mongone(grd);
return;
} }
long long

View File

@@ -1577,7 +1577,7 @@ static const char *build_opts[] = {
#ifdef USE_ISAAC64 #ifdef USE_ISAAC64
"pseudo random numbers generated by ISAAC64", "pseudo random numbers generated by ISAAC64",
#ifdef DEV_RANDOM #ifdef DEV_RANDOM
#ifdef __STDC__ #ifdef NHSTDC
/* include which specific one */ /* include which specific one */
"strong PRNG seed available from " DEV_RANDOM, "strong PRNG seed available from " DEV_RANDOM,
#else #else