double undead turning

From the newsgroup:  when an undead monster got killed by a wand
or spell of undead turning, if it left a corpse that corpse would be
hit by the same zap and was immediately revived.  This fix uses the
flag bits that were added to prevent objects that are dropped by a
polymorphed monster from being hit by the same polymorph zap.

     This also fixes a post-3.3.1 bug that produced "the <undead>
turns to flee" even when that monster had been killed by the turning
attack.  3.3.1 had the same bogus fleeing effect but didn't give any
message so it was unnoticeable.
This commit is contained in:
nethack.rankin
2002-02-23 11:13:41 +00:00
parent 6f90e5bc8c
commit a9b2f4f1ee
3 changed files with 18 additions and 4 deletions

View File

@@ -238,6 +238,10 @@ register struct monst *mtmp;
}
/* All special cases should precede the G_NOCORPSE check */
/* if polymorph or undead turning has killed this monster,
prevent the same attack beam from hitting its corpse */
if (flags.bypasses) bypass_obj(obj);
if (mtmp->mnamelth)
obj = oname(obj, NAME(mtmp));