]> granicus.if.org Git - nethack/commitdiff
fix #H7354 - incorrect material
authorPatR <rankin@nethack.org>
Tue, 28 Aug 2018 02:13:54 +0000 (19:13 -0700)
committerPatR <rankin@nethack.org>
Tue, 28 Aug 2018 02:13:54 +0000 (19:13 -0700)
for parchment and vellum spellbooks.  Parchment and vellum are made
from animal skin rather than from plants, so classifying spellbooks
with those descriptions as paper is inaccurate.  Changing them to be
made out of leather has a couple of side-effects:  eating them while
polymorphed will break vegetarian conduct and polymorphing them might
result in a leather golem rather than a paper one.

I left "leathery spell book" as paper since that directly refers to
the cover.  The composition shouldn't be changed--the pages of such
a book are still made out of paper--but the effect of eating one
possibly should.  (That description originally was "leather" and got
changed.  I don't remember the details and assumed it was due to odd
wishing behavior, but there's a commented-out routine in eat.c which
suggests it was related to eating instead.  Anyway, "leathery" is
still non-leather.)

doc/fixes36.2
src/objects.c

index 94d8c1394b2b90ce2599de110658a3bd93c78446..92bbd1770644d45696afacddbf1333f4c7b14a8b 100644 (file)
@@ -96,6 +96,9 @@ object scattering during shop wall repair was skipped if a trap at the same
 augmented death reason for "while helpless" was broken for record and logfile
        (but still correct for xlogfile)
 prevent wish prompt input from remembering the previous wish
+parchment and vellum are made from animal skin so change material composition
+       and color for spellbooks with those descriptions from paper to leather;
+       eating those books now breaks vegetarian conduct
 
 
 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
index 3a8db8d9214b9488d6875e1daa698a8d23a60287..0809ff41afec4a7ef2b632985c07ccdee87dd379 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 objects.c       $NHDT-Date: 1447313395 2015/11/12 07:29:55 $  $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */
+/* NetHack 3.6 objects.c       $NHDT-Date: 1535422421 2018/08/28 02:13:41 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.51 $ */
 /* Copyright (c) Mike Threepoint, 1989.                           */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -883,18 +883,35 @@ SCROLL("blank paper", "unlabeled",  0,  28,  60),
 #undef SCROLL
 
 /* spellbooks ... */
-/* expanding beyond 52 spells would require changes in spellcasting
-   or imposition of a limit on number of spells hero can know because
-   they are currently assigned successive letters, a-zA-Z, when learned */
+    /* Expanding beyond 52 spells would require changes in spellcasting
+     * or imposition of a limit on number of spells hero can know because
+     * they are currently assigned successive letters, a-zA-Z, when learned.
+     * [The existing spell sorting capability could conceivably be extended
+     * to enable moving spells from beyond Z to within it, bumping others
+     * out in the process, allowing more than 52 spells be known but keeping
+     * only 52 be castable at any given time.]
+     */
 #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color)  \
     OBJECT(OBJ(name, desc),                                             \
            BITS(0, 0, 0, 0, mgc, 0, 0, 0, 0, 0, dir, sub, PAPER),       \
            0, SPBOOK_CLASS, prob, delay, 50, level * 100,               \
            0, 0, 0, level, 20, color)
+/* Spellbook description normally refers to book covers (primarily color).
+   Parchment and vellum would never be used for such, but rather than
+   eliminate those, finagle their definitions to refer to the pages
+   rather than the cover.  They are made from animal skin (typically of
+   a goat or sheep) and books using them for pages generally need heavy
+   covers with straps or clamps to tightly close the book in order to
+   keep the pages flat.  (However, a wooden cover might itself be covered
+   by a sheet of parchment, making this become less of an exception.  Also,
+   changing the internal composition from paper to leather makes eating a
+   parchment or vellum spellbook break vegetarian conduct, as it should.) */
+#define PAPER LEATHER /* override enum for use in SPELL() expansion */
 SPELL("dig",             "parchment",
-      P_MATTER_SPELL,      20,  6, 5, 1, RAY, HI_PAPER),
+      P_MATTER_SPELL,      20,  6, 5, 1, RAY, HI_LEATHER),
 SPELL("magic missile",   "vellum",
-      P_ATTACK_SPELL,      45,  2, 2, 1, RAY, HI_PAPER),
+      P_ATTACK_SPELL,      45,  2, 2, 1, RAY, HI_LEATHER),
+#undef PAPER /* revert to normal material */
 SPELL("fireball",        "ragged",
       P_ATTACK_SPELL,      20,  4, 4, 1, RAY, HI_PAPER),
 SPELL("cone of cold",    "dog eared",