#include "defs.h" lifeform_t *addlf(cell_t *cell, enum RACE rid, int level); lifeform_t *real_addlf(cell_t *cell, enum RACE rid, int level, int controller); job_t *addjob(enum JOB id, char *name); race_t *addrace(enum RACE id, char *name, float weight, char glyph, enum MATERIAL mat); void adjustdamlf(lifeform_t *lf, unsigned int *amt, enum DAMTYPE damtype); void autotarget(lifeform_t *lf); void autoweild(lifeform_t *lf); int appearsrandomly(enum RACE rid); void bleed(lifeform_t *lf); int cancast(lifeform_t *lf, enum OBTYPE oid, int *mpcost); int caneat(lifeform_t *lf, object_t *o); int canhear(lifeform_t *lf, cell_t *c); int canpickup(lifeform_t *lf, object_t *o); int canpush(lifeform_t *lf, object_t *o, int dir); int canquaff(lifeform_t *lf, object_t *o); int canrest(lifeform_t *lf); int canwear(lifeform_t *lf, object_t *o, enum BODYPART where); int canweild(lifeform_t *lf, object_t *o); int cantakeoff(lifeform_t *lf, object_t *o); int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *targob, cell_t *targcell); void die(lifeform_t *lf); void dumplf(void); int eat(lifeform_t *lf, object_t *o); object_t *eyesshaded(lifeform_t *lf); void fightback(lifeform_t *lf, lifeform_t *attacker); job_t *findjob(enum JOB jobid); lifeform_t *findlf(map_t *m, int lfid); race_t *findrace(enum RACE id); race_t *findracebyname(char *name); int flee(lifeform_t *lf); void gainhp(lifeform_t *lf, int amt); void gainlevel(lifeform_t *lf); void gainmp(lifeform_t *lf, int amt); void gainxp(lifeform_t *lf, long amt); object_t *getarmour(lifeform_t *lf, enum BODYPART bp); int getarmourrating(lifeform_t *lf); int getattackspeed(lifeform_t *lf); int getattr(lifeform_t *lf, enum ATTRIB attr); int getdexmod(lifeform_t *lf); int getevasion(lifeform_t *lf); object_t *getbestmissile(lifeform_t *lf); object_t *getbestweapon(lifeform_t *lf); object_t *getbestfirearm(lifeform_t *lf); int getbodyparthitchance(enum BODYPART bp); char *getbodypartname(enum BODYPART bp); char *getbodypartequipname(enum BODYPART bp); object_t *getequippedob(obpile_t *op, enum BODYPART bp); object_t *getfirearm(lifeform_t *lf); lifeform_t *getguntarget(lifeform_t *lf); int getguntargetid(lifeform_t *lf); //int gethealtime(lifeform_t *lf); int gethearingrange(lifeform_t *lf); enum HUNGER gethungerlevel(int hunger); char * gethungername(enum HUNGER hunger, char *buf); int gethungerval(lifeform_t *lf); job_t *getjob(lifeform_t *lf); int getlfaccuracy(lifeform_t *lf); enum LFCONDITION getlfcondition(lifeform_t *lf); int getnightvisrange(lifeform_t *lf); char *getlfconditionname(enum LFCONDITION cond); char *getseenlfconditionname(lifeform_t *lf, lifeform_t *viewer); enum MATERIAL getlfmaterial(lifeform_t *lf); float getmaxcarryweight(lifeform_t *lf); float getmaxliftweight(lifeform_t *lf); float getmaxpushweight(lifeform_t *lf); int getvisrange(lifeform_t *lf); int getmovespeed(lifeform_t *lf); char *getmoveverb(lifeform_t *lf); char *getlfname(lifeform_t *lf, char *buf); char *getlfnamea(lifeform_t *lf, char *buf); enum LFSIZE getlfsize(lifeform_t *lf); float getlfweight(lifeform_t *lf, int withobs); int getspellspeed(lifeform_t *lf); char *getplayername(char *buf); char *getplayernamefull(char *buf); object_t *getrandomarmour(lifeform_t *lf); //int getrandommonlevel(int depth); race_t *getrandomrace(map_t *map); race_t *getreallyrandomrace(void); char *getspeedname(int speed, char *buf); float getstatmod(lifeform_t *lf, enum ATTRIB att); enum STRBRACKET getstrname(int str, char *buf); enum DEXBRACKET getdexname(int dex, char *buf); enum IQBRACKET getiqname(int iq, char *buf); int getthrowspeed(int str); int getunarmedattackspeed(lifeform_t *lf); object_t *getweapon(lifeform_t *lf); long getxpforlev(int level); void givejob(lifeform_t *lf, enum JOB jobid); void giveobflags(lifeform_t *lf, object_t *o, enum FLAG whattype); void givestartobs(lifeform_t *lf, flagpile_t *fp); map_t *gotolev(lifeform_t *lf, int depth, object_t *fromstairs); job_t *hasjob(lifeform_t *lf, enum JOB job); flag_t *lfhasflag(lifeform_t *lf, enum FLAG fid); flag_t *lfhasflagval(lifeform_t *lf, enum FLAG fid, int val0, int val1, int val2, char *text); flag_t *lfhasknownflag(lifeform_t *lf, enum FLAG fid); flag_t *lfhasknownflagval(lifeform_t *lf, enum FLAG fid, int val0, int val1, int val2, char *text); int lockpick(lifeform_t *lf, object_t *target, object_t *device); void loseobflags(lifeform_t *lf, object_t *o, int kind); int haslof(lifeform_t *viewer, cell_t *dest); int haslos(lifeform_t *viewer, cell_t *dest); int hasmr(lifeform_t *lf); void initjobs(void); void initrace(void); void interrupt(lifeform_t *lf); int isbleeding(lifeform_t *lf); int isblind(lifeform_t *lf); enum BURDENED isburdened(lifeform_t *lf); int isdead(lifeform_t *lf); int isfleeing(lifeform_t *lf); int isfreebp(lifeform_t *lf, enum BODYPART bp); int isgenius(lifeform_t *lf); int isingunrange(lifeform_t *lf, cell_t *where); int isimmobile(lifeform_t *lf); int ispeaceful(lifeform_t *lf); int isplayer(lifeform_t *lf); int ispolymorphed(lifeform_t *lf); void killjob(job_t *job); void killlf(lifeform_t *lf); void killrace(race_t *race); int losehp(lifeform_t *lf, unsigned int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc); int losehp_real(lifeform_t *lf, unsigned int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int reducedam); void makenoise(lifeform_t *lf, enum NOISETYPE nid); void maycastspellschool(flagpile_t *fp, enum SPELLSCHOOL ss); int modattr(lifeform_t *lf, enum ATTRIB attr, int amt); void modhunger(lifeform_t *lf, int amt); void outfitlf(lifeform_t *lf); int pickup(lifeform_t *lf, object_t *what, int howmany); void precalclos(lifeform_t *lf); int push(lifeform_t *lf, object_t *o, int dir); void relinklf(lifeform_t *src, map_t *dst); int rest(lifeform_t *lf, int onpurpose); void startresting(lifeform_t *lf); int rolldex(enum DEXBRACKET bracket); int rolliq(enum IQBRACKET bracket); int rollstr(enum STRBRACKET bracket); int savingthrow(lifeform_t *lf, enum ATTRIB attr); int scare(lifeform_t *lf, lifeform_t *scarer, int howlong); int setammo(lifeform_t *lf, object_t *o); void setattr(lifeform_t *lf, enum ATTRIB attr, int val); void setguntarget(lifeform_t *lf, lifeform_t *targ); void setrace(lifeform_t *lf, enum RACE rid); void setlastdam(lifeform_t *lf, char *buf); int shoot(lifeform_t *lf); void sortlf(map_t *map, lifeform_t *lf); void stopresting(lifeform_t *lf); void stoprunning(lifeform_t *lf); int takeoff(lifeform_t *lf, object_t *o); void taketime(lifeform_t *lf, long howlong); int throwat(lifeform_t *thrower, object_t *o, cell_t *where); void timeeffectslf(lifeform_t *lf); void turneffectslf(lifeform_t *lf); int touch(lifeform_t *lf, object_t *o); int unweild(lifeform_t *lf, object_t *o); int useability(lifeform_t *lf, enum OBTYPE aid); int usestairs(lifeform_t *lf, object_t *o); int validateraces(void); int wear(lifeform_t *lf, object_t *o); int weild(lifeform_t *lf, object_t *o); int youhear(cell_t *c, char *text);