R926 - polymorphed player does not explode at thin air

Reported that player polymorphed into an exploding monster does not explode
when attacking thin air.  Also noticed that if player is Unchanging, they
wouldn't die after exploding in the existing code.  Set u.mh = -1 to ensure
they won't still be around after exploding.
This commit is contained in:
cohrs
2002-07-04 06:36:37 +00:00
parent 7dd72e4ac2
commit 8a44a437e5
3 changed files with 14 additions and 3 deletions

View File

@@ -1920,8 +1920,10 @@ use_weapon:
impossible("strange attack of yours (%d)",
mattk->aatyp);
}
if (dhit == -1)
if (dhit == -1) {
u.mh = -1; /* dead in the current form */
rehumanize();
}
if (sum[i] == 2)
return((boolean)passive(mon, 1, 0, mattk->aatyp));
/* defender dead */