#ifndef WH_MON_H_55a16d84_ #define WH_MON_H_55a16d84_ /* * APIs exported by mon.c. */ #include "structs.h" /* * Fuse function for creating new monsters. */ extern void makemon_fuse(long int, void *); /* * The standard animal-intelligence and human-intelligence monster tick * functions. Most monsters' tick functions just call one of these. */ extern void std_animal_tick(MONST *); extern void std_human_tick(MONST *); /* * The standard monster take-damage, kill, and destroy functions. */ extern TDRV std_takedamage(MONST *, int); extern void std_kill(MONST *); extern void std_destroy(MONST *); /* * Return a monster's name, with an article, suitable for messages like * "There's %s there!". */ extern char *amonname(MONST *); /* * Create a new monster of a given type on a given level. Returns the * new monster. */ extern MONST *newmon(int, LEVEL *); /* * Place a monster in a location. */ extern int placemon(MONST *, LOC *); /* * Gate a monster in (to is the destination gate's location). */ extern void gatemon(MONST *, LOC *); /* * Move a monster to a location. */ extern void movemon(MONST *, LOC *); /* * See if the player needs to be told about a monster at the other end * of stairs. Returns true if the player was told, false if there's * no monster there or it's the one the player has already been told * about. */ extern int seestairs(void); /* * Kill a monster. */ extern void killmon(MONST *); /* * Initialize the monster subsystem. */ extern void initmonst(void); /* * Toggle aggravation. Developer support. */ extern void aggravate(void); /* * Heal a given monster by a given number of hit points. */ extern void gainhp(MONST *, int); /* * Test whether one monster (the first arg) can see another (second), * in which case it returns true, or not, in which case it returns * false. Currently works only if the first arg is the player. */ extern int monst_cansee_monst(MONST *, MONST *); /* * Make a monster stop using an object. What, if anything, this means * depends on the object type; this is a no-op for types for which "in * use" is not a meaningful concept. This is used when, for example, * the player is dropping something. */ extern void stop_using(MONST *, INVOBJ *); /* * Return a monster's attack bonus. This includes weapon, dexterity, * etc - everything but the monster's base per-type roll. */ extern int mon_extra_hit(MONST *); /* * Return a monster's defense bonus. This includes armour, rings of * protection, dexterity, etc - everything but the monster's base * per-type roll. */ extern int mon_extra_def(MONST *); /* * Return a monster's damage bonus. This includes weapon, strength, * etc - everything but the monster's base per-type roll. */ extern int mon_extra_dmg(MONST *); /* * Add a bonus roll to something. In * * add_bonus(rollstr,list,teardown) * * rollstr is the bonus (in the form of a string suitable for passing * to roll()), list is the BONUSROLL ** the bonus should be added to, * and teardown is the teardown callback to be called when the * BONUSROLL is destroyed. The priv pointer is left unset; if the * teardown function needs it, our caller must set it. */ extern BONUSROLL *add_bonus(const char *, BONUSROLL **, void (*)(BONUSROLL *)); /* * Destroy a BONSUROLL. This includes removing it from its list, * calling its teardown function, and freeing the struct. */ extern void remove_bonus(BONUSROLL *); #endif