fix #H5486 - artifact naming vs illiterate
authorPatR <rankin@nethack.org>
Mon, 22 May 2017 23:02:50 +0000 (16:02 -0700)
committerPatR <rankin@nethack.org>
Mon, 22 May 2017 23:02:50 +0000 (16:02 -0700)
Attempting to name the relevant type of item with an artifact's name
(such as a runesword with "Stormbringer") fails with "your hand
slips" in order to prevent turning the item into an aritfact.  Since
that only happens when the name is valid, it indicates that the hero
is literate so violate illiterate conduct.

(Naming items in general doesn't affect [il]literacy so that player
can assign names to inventory or stash items to maintain notes.)

doc/fixes36.1
src/do_name.c

index 0c8a42b91ee310f2407c50efb43b32a7c13b9988..f8139b1ae16a7fabd77b636217b6bff57c08c918 100644 (file)
@@ -427,6 +427,8 @@ when configured with DUMPLOG enabled, artifacts were counted twice towards
 once Moloch's Sanctum (or Astral Plane via wizard mode level teleport direct
        to end-game) was entered, end of game disclosure would reveal that
        high priests had been incorrectly flagged as extinct
+attempting to name an item as an artifact and failing via hand slip violates
+       illiterate conduct
 
 
 Platform- and/or Interface-Specific Fixes
index 34a85315931afc66040f21baea80ee26da1c513c..aa8bdf1e97c40f5f6699252efb44088292ddf409 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 do_name.c       $NHDT-Date: 1489494376 2017/03/14 12:26:16 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.116 $ */
+/* NetHack 3.6 do_name.c       $NHDT-Date: 1495494156 2017/05/22 23:02:36 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.118 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1081,6 +1081,9 @@ register struct obj *obj;
         pline("While engraving, your %s slips.", body_part(HAND));
         display_nhwindow(WIN_MESSAGE, FALSE);
         You("engrave: \"%s\".", buf);
+        /* violate illiteracy conduct since hero attempted to write
+           a valid artifact name */
+        u.uconduct.literate++;
     }
     ++via_naming; /* This ought to be an argument rather than a static... */
     obj = oname(obj, buf);