version 1.17 | | version 1.18 |
---|
| | |
/* | | /* |
* static char *rcsid_monster_c = | | * static char *rcsid_monster_c = |
* "$Id: monster.c,v 1.17 2001/02/23 06:06:35 mwedel Exp $"; | | * "$Id: monster.c,v 1.18 2001/04/13 04:13:58 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if(monster_use_bow(op,part,enemy,dir)) | | if(monster_use_bow(op,part,enemy,dir)) |
return 0; | | return 0; |
} | | } |
} | | } /* for processing of all parts */ |
part = get_nearest_part(op,enemy); | | part = get_nearest_part(op,enemy); |
| | |
| | /* I'm not really sure if we need to re-do the direction calculation |
| | * again - we did it above. However, part may differe than the |
| | * direction above, so this may be necessary. |
| | */ |
dir=find_dir_2(part->x-enemy->x,part->y-enemy->y); | | dir=find_dir_2(part->x-enemy->x,part->y-enemy->y); |
| | if(QUERY_FLAG(op, FLAG_SCARED) || QUERY_FLAG(op,FLAG_RUN_AWAY)) |
| | dir=absdir(dir+4); |
| | |
| | if(QUERY_FLAG(op,FLAG_CONFUSED)) |
| | dir = absdir(dir + RANDOM()%3 + RANDOM()%3 - 2); |
| | |
if ((op->move_type & LO4) && !QUERY_FLAG(op, FLAG_SCARED)) { | | if ((op->move_type & LO4) && !QUERY_FLAG(op, FLAG_SCARED)) { |
switch (op->move_type & LO4) { | | switch (op->move_type & LO4) { |
case DISTATT: | | case DISTATT: |