fix #H4262 - mon weapon attacks for non-weapon dmg

Let monsters who have a weapon attack for non-physical damage dish
out physical damage instead of doing the drain life or drain
strength they usually do if they happen to be wielding cockatrice
corpses or a couple of particular aritfacts that do more harm
than just level drain.  (Other artifacts are candidates, but I
don't think it's worth checking for them since the monsters
involved have such a small chance of acquiring and wielding them.)
Also switch to physical if monster's ability has been cancelled.

Only barrow wight, Nazgul, and erinys are affected.  Yeenoghu and
the Master Assassin have a weapon attack for physical damage and
another one for non-physical damage (not necessarily delivered in
that order).  They haven't been changed--only the physical damage
attack has a chance to apply their weapon's special damage.
This commit is contained in:
PatR
2016-03-03 00:07:57 -08:00
parent c0f29e71cd
commit db9dddc535
5 changed files with 39 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1456528594 2016/02/26 23:16:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.549 $ */
/* NetHack 3.6 extern.h $NHDT-Date: 1456992437 2016/03/03 08:07:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.550 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1136,8 +1136,8 @@ E const char *FDECL(mpoisons_subj, (struct monst *, struct attack *));
E void NDECL(u_slow_down);
E struct monst *NDECL(cloneu);
E void FDECL(expels, (struct monst *, struct permonst *, BOOLEAN_P));
E struct attack *FDECL(getmattk,
(struct permonst *, int, int *, struct attack *));
E struct attack *FDECL(getmattk, (struct monst *, struct monst *,
int, int *, struct attack *));
E int FDECL(mattacku, (struct monst *));
E int FDECL(magic_negation, (struct monst *));
E boolean NDECL(gulp_blnd_check);