version 1.100 | | version 1.101 |
---|
| | |
/* | | /* |
* static char *rcsid_monster_c = | | * static char *rcsid_monster_c = |
* "$Id: monster.c,v 1.100 2006/05/30 07:12:29 mwedel Exp $"; | | * "$Id: monster.c,v 1.101 2006/06/01 18:59:13 tchize Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
| | |
| | |
int dist_att (int dir , object *ob, object *enemy, object *part, rv_vector *rv) { | | static int dist_att (int dir , object *ob, object *enemy, object *part, rv_vector *rv) { |
| | |
if (can_hit(part,enemy,rv)) | | if (can_hit(part,enemy,rv)) |
return dir; | | return dir; |
| | |
return 0; | | return 0; |
} | | } |
| | |
int run_att (int dir, object *ob, object *enemy,object *part, rv_vector *rv) { | | static int run_att (int dir, object *ob, object *enemy,object *part, rv_vector *rv) { |
| | |
if ((can_hit (part,enemy,rv) && ob->move_status <20) || ob->move_status <20) { | | if ((can_hit (part,enemy,rv) && ob->move_status <20) || ob->move_status <20) { |
ob->move_status++; | | ob->move_status++; |
| | |
return absdir (dir+4); | | return absdir (dir+4); |
} | | } |
| | |
int hitrun_att (int dir, object *ob,object *enemy) { | | static int hitrun_att (int dir, object *ob,object *enemy) { |
if (ob->move_status ++ < 25) | | if (ob->move_status ++ < 25) |
return dir; | | return dir; |
else if (ob->move_status <50) | | else if (ob->move_status <50) |
| | |
return absdir(dir+4); | | return absdir(dir+4); |
} | | } |
| | |
int wait_att (int dir, object *ob,object *enemy,object *part,rv_vector *rv) { | | static int wait_att (int dir, object *ob,object *enemy,object *part,rv_vector *rv) { |
| | |
int inrange = can_hit (part, enemy,rv); | | int inrange = can_hit (part, enemy,rv); |
| | |
| | |
return 0; | | return 0; |
} | | } |
| | |
int disthit_att (int dir, object *ob, object *enemy, object *part,rv_vector *rv) { | | static int disthit_att (int dir, object *ob, object *enemy, object *part,rv_vector *rv) { |
| | |
/* The logic below here looked plain wrong before. Basically, what should | | /* The logic below here looked plain wrong before. Basically, what should |
* happen is that if the creatures hp percentage falls below run_away, | | * happen is that if the creatures hp percentage falls below run_away, |
| | |
return dist_att (dir,ob,enemy,part,rv); | | return dist_att (dir,ob,enemy,part,rv); |
} | | } |
| | |
int wait_att2 (int dir, object *ob,object *enemy,object *part, rv_vector *rv) { | | static int wait_att2 (int dir, object *ob,object *enemy,object *part, rv_vector *rv) { |
if (rv->distance < 9) | | if (rv->distance < 9) |
return absdir (dir+4); | | return absdir (dir+4); |
return 0; | | return 0; |