]> granicus.if.org Git - nethack/commitdiff
fix "spellbook of novel" on discoveries list
authorPatR <rankin@nethack.org>
Sun, 20 Dec 2015 04:07:51 +0000 (20:07 -0800)
committerPatR <rankin@nethack.org>
Sun, 20 Dec 2015 04:07:51 +0000 (20:07 -0800)
Avoid "spellbook of novel" after novel becomes discovered.  Now it will
just be "novel".  Prior to discovery, it might be on the list as "book
called whatever" if the player assigns a type name.

Also, make novel become discovered after reading one instead of only via
object identification.  It already shows up as "novel" in inventory, but
changing its definition to designate it as not-interesting-to-discover
feels disrespectful to the tribute.

doc/fixes36.1
src/objnam.c
src/spell.c

index 47feb85aaff11e046c6495d0abd90e378cd28a62..c49d68dcaac4fb9f7e9a7f87685121f3fc2688e2 100644 (file)
@@ -45,6 +45,8 @@ make MAXPLAYERS option in sysconf accept 0 value
 avoid hearing yelps when you are deaf
 make corpse visible if stethoscope told you about it being there
 sceptre of might database entry word change
+avoid "spellbook of novel" on discoveries list after object ID of novel
+add novel to discoveries list after reading one
 
 
 Platform- and/or Interface-Specific Fixes
index 4d368ec5a58bbe03bd7b38dae838d0f17ff7ddf7..449be70578025ec616dc9f04107a0328349477cd 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 objnam.c        $NHDT-Date: 1450306207 2015/12/16 22:50:07 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.158 $ */
+/* NetHack 3.6 objnam.c        $NHDT-Date: 1450584419 2015/12/20 04:06:59 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.159 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -120,7 +120,12 @@ register int otyp;
         Strcpy(buf, "wand");
         break;
     case SPBOOK_CLASS:
-        Strcpy(buf, "spellbook");
+        if (otyp != SPE_NOVEL) {
+            Strcpy(buf, "spellbook");
+        } else {
+            Strcpy(buf, !nn ? "book" : "novel");
+            nn = 0;
+        }
         break;
     case RING_CLASS:
         Strcpy(buf, "ring");
index 0ec696b3ebc24688f57c5ccce3c2a9f5dbdfd981..4369192766fb2785bfb981c2a28e9f69c6299d6e 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 spell.c $NHDT-Date: 1450306224 2015/12/16 22:50:24 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.74 $ */
+/* NetHack 3.6 spell.c $NHDT-Date: 1450584420 2015/12/20 04:07:00 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.75 $ */
 /*      Copyright (c) M. Stephenson 1988                          */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -474,6 +474,7 @@ register struct obj *spellbook;
                              spellbook->o_id)) {
                 u.uconduct.literate++;
                 check_unpaid(spellbook);
+                makeknown(booktype);
                 if (!u.uevent.read_tribute) {
                     /* give bonus of 20 xp and 4*20+0 pts */
                     more_experienced(20, 0);