#include "defs.h" void addignorecell(lifeform_t *lf, cell_t *c); int aiattack(lifeform_t *lf, lifeform_t *victim, int timelimit); void ailoscheck(lifeform_t *lf); flag_t *ai_createpathto(lifeform_t *lf, cell_t *targcell); cell_t *ai_getnextcellinpath(lifeform_t *lf); int ai_popnextcellinpath(lifeform_t *lf); enum OBTYPE aigetattackspell(lifeform_t *lf, lifeform_t *victim); enum OBTYPE aigetfleespell(lifeform_t *lf); int aigetchasetime(lifeform_t *lf); cell_t *aigetlastknownpos(lifeform_t *lf, lifeform_t *target, int *lastx, int *lasty, int *lastdir); object_t *aigetrangedattack(lifeform_t *lf, lifeform_t *target, enum RANGEATTACK *ra, int *range); int aigetspelltarget(lifeform_t *lf, objecttype_t *spelltype, lifeform_t *victim, lifeform_t **spelllf, cell_t **spellcell, object_t **spellob, enum FLAG purpose); cell_t *aigettargetcell(lifeform_t *lf, flag_t **targflag); object_t *aigetwand(lifeform_t *lf, enum FLAG purpose); flag_t *aigoto(lifeform_t *lf, cell_t *c, enum MOVEREASON why, void *data, int timelimit); int ai_attack_existing_target(lifeform_t *lf); int ai_bored(lifeform_t *lf, lifeform_t *master, int canattack); int ai_handle_emergencies(lifeform_t *lf, enum ATTRBRACKET iqb); int ai_healing(lifeform_t *lf); int ai_housekeeping(lifeform_t *lf, lifeform_t *master); int ai_inventory_mgt(lifeform_t *lf, int *canattack); int ai_movement(lifeform_t *lf); int ai_premovement(lifeform_t *lf); flag_t *aihastarget(lifeform_t *lf); int aimovetolf(lifeform_t *lf, lifeform_t *target, int wantattack); int aimovetotargetcell(lifeform_t *lf, flag_t *f); int aipickup(lifeform_t *lf, object_t *o); int aipickupok(lifeform_t *lf, object_t *o); int aiobok(lifeform_t *lf, object_t *o, lifeform_t *target); int aispellok(lifeform_t *lf, enum OBTYPE spellid, lifeform_t *victim, enum FLAG purpose); void aiturn(lifeform_t *lf); int aiwants(lifeform_t *lf, object_t *o, int *covets); int aiwants_real(lifeform_t *lf, object_t *o, int *covets, int *noids, enum OBTYPE *oid, int *oidcovet,int *nwantflags, enum FLAG *wantflag, int *wantflagcovet); void clearnode(node_t *n); lifeform_t *gettargetlf(lifeform_t *lf); object_t *hasbetterarmour(lifeform_t *lf, obpile_t *op); object_t *hasbetterweapon(lifeform_t *lf, obpile_t *op); int lookforobs(lifeform_t *lf); int loseaitargets(lifeform_t *lf); void makewantedoblist(lifeform_t *lf, int *noids, enum OBTYPE *oid, int *oidcovet,int *nwantflags, enum FLAG *wantflag, int *wantflagcovet); int useitemwithflag(lifeform_t *lf, enum FLAG whichflag);