From fe3dcb4416c1033a2cc6431c88cb503502af0d0e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 6 May 2023 20:16:21 +0300 Subject: [PATCH] Genetic engineer uses up turn when polying a monster The fuzzer encountered a "no monster to remove" impossible, this should fix it, even though I did not manage to reproduce it manually. --- src/uhitm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/uhitm.c b/src/uhitm.c index 68b3b519d..97c3eac58 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -3467,6 +3467,8 @@ mhitm_ad_poly( pline("%s is not transformed.", Monnam(mdef)); } else { mhm->damage = mon_poly(&gy.youmonst, mdef, mhm->damage); + mhm->hitflags |= M_ATTK_HIT; + mhm->done = TRUE; } } } else if (mdef == &gy.youmonst) { @@ -3478,12 +3480,17 @@ mhitm_ad_poly( You("aren't transformed."); } else { mhm->damage = mon_poly(magr, &gy.youmonst, mhm->damage); + mhm->hitflags |= M_ATTK_HIT; + mhm->done = TRUE; } } } else { /* mhitm */ - if (mhm->damage < mdef->mhp && !negated) + if (mhm->damage < mdef->mhp && !negated) { mhm->damage = mon_poly(magr, mdef, mhm->damage); + mhm->hitflags |= M_ATTK_HIT; + mhm->done = TRUE; + } } }