]> granicus.if.org Git - nethack/commitdiff
naming artifacts vs illiteracy
authorPatR <rankin@nethack.org>
Sat, 12 Dec 2015 09:55:44 +0000 (01:55 -0800)
committerPatR <rankin@nethack.org>
Sat, 12 Dec 2015 09:55:44 +0000 (01:55 -0800)
Requested by a beta tester back in June:  naming Sting or Orcrist
violates illiterate conduct.  I left it at that; any object naming
could be construed as being literate, but I don't think breaking
conduct for doing such would be a good idea.

doc/fixes36.1
src/do_name.c

index b5705cff7dfaf0f8b83e7448f77b040ee2aeee30..ed314e2dd3684bf5a639f80abf656638a1043640 100644 (file)
@@ -31,6 +31,7 @@ X11: core bug for '`' (backtick) command was only noticed by X11 interface,
 
 General New Features
 --------------------
+naming Sting or Orcrist now breaks illiterate conduct
 
 
 Platform- and/or Interface-Specific New Features
index 2e2dfd193d3fe2c4ffa539f228dbddd785ef24c9..2592d70368815e20094187f0e879134f5acf0c3c 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 do_name.c       $NHDT-Date: 1446808440 2015/11/06 11:14:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.77 $ */
+/* NetHack 3.6 do_name.c       $NHDT-Date: 1449914085 2015/12/12 09:54:45 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.78 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -504,6 +504,16 @@ register struct obj *obj;
     /* strip leading and trailing spaces; unnames item if all spaces */
     (void) mungspaces(buf);
 
+    /*
+     * We don't violate illiteracy conduct here, although it is
+     * arguable that we should for anything other than "X".  Doing so
+     * would make attaching player's notes to hero's inventory have an
+     * in-game effect, which may or may not be the correct thing to do.
+     *
+     * We do violate illiteracy in oname() if player creates Sting or
+     * Orcrist, clearly being literate (no pun intended...).
+     */
+
     /* relax restrictions over proper capitalization for artifacts */
     if ((aname = artifact_name(buf, &objtyp)) != 0 && objtyp == obj->otyp)
         Strcpy(buf, aname);
@@ -573,6 +583,8 @@ const char *name;
         /* if obj is owned by a shop, increase your bill */
         if (obj->unpaid)
             alter_cost(obj, 0L);
+        /* violate illiteracy conduct since successfully wrote arti-name */
+        u.uconduct.literate++;
     }
     if (carried(obj))
         update_inventory();