version 1.148 | | version 1.149 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.148 2006/02/10 23:59:28 akirschbaum Exp $"; | | * "$Id: spell_effect.c,v 1.149 2006/02/19 18:06:24 akirschbaum Exp $"; |
*/ | | */ |
| | |
| | |
| | |
* areas themselves don't contain no magic spaces. | | * areas themselves don't contain no magic spaces. |
*/ | | */ |
/* This call here is really just to normalize the coordinates */ | | /* This call here is really just to normalize the coordinates */ |
get_map_flags(op->map, &m,op->x+freearr_x[dir]*dist, op->y+freearr_y[dir]*dist, | | mflags = get_map_flags(op->map, &m,op->x+freearr_x[dir]*dist, op->y+freearr_y[dir]*dist, |
&sx, &sy); | | &sx, &sy); |
if (OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, sx, sy))) { | | if (mflags&P_IS_ALIVE || OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, sx, sy))) { |
new_draw_info(NDI_UNIQUE, 0,op,"You cast your spell, but nothing happens.\n"); | | new_draw_info(NDI_UNIQUE, 0,op,"You cast your spell, but nothing happens.\n"); |
return 1; /* Maybe the penalty should be more severe... */ | | return 1; /* Maybe the penalty should be more severe... */ |
} | | } |
| | |
*/ | | */ |
for(;dist>0; dist--) { | | for(;dist>0; dist--) { |
if (get_map_flags(op->map, &m,op->x+freearr_x[dir]*dist, op->y+freearr_y[dir]*dist, | | if (get_map_flags(op->map, &m,op->x+freearr_x[dir]*dist, op->y+freearr_y[dir]*dist, |
&sx, &sy) & P_OUT_OF_MAP) continue; | | &sx, &sy) & (P_OUT_OF_MAP|P_IS_ALIVE)) continue; |
| | |
| | |
if (!OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, sx, sy))) break; | | if (!OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, sx, sy))) break; |