trap triggering) executed even though hero didn't ultimately move
being "dead inside" (self-genocide while polymorphed) conferred partial
invulnerability--normal monster behavior stopped attacking hero
+if a fiery monster, wand of fire, or fiery explosion burned up a paper golem,
+ it could still leave blank scrolls
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 mondata.h $NHDT-Date: 1513130015 2017/12/13 01:53:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.32 $ */
+/* NetHack 3.6 mondata.h $NHDT-Date: 1513297342 2017/12/15 00:22:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.33 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
#define nonliving(ptr) \
(is_undead(ptr) || (ptr) == &mons[PM_MANES] || weirdnonliving(ptr))
+/* no corpse (ie, blank scrolls) if killed by fire */
+#define completelyburns(ptr) \
+ ((ptr) == &mons[PM_PAPER_GOLEM] || (ptr) == &mons[PM_STRAW_GOLEM])
+
/* Used for conduct with corpses, tins, and digestion attacks */
/* G_NOCORPSE monsters might still be swallowed as a purple worm */
/* Maybe someday this could be in mflags... */
-/* NetHack 3.6 explode.c $NHDT-Date: 1511658058 2017/11/26 01:00:58 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.54 $ */
+/* NetHack 3.6 explode.c $NHDT-Date: 1513297345 2017/12/15 00:22:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.55 $ */
/* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
mtmp->mhp -= (idamres + idamnonres);
}
if (mtmp->mhp <= 0) {
+ int xkflg = ((adtyp == AD_FIRE
+ && completelyburns(mtmp->data))
+ ? XKILL_NOCORPSE : 0);
+
if (!context.mon_moving) {
- killed(mtmp);
+ xkilled(mtmp, XKILL_GIVEMSG | xkflg);
} else if (mdef && mtmp == mdef) {
/* 'mdef' killed self trying to cure being turned
* into slime due to some action by the player.
*/
if (cansee(mtmp->mx, mtmp->my) || canspotmon(mtmp))
pline("%s is %s!", Monnam(mtmp),
- nonliving(mtmp->data) ? "destroyed"
- : "killed");
- xkilled(mtmp, XKILL_NOMSG | XKILL_NOCONDUCT);
- } else
+ xkflg ? "burned completely"
+ : nonliving(mtmp->data) ? "destroyed"
+ : "killed");
+ xkilled(mtmp, XKILL_NOMSG | XKILL_NOCONDUCT | xkflg);
+ } else {
+ if (xkflg)
+ adtyp = AD_RBRE; /* no corpse */
monkilled(mtmp, "", (int) adtyp);
+ }
} else if (!context.mon_moving) {
/* all affected monsters, even if mdef is set */
setmangry(mtmp, TRUE);
-/* NetHack 3.6 mhitm.c $NHDT-Date: 1504999944 2017/09/09 23:32:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */
+/* NetHack 3.6 mhitm.c $NHDT-Date: 1513297346 2017/12/15 00:22:26 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.99 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
if (vis && canseemon(mdef))
pline("%s is %s!", Monnam(mdef), on_fire(pd, mattk));
- if (pd == &mons[PM_STRAW_GOLEM] || pd == &mons[PM_PAPER_GOLEM]) {
+ if (completelyburns(pd)) { /* paper golem or straw golem */
if (vis && canseemon(mdef))
pline("%s burns completely!", Monnam(mdef));
- mondied(mdef);
+ mondead(mdef); /* was mondied() but that dropped paper scrolls */
if (mdef->mhp > 0)
return 0;
else if (mdef->mtame && !vis)
-/* NetHack 3.6 mhitu.c $NHDT-Date: 1512808564 2017/12/09 08:36:04 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.148 $ */
+/* NetHack 3.6 mhitu.c $NHDT-Date: 1513297347 2017/12/15 00:22:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.149 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
hitmsg(mtmp, mattk);
if (uncancelled) {
pline("You're %s!", on_fire(youmonst.data, mattk));
- if (youmonst.data == &mons[PM_STRAW_GOLEM]
- || youmonst.data == &mons[PM_PAPER_GOLEM]) {
- You("roast!");
+ if (completelyburns(youmonst.data)) { /* paper or straw golem */
+ You("go up in flames!");
/* KMH -- this is okay with unchanging */
rehumanize();
break;
-/* NetHack 3.6 uhitm.c $NHDT-Date: 1504999056 2017/09/09 23:17:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.167 $ */
+/* NetHack 3.6 uhitm.c $NHDT-Date: 1513297347 2017/12/15 00:22:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.172 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
if (!Blind)
pline("%s is %s!", Monnam(mdef), on_fire(pd, mattk));
- if (pd == &mons[PM_STRAW_GOLEM] || pd == &mons[PM_PAPER_GOLEM]) {
+ if (completelyburns(pd)) { /* paper golem or straw golem */
if (!Blind)
pline("%s burns completely!", Monnam(mdef));
+ else
+ You("smell burning%s.",
+ (pd == &mons[PM_PAPER_GOLEM]) ? " paper"
+ : (pd == &mons[PM_STRAW_GOLEM]) ? " straw" : "");
xkilled(mdef, XKILL_NOMSG | XKILL_NOCORPSE);
tmp = 0;
break;
-/* NetHack 3.6 zap.c $NHDT-Date: 1505475171 2017/09/15 11:32:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.267 $ */
+/* NetHack 3.6 zap.c $NHDT-Date: 1513297348 2017/12/15 00:22:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.270 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (tmp == MAGIC_COOKIE) { /* disintegration */
disintegrate_mon(mon, type, fltxt);
} else if (mon->mhp < 1) {
- if (type < 0)
+ if (type < 0) {
+ /* mon has just been killed by another monster */
monkilled(mon, fltxt, AD_RBRE);
- else
- killed(mon);
+ } else {
+ int xkflags = XKILL_GIVEMSG; /* killed(mon); */
+
+ /* killed by hero; we know 'type' isn't negative;
+ if it's fire, highly flammable monsters leave
+ no corpse; don't bother reporting that they
+ "burn completely" -- unnecessary verbosity */
+ if ((type % 10 == ZT_FIRE)
+ /* paper golem or straw golem */
+ && completelyburns(mon->data))
+ xkflags |= XKILL_NOCORPSE;
+ xkilled(mon, xkflags);
+ }
} else {
if (!otmp) {
/* normal non-fatal hit */