fix #H4426 - shapeshifted vampires vs stoning

and vs digestion.  minstapetrify() was previously changed to
explicitly revert a shape-shifted vampire back to vampire form
when it was turned to stone.  This does the same for monstone().
It also causes shape-shifted vampires to revert to vampire form
immediately when swallowed, so subsequent death via digestion or
engulfing damage doesn't have to deal with reverting changed shape.

I'm not convinced this is the right fix for either stoning or
being digested.  Unlike with ordinary damage, where multiple hits
are usually needed to kill a vampire after it reverts to 'V' form,
here the vampire will be killed by the next successful stoning or
digestion attack in one hit.  It ought to least try to flee.
This commit is contained in:
PatR
2016-07-11 17:38:02 -07:00
parent 47572a7946
commit ff29971453
4 changed files with 39 additions and 5 deletions

View File

@@ -677,12 +677,26 @@ register struct attack *mattk;
return MM_MISS;
if (vis) {
/* [this two-part formatting dates back to when only one x_monnam
result could be included in an expression because the next one
would overwrite first's result -- that's no longer the case] */
Sprintf(buf, "%s swallows", Monnam(magr));
pline("%s %s.", buf, mon_nam(mdef));
}
for (obj = mdef->minvent; obj; obj = obj->nobj)
(void) snuff_lit(obj);
if (is_vampshifter(mdef)
&& newcham(mdef, &mons[mdef->cham], FALSE, FALSE)) {
if (vis) {
/* 'it' -- previous form is no longer available and
using that would be excessively verbose */
pline("%s expels it.", Monnam(magr));
pline("It turns into %s.", a_monnam(mdef));
}
return MM_HIT; /* bypass mdamagem() */
}
/*
* All of this manipulation is needed to keep the display correct.
* There is a flush at the next pline().