version 1.15 | | version 1.16 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.15 2001/04/09 06:59:46 mwedel Exp $"; | | * "$Id: skill_util.c,v 1.16 2001/04/19 04:37:36 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
* Legal opponents are the same as outlined in move_player_attack() | | * Legal opponents are the same as outlined in move_player_attack() |
*/ | | */ |
| | |
if(tmp==NULL) | | if(tmp==NULL) { |
| | if (out_of_map(pl->map, pl->x+dx,pl->y+dy)) return 0; |
for(tmp=get_map_ob(pl->map,pl->x+dx,pl->y+dy);tmp;tmp=tmp->above) | | for(tmp=get_map_ob(pl->map,pl->x+dx,pl->y+dy);tmp;tmp=tmp->above) |
if((QUERY_FLAG(tmp,FLAG_ALIVE) && tmp->stats.hp>=0) | | if((QUERY_FLAG(tmp,FLAG_ALIVE) && tmp->stats.hp>=0) |
|| QUERY_FLAG(tmp, FLAG_CAN_ROLL) | | || QUERY_FLAG(tmp, FLAG_CAN_ROLL) |
| | |
return 0; | | return 0; |
break; | | break; |
} | | } |
| | } |
if(tmp!=NULL) return do_skill_attack(tmp,pl,string); | | if(tmp!=NULL) return do_skill_attack(tmp,pl,string); |
| | |
if(pl->type==PLAYER) | | if(pl->type==PLAYER) |