another vampire shape-shifting bit

Chameleon impersonating a vampire and vampire subject to protection
from shape changers weren't the only ways to have a vampire monster
which isn't a vampshifter.  One-shot polymorph could produce that too.
This commit is contained in:
PatR
2016-01-23 19:15:38 -08:00
parent 571288ecd3
commit 45ba0addf2

View File

@@ -3205,6 +3205,9 @@ boolean msg; /* "The oldmon turns into a newmon!" */
} else if (mvitals[monsndx(mdat)].mvflags & G_GENOD)
return 0; /* passed in mdat is genocided */
if (mdat == mtmp->data)
return 0; /* still the same monster */
mgender_from_permonst(mtmp, mdat);
if (In_endgame(&u.uz) && is_mplayer(olddata) && has_mname(mtmp)) {
@@ -3220,9 +3223,6 @@ boolean msg; /* "The oldmon turns into a newmon!" */
*p = '\0';
}
if (mdat == mtmp->data)
return 0; /* still the same monster */
if (mtmp->wormno) { /* throw tail away */
wormgone(mtmp);
place_monster(mtmp, mtmp->mx, mtmp->my);
@@ -3337,6 +3337,12 @@ boolean msg; /* "The oldmon turns into a newmon!" */
MNAME(mtmp) = save_mname;
}
/* when polymorph trap/wand/potion produces a vampire, turn in into
a full-fledged vampshifter unless shape-changing is blocked */
if (mtmp->cham == NON_PM && mdat->mlet == S_VAMPIRE
&& !Protection_from_shape_changers)
mtmp->cham = pm_to_cham(monsndx(mdat));
possibly_unwield(mtmp, polyspot); /* might lose use of weapon */
mon_break_armor(mtmp, polyspot);
if (!(mtmp->misc_worn_check & W_ARMG))