diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index e3d797e43..77f6a44d0 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.838 $ $NHDT-Date: 1646694720 2022/03/07 23:12:00 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.839 $ $NHDT-Date: 1646953027 2022/03/10 22:57:07 $ General Fixes and Modified Features ----------------------------------- @@ -834,6 +834,9 @@ clear obj->bypass for buried objects [a giant on ice triggers a fire trap, rest of giant's dropped inventory, subsequent sanity checks report that there are buried objects which are 'flagged bypass'] only give Sunsword or Demonbane as starting gear to lawful Angels +for #knownclass with menustyle=Tradtional, allow player to ask for `a even if + no artifacts have been discovered yet, same as `; + likewise for `u to ask to see unique items Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/o_init.c b/src/o_init.c index 6ad5fe0d0..e02b2be9d 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 o_init.c $NHDT-Date: 1614812489 2021/03/03 23:01:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.50 $ */ +/* NetHack 3.7 o_init.c $NHDT-Date: 1646953028 2022/03/10 22:57:08 $ $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. */ @@ -833,11 +833,14 @@ doclassdisco(void) /* have player choose a class */ c = '\0'; /* class not chosen yet */ if (traditional) { + char allclasses_plustwo[sizeof allclasses + 2]; + /* we'll prompt even if there's only one viable class; we add all nonviable classes as unseen acceptable choices so player can ask for discoveries of any class whether it has discoveries or not */ - for (s = allclasses, xtras = 0; *s; ++s) { - c = def_oc_syms[(int) *s].sym; + Sprintf(allclasses_plustwo, "%s%c%c", allclasses, 'u', 'a'); + for (s = allclasses_plustwo, xtras = 0; *s; ++s) { + c = (*s == 'u' || *s == 'a') ? *s : def_oc_syms[(int) *s].sym; if (!index(discosyms, c)) { if (!xtras++) (void) strkitten(discosyms, '\033');