From: PatR Date: Sat, 12 Dec 2015 09:55:44 +0000 (-0800) Subject: naming artifacts vs illiteracy X-Git-Tag: NetHack-3.7.0_WIP~787^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2219a6a66770133d0a95ac267b97127188e077ea;p=nethack naming artifacts vs illiteracy 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. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index b5705cff7..ed314e2dd 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/do_name.c b/src/do_name.c index 2e2dfd193..2592d7036 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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();