]> granicus.if.org Git - nethack/commitdiff
fix #K3255 - "death wand"
authorPatR <rankin@nethack.org>
Fri, 29 Jan 2021 01:00:13 +0000 (17:00 -0800)
committerPatR <rankin@nethack.org>
Fri, 29 Jan 2021 01:00:13 +0000 (17:00 -0800)
Prevent a wish request of "death wand" (as alternate spelling
for "wand of death") from matching "Death" monster and yielding
a random wand.

"death finger" and "death finger spellbook" produce a "spellbook
of finger of death" even without a similar fix.

src/objnam.c

index 4ac4149c106ca052f1ab3b13e764b6f6817cda04..244814a9a1a9e0da47b6b843c716ac3e50f685d7 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 objnam.c        $NHDT-Date: 1607945434 2020/12/14 11:30:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.308 $ */
+/* NetHack 3.7 objnam.c        $NHDT-Date: 1611882005 2021/01/29 01:00:05 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.312 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2011. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -3577,8 +3577,9 @@ readobjnam_postparse1(struct _readobjnam_data* d)
     /* Find corpse type w/o "of" (red dragon scale mail, yeti corpse) */
     if (strncmpi(d->bp, "samurai sword", 13)  /* not the "samurai" monster! */
         && strncmpi(d->bp, "wizard lock", 11) /* not the "wizard" monster! */
-        && strncmpi(d->bp, "ninja-to", 8)     /* not the "ninja" rank */
+        && strncmpi(d->bp, "death wand", 10)  /* 'of inversion', not Rider */
         && strncmpi(d->bp, "master key", 10)  /* not the "master" rank */
+        && strncmpi(d->bp, "ninja-to", 8)     /* not the "ninja" rank */
         && strncmpi(d->bp, "magenta", 7)) {   /* not the "mage" rank */
         const char *rest = 0;