]> granicus.if.org Git - nethack/commitdiff
fix B16003 - Oracle only renamable named unique monster
authornethack.rankin <nethack.rankin>
Wed, 15 Jan 2003 08:59:04 +0000 (08:59 +0000)
committernethack.rankin <nethack.rankin>
Wed, 15 Jan 2003 08:59:04 +0000 (08:59 +0000)
     This makes all unique monsters resist being given a name.  Aside
from the Oracle, the four high priests are the only monsters affected
that weren't already being covered by the old tests.  They might as well
decline to receive names too.

     This also fixes a longstanding quirk that prevented you from
calling a type of object something if the representative sample of it
had been picked up while blind and you hadn't explicitly examined your
inventory since regaining sight.  There's not much point in requiring
an extra 'i' command or use of '?' or '*' at the "what do you want to
call?" prompt, particularly since that makes gameplay be slightly
different depending on whether perm_invent is available and in use.

doc/fixes34.1
src/do_name.c

index e3b572611e07ea45ea8ddd13f85d17f1da4377ce..4e3eb75032194a0df40553306b46f479fc38435a 100644 (file)
@@ -360,6 +360,8 @@ ensure `m'enu is still an available traditional menu choice for
        menu-upon-request even when there is only one class of object present
 engraving on headstone will appropriately dull your weapon
 certain types of golems should not "catch fire" so adjust the messages
+no longer need to manually examine inventory after regaining sight in order
+       to give a type name to an object picked up while blind
 
 
 Platform- and/or Interface-Specific Fixes
index 1c5578385c651b4d1d6c5b567d23e02ef5208054..9c6ded0e4717a0a4016314676ef4d355227dee1c 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)do_name.c  3.4     2002/09/19      */
+/*     SCCS Id: @(#)do_name.c  3.4     2003/01/14      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -275,11 +275,10 @@ do_mname()
        /* strip leading and trailing spaces; unnames monster if all spaces */
        (void)mungspaces(buf);
 
-       if (mtmp->iswiz || type_is_pname(mtmp->data) ||
-           mtmp->data->msound == MS_LEADER ||
-           mtmp->data->msound == MS_NEMESIS)
+       if (mtmp->data->geno & G_UNIQ)
            pline("%s doesn't like being called names!", Monnam(mtmp));
-       else (void) christen_monst(mtmp, buf);
+       else
+           (void) christen_monst(mtmp, buf);
        return(0);
 }
 
@@ -471,6 +470,11 @@ ddocall()
 #endif
                obj = getobj(callable, "call");
                if (obj) {
+                       /* behave as if examining it in inventory;
+                          this might set dknown if it was picked up
+                          while blind and the hero can now see */
+                       (void) xname(obj);
+
                        if (!obj->dknown) {
                                You("would never recognize another one.");
                                return 0;
@@ -719,8 +723,7 @@ boolean called;
                article = ARTICLE_THE;
            else
                article = ARTICLE_NONE;
-       } else if ((mons[monsndx(mdat)].geno & G_UNIQ) &&
-                  article == ARTICLE_A) {
+       } else if ((mdat->geno & G_UNIQ) && article == ARTICLE_A) {
            article = ARTICLE_THE;
        }