From: PatR Date: Tue, 30 May 2017 00:17:36 +0000 (-0700) Subject: explode.c bits X-Git-Tag: NetHack-3.6.1_RC01~485 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b60465607751efb3e4ab6c6df3fd7f5c46acbd16;p=nethack explode.c bits Update a comment prompted by '#H5459 - explosions and steeds'. Also a couple of formatting changes. This doesn't attempt to address the reported issue: hero's and steed's resistances are intermingled when exploding at the hero's coordinates and influence the effect on both. Inherited from the behavior for an engulfed hero, and might not necessarily be a bug. --- diff --git a/src/explode.c b/src/explode.c index e26e58d8a..74dfcdae2 100644 --- a/src/explode.c +++ b/src/explode.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 explode.c $NHDT-Date: 1450915435 2015/12/24 00:03:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.45 $ */ +/* NetHack 3.6 explode.c $NHDT-Date: 1496103440 2017/05/30 00:17:20 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.49 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -174,7 +174,7 @@ int expltype; break; } } - /* can be both you and mtmp if you're swallowed */ + /* can be both you and mtmp if you're swallowed or riding */ mtmp = m_at(i + x - 1, j + y - 1); if (!mtmp && i + x - 1 == u.ux && j + y - 1 == u.uy) mtmp = u.usteed; @@ -392,8 +392,7 @@ int expltype; } else { /* call resist with 0 and do damage manually so 1) we can * get out the message before doing the damage, and 2) we - * can - * call mondied, not killed, if it's not your blast + * can call mondied, not killed, if it's not your blast */ int mdam = dam; @@ -512,12 +511,10 @@ int expltype; } if (shopdamage) { - pay_for_damage(adtyp == AD_FIRE - ? "burn away" - : adtyp == AD_COLD - ? "shatter" - : adtyp == AD_DISN ? "disintegrate" - : "destroy", + pay_for_damage((adtyp == AD_FIRE) ? "burn away" + : (adtyp == AD_COLD) ? "shatter" + : (adtyp == AD_DISN) ? "disintegrate" + : "destroy", FALSE); }