Defines |
|
#define | MAX_KNOWN_SPELLS 20 |
Functions |
| static int | can_detect_enemy (object *op, object *enemy, rv_vector *rv) |
| static object * | find_nearest_enemy (object *ob) |
| static int | move_randomly (object *op) |
| static int | can_hit (object *ob1, rv_vector *rv) |
| static object * | monster_choose_random_spell (object *monster, uint32 flags) |
| static int | monster_cast_spell (object *head, object *part, int dir, rv_vector *rv, uint32 flags) |
| static int | monster_use_bow (object *head, object *part, int dir) |
| static int | dist_att (int dir, object *part, rv_vector *rv) |
| static int | run_att (int dir, object *ob, object *part, rv_vector *rv) |
| static int | hitrun_att (int dir, object *ob) |
| static int | wait_att (int dir, object *ob, object *part, rv_vector *rv) |
| static int | disthit_att (int dir, object *ob, object *part, rv_vector *rv) |
| static int | wait_att2 (int dir, rv_vector *rv) |
| static void | circ1_move (object *ob) |
| static void | circ2_move (object *ob) |
| static void | pace_movev (object *ob) |
| static void | pace_moveh (object *ob) |
| static void | pace2_movev (object *ob) |
| static void | pace2_moveh (object *ob) |
| static void | rand_move (object *ob) |
| static int | talk_to_wall (object *op, object *npc, char *txt) |
| void | set_npc_enemy (object *npc, object *enemy, rv_vector *rv) |
| object * | check_enemy (object *npc, rv_vector *rv) |
| object * | find_enemy (object *npc, rv_vector *rv) |
| int | move_monster (object *op) |
| static int | can_detect_target (object *op, object *target, int range, int srange, rv_vector *rv) |
| static int | monster_spell_useful (object *target, int spell_id) |
| void | communicate (object *op, char *txt) |
| static char * | find_matching_message (const char *msg, const char *match) |
| int | talk_to_npc (object *op, object *npc, char *txt) |
| int | faction_is_friend_of (object *mon, object *pl) |
| int | is_friend_of (object *op, object *obj) |
| int | check_good_weapon (object *who, object *item) |
| int | check_good_armour (object *who, object *item) |
Variables |
| spell_struct | spells [NROFREALSPELLS] |
Monster memory, NPC interaction, AI, and other related functions are in this file, all used by the monster type objects.
Definition in file monster.c.
Update (or clear) an NPC's enemy. Perform most of the housekeeping related to switching enemies
You should always use this method to set (or clear) an NPC's enemy.
If enemy is given an aggro wp may be set up. If rv is given, it will be filled out with the vector to enemy
enemy and/or rv may be NULL.
- Parameters:
-
| npc | The NPC object we're setting enemy for. |
| enemy | The enemy object, NULL if we're clearing the enemy for this NPC. |
| rv | Range vector of the enemy. |
Definition at line 72 of file monster.c.