1 | /* |
1 | /* |
2 | * static char *rcsid_spell_effect_c = |
2 | * static char *rcsid_spell_effect_c = |
3 | * "$Id: spell_effect.c,v 1.6 2006/05/07 12:49:26 root Exp $"; |
3 | * "$Id: spell_effect.c,v 1.7 2006/05/07 12:54:36 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
… | |
… | |
679 | } |
679 | } |
680 | |
680 | |
681 | /* earth to dust spell. Basically destroys earthwalls in the area. |
681 | /* earth to dust spell. Basically destroys earthwalls in the area. |
682 | */ |
682 | */ |
683 | int cast_earth_to_dust(object *op,object *caster, object *spell_ob) { |
683 | int cast_earth_to_dust(object *op,object *caster, object *spell_ob) { |
684 | object *tmp; |
684 | object *tmp, *next; |
685 | int range,i,j, mflags; |
685 | int range,i,j, mflags; |
686 | sint16 sx, sy; |
686 | sint16 sx, sy; |
687 | mapstruct *m; |
687 | mapstruct *m; |
688 | |
688 | |
689 | if(op->type!=PLAYER) |
689 | if(op->type!=PLAYER) |
… | |
… | |
704 | * Don't care too much what it blocks - this allows for |
704 | * Don't care too much what it blocks - this allows for |
705 | * any sort of earthwall/airwall/waterwall, etc |
705 | * any sort of earthwall/airwall/waterwall, etc |
706 | * type effects. |
706 | * type effects. |
707 | */ |
707 | */ |
708 | if (GET_MAP_MOVE_BLOCK(m, sx, sy)) |
708 | if (GET_MAP_MOVE_BLOCK(m, sx, sy)) |
709 | for (tmp = get_map_ob (m, sx, sy); tmp != NULL; tmp = tmp->above) |
709 | for (tmp = get_map_ob(m, sx, sy); tmp != NULL; tmp = next) |
|
|
710 | { |
|
|
711 | next = tmp->above; |
710 | if (QUERY_FLAG (tmp, FLAG_TEAR_DOWN)) |
712 | if (QUERY_FLAG (tmp, FLAG_TEAR_DOWN)) |
711 | hit_player (tmp, 9998, op, AT_PHYSICAL, 0); |
713 | hit_player (tmp, 9998, op, AT_PHYSICAL, 0); |
|
|
714 | } |
712 | } |
715 | } |
713 | return 1; |
716 | return 1; |
714 | } |
717 | } |
715 | |
718 | |
716 | |
719 | |