fix B16003 - Oracle only renamable named unique monster

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.
This commit is contained in:
nethack.rankin
2003-01-15 08:59:04 +00:00
parent 1b6794d246
commit 9ba2632a29
2 changed files with 12 additions and 7 deletions

View 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

View 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;
}