more artifact tracking

This should have been broken up into multiple pieces but they're
all lumped together.  I did ultimately throw away a fourth change.

Implement artiexist[].bones and artiexist[].rndm artifact creation
tracking bits that were added recently.  Doesn't need to increment
EDITLEVEL this time.

Add a new wizard mode feature:  if you use `a to show discovered
artifacts, it will prompt about whether to show the tracking bits
for all artifacts instead.  If not using menustyle traditional,
you need at least one artifact to have been discovered in order to
have 'a' choice available when selecting what class of discovered
objects to show for the '`' command.

artifact_gift(), aritfact_wish(), and so forth return a value that
none of the existing callers use, so cast their calls to (void).
This commit is contained in:
PatR
2022-03-11 11:00:44 -08:00
parent 0fab87500e
commit 7a335eb030
8 changed files with 87 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 o_init.c $NHDT-Date: 1646953028 2022/03/10 22:57:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.56 $ */
/* NetHack 3.7 o_init.c $NHDT-Date: 1646950588 2022/03/10 22:16:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.56 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -892,6 +892,15 @@ doclassdisco(void)
You(havent_discovered_any, unique_items);
break;
case 'a':
/* note: this will work all the time for menustyle traditional
but requires at least one artifact discovery for other styles
[could fix that by forcing the 'a' choice into the pick-class
menu when running in wizard mode] */
if (wizard && yn("Dump information about all artifacts?") == 'y') {
dump_artifact_info(tmpwin);
ct = NROFARTIFACTS; /* non-zero vs zero is what matters below */
break;
}
/* disp_artifact_discoveries() includes a header */
ct = disp_artifact_discoveries(tmpwin);
if (!ct)