From: Pasi Kallinen Date: Sun, 18 Oct 2020 17:20:55 +0000 (+0300) Subject: Prevent ghosts from being renamed X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a31587ca9492e789f4cd9896f2d9f1c04cb4cf5;p=nethack Prevent ghosts from being renamed (via xNetHack) --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 87010a021..eef41adc9 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 diff --git a/src/do_name.c b/src/do_name.c index 2725f4955..cc58b3290 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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