From: PatR Date: Mon, 22 May 2017 23:02:50 +0000 (-0700) Subject: fix #H5486 - artifact naming vs illiterate X-Git-Tag: NetHack-3.6.1_RC01~490 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28fb9857577068c2f8b955e1a4b1f0400f4b246b;p=nethack fix #H5486 - artifact naming vs illiterate 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.) --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 0c8a42b91..f8139b1ae 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/do_name.c b/src/do_name.c index 34a853159..aa8bdf1e9 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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);