Fix genetic engineer poly hit killing the defender

The polymorph hit can kill the monster, but this info wasn't
propagated back.  If the defending dead monster retaliated,
the game issued an impossible.
This commit is contained in:
Pasi Kallinen
2023-05-10 09:31:51 +03:00
parent 845e813e86
commit ead2f94d6e

View File

@@ -3467,6 +3467,8 @@ mhitm_ad_poly(
pline("%s is not transformed.", Monnam(mdef));
} else {
mhm->damage = mon_poly(&gy.youmonst, mdef, mhm->damage);
if (DEADMONSTER(mdef))
mhm->hitflags |= M_ATTK_DEF_DIED;
mhm->hitflags |= M_ATTK_HIT;
mhm->done = TRUE;
}
@@ -3488,6 +3490,8 @@ mhitm_ad_poly(
/* mhitm */
if (mhm->damage < mdef->mhp && !negated) {
mhm->damage = mon_poly(magr, mdef, mhm->damage);
if (DEADMONSTER(mdef))
mhm->hitflags |= M_ATTK_DEF_DIED;
mhm->hitflags |= M_ATTK_HIT;
mhm->done = TRUE;
}