wand of polymorph vs monster inventory

From the newsgroup:  inventory dropped by a monster killed by system
shock when zapped by a wand of polymorph is protected against being poly'd
by that same zap, but worn/wielded equipment that's forced to be dropped
due to being unusable in a transformed monster's new form was not.  Not
mentioned in the newsgroup, but also fixed:  boulders dropped when a giant
turns into a non-giant were also subject to the zap instead of protected.
This commit is contained in:
nethack.rankin
2012-05-25 23:54:59 +00:00
parent b90d87ec3c
commit 98a609a03b
2 changed files with 7 additions and 3 deletions

View File

@@ -842,6 +842,8 @@ declining to attack a peaceful monster via kicking woke nearby monsters and
make hero be immune from stinking cloud damage during successful prayer
very fast hero would sometimes take two consecutive moves with very fast
monsters then getting two moves, instead of interleaving the activity
when a monster zapped by polymorph drops inventory because of its new form,
don't let that same zap hit the dropped item(s)
Platform- and/or Interface-Specific Fixes

View File

@@ -227,6 +227,11 @@ struct obj *otmp;
it guard against involuntary polymorph attacks too... */
shieldeff(mtmp->mx, mtmp->my);
} else if (!resist(mtmp, otmp->oclass, 0, NOTELL)) {
/* dropped inventory (due to death by system shock,
or loss of wielded weapon and/or worn armor due to
limitations of new shape) won't be hit by this zap */
for (obj = mtmp->minvent; obj; obj = obj->nobj)
bypass_obj(obj);
/* natural shapechangers aren't affected by system shock
(unless protection from shapechangers is interfering
with their metabolism...) */
@@ -235,9 +240,6 @@ struct obj *otmp;
pline("%s shudders!", Monnam(mtmp));
learn_it = TRUE;
}
/* dropped inventory shouldn't be hit by this zap */
for (obj = mtmp->minvent; obj; obj = obj->nobj)
bypass_obj(obj);
/* context.bypasses = TRUE; ## for make_corpse() */
/* no corpse after system shock */
xkilled(mtmp, 3);