]> granicus.if.org Git - nethack/commitdiff
magicbane grammar
authornethack.allison <nethack.allison>
Mon, 6 Mar 2006 04:11:36 +0000 (04:11 +0000)
committernethack.allison <nethack.allison>
Mon, 6 Mar 2006 04:11:36 +0000 (04:11 +0000)
I don't know for sure what all the possible values of hittee passed to
Mb_hit() are, but this checks to see if it matches the name of the
mdef monster and forces the word "is" if it does.

doc/fixes34.4
src/artifact.c

index ae47cf1980ead0ed98673dd95096cf0241621957..1020b45a3790a1bc074d3afae5cc31d6298acfd6 100644 (file)
@@ -198,6 +198,7 @@ more precise probing/stethoscope feedback when engulfed
 make baby long worms have lower level than full grown ones
 use "your kraken" instead of "a kraken" when searching reveals a tame
        hidden monster
+Magicbane should not produce "<something> are confused" message
 
 
 Platform- and/or Interface-Specific Fixes
index 1dad6d9e6ca45543d04915e14e88c001a710027f..3d79d17eb4819831bf25466225110f70979e7ad8 100644 (file)
@@ -787,6 +787,7 @@ char *hittee;                       /* target's name: "you" or mon_nam(mdef) */
     boolean youattack = (magr == &youmonst),
            youdefend = (mdef == &youmonst),
            resisted = FALSE, do_stun, do_confuse, result;
+    boolean hitteename = (has_name(mdef) && !strcmpi(hittee, MNAME(mdef)));
     int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2;
 
     result = FALSE;            /* no message given yet */
@@ -936,7 +937,8 @@ char *hittee;                       /* target's name: "you" or mon_nam(mdef) */
            if (do_stun) Strcat(buf, "stunned");
            if (do_stun && do_confuse) Strcat(buf, " and ");
            if (do_confuse) Strcat(buf, "confused");
-           pline("%s %s %s%c", hittee, vtense(hittee, "are"),
+           pline("%s %s %s%c", hittee,
+                 hitteename ? "is" : vtense(hittee, "are"),
                  buf, (do_stun && do_confuse) ? '!' : '.');
        }
     }