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:
@@ -137,6 +137,8 @@ grammar of blessed-detection eating warning messages when eating 1 of N objects
|
|||||||
message for charging for items lost in a cursed magic bag wasn't always shown
|
message for charging for items lost in a cursed magic bag wasn't always shown
|
||||||
dropping gold on an altar printed no message and didn't change gnostic conduct
|
dropping gold on an altar printed no message and didn't change gnostic conduct
|
||||||
don't allow cursed daggers thrown by monsters to go thru closed doors
|
don't allow cursed daggers thrown by monsters to go thru closed doors
|
||||||
|
hero polymorphed into an exploding monster should explode when attacking
|
||||||
|
thin air, just like the monster itself
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
11
src/hack.c
11
src/hack.c
@@ -1041,13 +1041,20 @@ domove()
|
|||||||
if (flags.forcefight ||
|
if (flags.forcefight ||
|
||||||
/* remembered an 'I' && didn't use a move command */
|
/* remembered an 'I' && didn't use a move command */
|
||||||
(glyph_is_invisible(levl[x][y].glyph) && !flags.nopick)) {
|
(glyph_is_invisible(levl[x][y].glyph) && !flags.nopick)) {
|
||||||
|
boolean expl = (Upolyd && attacktype(youmonst.data, AT_EXPL));
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
Sprintf(buf,"a vacant spot on the %s", surface(x,y));
|
Sprintf(buf,"a vacant spot on the %s", surface(x,y));
|
||||||
You("attack %s.",
|
You("%s %s.",
|
||||||
!Underwater ? "thin air" : is_pool(x,y) ? "empty water" : buf);
|
expl ? "explode at" : "attack",
|
||||||
|
!Underwater ? "thin air" :
|
||||||
|
is_pool(x,y) ? "empty water" : buf);
|
||||||
unmap_object(x, y); /* known empty -- remove 'I' if present */
|
unmap_object(x, y); /* known empty -- remove 'I' if present */
|
||||||
newsym(x, y);
|
newsym(x, y);
|
||||||
nomul(0);
|
nomul(0);
|
||||||
|
if (expl) {
|
||||||
|
u.mh = -1; /* dead in the current form */
|
||||||
|
rehumanize();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (glyph_is_invisible(levl[x][y].glyph)) {
|
if (glyph_is_invisible(levl[x][y].glyph)) {
|
||||||
|
|||||||
@@ -1920,8 +1920,10 @@ use_weapon:
|
|||||||
impossible("strange attack of yours (%d)",
|
impossible("strange attack of yours (%d)",
|
||||||
mattk->aatyp);
|
mattk->aatyp);
|
||||||
}
|
}
|
||||||
if (dhit == -1)
|
if (dhit == -1) {
|
||||||
|
u.mh = -1; /* dead in the current form */
|
||||||
rehumanize();
|
rehumanize();
|
||||||
|
}
|
||||||
if (sum[i] == 2)
|
if (sum[i] == 2)
|
||||||
return((boolean)passive(mon, 1, 0, mattk->aatyp));
|
return((boolean)passive(mon, 1, 0, mattk->aatyp));
|
||||||
/* defender dead */
|
/* defender dead */
|
||||||
|
|||||||
Reference in New Issue
Block a user