version 1.54 | | version 1.55 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.54 2001/05/29 04:41:54 mwedel Exp $"; | | * "$Id: spell_effect.c,v 1.55 2001/06/04 06:41:02 mwedel Exp $"; |
*/ | | */ |
| | |
| | |
| | |
| | |
spell_effect(SP_AGGRAVATION, op->x, op->y, op->map, op); | | spell_effect(SP_AGGRAVATION, op->x, op->y, op->map, op); |
| | |
for (i = 0; i < op->map->mapx; i++) | | for (i = 0; i < op->map->map_object->x; i++) |
for (j = 0; j < op->map->mapy; j++) { | | for (j = 0; j < op->map->map_object->y; j++) { |
if (out_of_map(op->map, op->x + i , op->y + j)) | | if (out_of_map(op->map, op->x + i , op->y + j)) |
continue; | | continue; |
for (tmp = get_map_ob(op->map, op->x + i, op->y + j); | | for (tmp = get_map_ob(op->map, op->x + i, op->y + j); |
| | |
* a no magic spot. | | * a no magic spot. |
*/ | | */ |
if(blocked(op->map,op->x+freearr_x[dir]*dist, op->y+freearr_y[dir]*dist)){ | | if(blocked(op->map,op->x+freearr_x[dir]*dist, op->y+freearr_y[dir]*dist)){ |
int x=RANDOM()%op->map->mapx,y=RANDOM()%op->map->mapy; | | int x=RANDOM()%op->map->map_object->x,y=RANDOM()%op->map->map_object->y; |
| | |
if(blocked(op->map,x,y) || blocks_magic(op->map,x,y)) { | | if(blocked(op->map,x,y) || blocks_magic(op->map,x,y)) { |
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 0; | | return 0; |
} | | } |
| | |
for (x = op->x + WINLEFT; x <= op->x + WINRIGHT; x++) | | for (x = op->x - MAP_CLIENT_X/2; x <= op->x + MAP_CLIENT_X/2; x++) |
for (y = op->y + WINUPPER; y <= op->y + WINLOWER; y++) { | | for (y = op->y - MAP_CLIENT_Y/2; y <= op->y + MAP_CLIENT_Y/2; y++) { |
if (out_of_map(op->map, x, y)) | | if (out_of_map(op->map, x, y)) |
continue; | | continue; |
done_one = 0; | | done_one = 0; |