]> granicus.if.org Git - nethack/commitdiff
no renaming of unique monsters with proper names
authorcohrs <cohrs>
Thu, 12 Dec 2002 02:41:05 +0000 (02:41 +0000)
committercohrs <cohrs>
Thu, 12 Dec 2002 02:41:05 +0000 (02:41 +0000)
Not all leaders and nemeses have M2_PNAME set, so they require an extra
check to result in the expected behavior.

doc/fixes34.1
src/do_name.c

index cee6318db3200978039151de1574a00fe2a6f25a..4fa5c743d2ae179c3eaa5613bf4abaa811c237c3 100644 (file)
@@ -324,6 +324,7 @@ mimics that are detected but not seen should not display as their mimiced
        form when the detection ends
 not all cavemen are human, so avoid using human in quest messages
 tengu is singular and plural, some rumors were incorrect
+don't let leader or nemesis be renamed
 
 
 Platform- and/or Interface-Specific Fixes
index a3b51ed09f2ae0f7618663298dd28b27942db759..1c5578385c651b4d1d6c5b567d23e02ef5208054 100644 (file)
@@ -275,7 +275,9 @@ do_mname()
        /* strip leading and trailing spaces; unnames monster if all spaces */
        (void)mungspaces(buf);
 
-       if (mtmp->iswiz || type_is_pname(mtmp->data))
+       if (mtmp->iswiz || type_is_pname(mtmp->data) ||
+           mtmp->data->msound == MS_LEADER ||
+           mtmp->data->msound == MS_NEMESIS)
            pline("%s doesn't like being called names!", Monnam(mtmp));
        else (void) christen_monst(mtmp, buf);
        return(0);