]> granicus.if.org Git - nethack/commitdiff
Prevent ghosts from being renamed
authorPasi Kallinen <paxed@alt.org>
Sun, 18 Oct 2020 17:20:55 +0000 (20:20 +0300)
committerPasi Kallinen <paxed@alt.org>
Sun, 18 Oct 2020 17:28:32 +0000 (20:28 +0300)
(via xNetHack)

doc/fixes37.0
src/do_name.c

index 87010a021bb43efd79abec959365eb327124438f..eef41adc9cccf256e0881d2106adb0df4e5e3a96 100644 (file)
@@ -278,6 +278,7 @@ when reporting that hero can't repair a chest's broken lock with key/pick/card
        "You can't repair a chest's lock with an uncursed key." implicitly
        suggests that you might be able to do so with a blessed or cursed one
 pre-populate teleport destination prompt with travel destination
+ghosts cannot be renamed
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 2725f4955adcf4a255e3d8170976ebc44c674005..cc58b329031cd8276e3e7668ff9fd4f56b4f8906 100644 (file)
@@ -1196,7 +1196,8 @@ do_mname()
                     || mtmp->data->msound <= MS_ANIMAL)) {
         if (!alreadynamed(mtmp, monnambuf, buf))
             verbalize("I'm %s, not %s.", shkname(mtmp), buf);
-    } else if (mtmp->ispriest || mtmp->isminion || mtmp->isshk) {
+    } else if (mtmp->ispriest || mtmp->isminion || mtmp->isshk
+               || mtmp->data == &mons[PM_GHOST]) {
         if (!alreadynamed(mtmp, monnambuf, buf))
             pline("%s will not accept the name %s.", upstart(monnambuf), buf);
     } else