@@ -5311,7 +5311,8 @@ boolean say; /* Announce out of sight hit/miss events if true */
5311
5311
bhitpos .x = sx , bhitpos .y = sy ;
5312
5312
/* Fireballs only damage when they explode */
5313
5313
if (type != ZT_SPELL (ZT_FIRE )) {
5314
- range += zap_over_floor (sx , sy , type , & shopdamage , 0 , FALSE);
5314
+ range += zap_over_floor (sx , sy , type , & shopdamage , 0 ,
5315
+ (type >= 0 ? FALSE : TRUE));
5315
5316
/* zap with fire -> melt ice -> drown monster, so monster
5316
5317
found and cached above might not be here any more */
5317
5318
mon = m_at (sx , sy );
@@ -5723,6 +5724,8 @@ boolean moncast;
5723
5724
boolean see_it = cansee (x , y ), yourzap ;
5724
5725
int rangemod = 0 , abstype = BASE_ZT (abs (type ));
5725
5726
5727
+ yourzap = (type >= 0 && !exploding_wand_typ && !moncast );
5728
+
5726
5729
if (type == PHYS_EXPL_TYPE ) {
5727
5730
/* this won't have any effect on the floor */
5728
5731
return -1000 ; /* not a zap anyway, shouldn't matter */
@@ -5777,7 +5780,7 @@ boolean moncast;
5777
5780
if (see_it )
5778
5781
pline ("Steam billows from the fountain." );
5779
5782
rangemod -= 1 ;
5780
- dryup (x , y , ( moncast || type < 0 ) ? FALSE : TRUE );
5783
+ dryup (x , y , yourzap ? TRUE : FALSE );
5781
5784
} else if (IS_PUDDLE (lev -> typ ) || IS_SEWAGE (lev -> typ )) {
5782
5785
if (see_it ) {
5783
5786
if (IS_PUDDLE (lev -> typ ))
@@ -5803,7 +5806,7 @@ boolean moncast;
5803
5806
lev -> typ = DEADTREE ;
5804
5807
if (lev -> typ == DEADTREE )
5805
5808
newsym (x , y );
5806
- if (type >= 0 ) {
5809
+ if (yourzap ) {
5807
5810
if (Role_if (PM_DRUID )) {
5808
5811
You_feel ("very guilty." );
5809
5812
adjalign (-15 );
@@ -5956,8 +5959,8 @@ boolean moncast;
5956
5959
lev -> typ = ROOM , lev -> flags = 0 ;
5957
5960
if (see_it )
5958
5961
newsym (x , y );
5959
- add_damage (x , y , ( type >= 0 ) ? SHOP_BARS_COST : 0L );
5960
- if (type >= 0 )
5962
+ add_damage (x , y , yourzap ? SHOP_BARS_COST : 0L );
5963
+ if (yourzap )
5961
5964
* shopdamage = TRUE;
5962
5965
} else {
5963
5966
lev -> typ = DOOR , lev -> doormask = D_NODOOR ;
@@ -5974,7 +5977,6 @@ boolean moncast;
5974
5977
5975
5978
/* set up zap text for possible door feedback; for exploding wand, we
5976
5979
want "the blast" rather than "your blast" even if hero caused it */
5977
- yourzap = (type >= 0 && !exploding_wand_typ && !moncast );
5978
5980
zapverb = "blast" ; /* breath attack or wand explosion */
5979
5981
if (!exploding_wand_typ ) {
5980
5982
if (abs (type ) < ZT_SPELL (0 ))
@@ -6072,7 +6074,7 @@ boolean moncast;
6072
6074
}
6073
6075
if (new_doormask >= 0 ) { /* door gets broken */
6074
6076
if (* in_rooms (x , y , SHOPBASE )) {
6075
- if (type >= 0 && ! moncast ) {
6077
+ if (yourzap ) {
6076
6078
add_damage (x , y , SHOP_DOOR_COST );
6077
6079
* shopdamage = TRUE;
6078
6080
} else /* caused by monster */
@@ -6095,13 +6097,14 @@ boolean moncast;
6095
6097
}
6096
6098
6097
6099
if (OBJ_AT (x , y ) && abstype == ZT_FIRE )
6098
- if (burn_floor_objects (x , y , FALSE, (type > 0 && !moncast )) && couldsee (x , y )) {
6100
+ if (burn_floor_objects (x , y , FALSE, yourzap ? TRUE : FALSE)
6101
+ && couldsee (x , y )) {
6099
6102
newsym (x , y );
6100
6103
You ("%s of smoke." , !Blind ? "see a puff" : "smell a whiff" );
6101
6104
}
6102
6105
if ((mon = m_at (x , y )) != 0 ) {
6103
6106
wakeup (mon , FALSE);
6104
- if (type >= 0 && ! moncast ) {
6107
+ if (yourzap ) {
6105
6108
setmangry (mon , TRUE);
6106
6109
if (mon -> ispriest && * in_rooms (mon -> mx , mon -> my , TEMPLE ))
6107
6110
ghod_hitsu (mon );
0 commit comments