more github issue #771 - feedback for oil potion \
explosion that reveals a secret door Make the fix to feedback when an exploding potion of oil reveals a door and then destroys it not affect other zap_over_floor feedback. This incorporates the followup comment from entrez.
This commit is contained in:
@@ -82,6 +82,9 @@ explode(
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (olet == BURNING_OIL) {
|
||||||
|
/* used to provide extra information to zap_over_floor() */
|
||||||
|
exploding_wand_typ = POT_OIL;
|
||||||
}
|
}
|
||||||
/* muse_unslime: SCR_FIRE */
|
/* muse_unslime: SCR_FIRE */
|
||||||
if (expltype < 0) {
|
if (expltype < 0) {
|
||||||
|
|||||||
@@ -4256,8 +4256,12 @@ buzz(int type, int nd, xchar sx, xchar sy, int dx, int dy)
|
|||||||
* called with dx = dy = 0 with vertical bolts
|
* called with dx = dy = 0 with vertical bolts
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dobuzz(int type, int nd, xchar sx, xchar sy, int dx, int dy,
|
dobuzz(
|
||||||
boolean say) /* Announce out of sight hit/miss events if true */
|
int type,
|
||||||
|
int nd,
|
||||||
|
xchar sx, xchar sy,
|
||||||
|
int dx, int dy,
|
||||||
|
boolean say) /* announce out of sight hit/miss events if true */
|
||||||
{
|
{
|
||||||
int range, abstype = abs(type) % 10;
|
int range, abstype = abs(type) % 10;
|
||||||
register xchar lsx, lsy;
|
register xchar lsx, lsy;
|
||||||
@@ -4629,8 +4633,12 @@ melt_ice_away(anything *arg, long timeout UNUSED)
|
|||||||
* amount by which range is reduced (the latter is just ignored by fireballs)
|
* amount by which range is reduced (the latter is just ignored by fireballs)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
zap_over_floor(xchar x, xchar y, int type, boolean *shopdamage,
|
zap_over_floor(
|
||||||
short exploding_wand_typ)
|
xchar x, xchar y, /* location */
|
||||||
|
int type, /* damage type plus {wand|spell|breath} info */
|
||||||
|
boolean *shopdamage, /* extra output if shop door is destroyed */
|
||||||
|
short exploding_wand_typ) /* supplied when breaking a wand; or POT_OIL
|
||||||
|
* when a lit potion of oil explodes */
|
||||||
{
|
{
|
||||||
const char *zapverb;
|
const char *zapverb;
|
||||||
struct monst *mon;
|
struct monst *mon;
|
||||||
@@ -4831,12 +4839,14 @@ zap_over_floor(xchar x, xchar y, int type, boolean *shopdamage,
|
|||||||
if (!exploding_wand_typ) {
|
if (!exploding_wand_typ) {
|
||||||
if (abs(type) < ZT_SPELL(0))
|
if (abs(type) < ZT_SPELL(0))
|
||||||
zapverb = "bolt"; /* wand zap */
|
zapverb = "bolt"; /* wand zap */
|
||||||
/* burning oil kludge check:
|
|
||||||
ZT_SPELL(ZT_FIRE) = ZT_SPELL(AD_FIRE-1) = 10+(2-1) = 11 */
|
|
||||||
else if (type == (ZT_SPELL(AD_FIRE - 1)))
|
|
||||||
yourzap = FALSE; /* and leave zapverb as "blast" */
|
|
||||||
else if (abs(type) < ZT_BREATH(0))
|
else if (abs(type) < ZT_BREATH(0))
|
||||||
zapverb = "spell";
|
zapverb = "spell";
|
||||||
|
} else if (exploding_wand_typ == POT_OIL) {
|
||||||
|
/* breakobj() -> explode_oil() -> splatter_buring_oil()
|
||||||
|
-> explode(ZT_SPELL(ZT_FIRE), BURNING_OIL)
|
||||||
|
-> zap_over_floor(ZT_SPELL(ZT_FIRE), POT_OIL) */
|
||||||
|
yourzap = FALSE; /* and leave zapverb as "blast" */
|
||||||
|
exploding_wand_typ = 0; /* not actually an exploding wand */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* secret door gets revealed, converted into regular door */
|
/* secret door gets revealed, converted into regular door */
|
||||||
|
|||||||
Reference in New Issue
Block a user