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.
This commit is contained in:
PatR
2017-05-29 17:17:36 -07:00
parent 0e18cf31e8
commit b604656077

View File

@@ -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 */ /* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -174,7 +174,7 @@ int expltype;
break; 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); mtmp = m_at(i + x - 1, j + y - 1);
if (!mtmp && i + x - 1 == u.ux && j + y - 1 == u.uy) if (!mtmp && i + x - 1 == u.ux && j + y - 1 == u.uy)
mtmp = u.usteed; mtmp = u.usteed;
@@ -392,8 +392,7 @@ int expltype;
} else { } else {
/* call resist with 0 and do damage manually so 1) we can /* call resist with 0 and do damage manually so 1) we can
* get out the message before doing the damage, and 2) we * get out the message before doing the damage, and 2) we
* can * can call mondied, not killed, if it's not your blast
* call mondied, not killed, if it's not your blast
*/ */
int mdam = dam; int mdam = dam;
@@ -512,12 +511,10 @@ int expltype;
} }
if (shopdamage) { if (shopdamage) {
pay_for_damage(adtyp == AD_FIRE pay_for_damage((adtyp == AD_FIRE) ? "burn away"
? "burn away" : (adtyp == AD_COLD) ? "shatter"
: adtyp == AD_COLD : (adtyp == AD_DISN) ? "disintegrate"
? "shatter" : "destroy",
: adtyp == AD_DISN ? "disintegrate"
: "destroy",
FALSE); FALSE);
} }