#ifndef __OBJECTS_H #define __OBJECTS_H #include "defs.h" object_t *addemptyob(obpile_t *where, object_t *o); knowledge_t *addknowledge(enum OBCLASS id, char *hiddenname, int known); material_t *addmaterial(enum MATERIAL id, char *name, float weightrating); objectclass_t *addoc(enum OBCLASS id, char *name, char *desc, char glyph); object_t *addob(obpile_t *where, char *name); object_t *addobject(obpile_t *where, char *name, int canstack); obmod_t *addobmod(enum OBMOD id, char *suffix, enum BODYPART bp); obpile_t *addobpile(lifeform_t *owner, cell_t *where); objecttype_t *addot(int id, char *name, char *description, int material, float weight, int obclassid); void adjustdammaterial(unsigned int *dam, enum DAMTYPE damtype, enum MATERIAL mat); void adjustdamob(object_t *o, unsigned int *dam, enum DAMTYPE damtype); //void adjustprice(objecttype_t *ot, float *price ); void appendinscription(object_t *o, char *text); int blessob(object_t *o); void brightflash(cell_t *centre, int range, lifeform_t *immunelf); object_t *canstackob(obpile_t *op, object_t *match); object_t *canstacknewot(obpile_t *op, objecttype_t *match); int changemat(object_t *o, enum MATERIAL mat); void copyobprops(object_t *dst, object_t *src); int countnames(char **list); int countobs(obpile_t *op); int curseob(object_t *o); void damageallobs(object_t *exception, obpile_t *op, int howmuch, int damtype); void explodeob(object_t *o, flag_t *f, int bigness); void extinguish(object_t *o); material_t *findmaterial(int id); objectclass_t *findoc(int id); object_t *findobbyid(obpile_t *op, long oid); object_t *findobl(obpile_t *op, char let); // find object by letter obmod_t *findobmod(enum OBMOD id); objecttype_t *findot(enum OBTYPE id); objecttype_t *findotn(char *name); // find objecttype by name void fragments(cell_t *centre, char *what, int speed); void genhiddennames(void); int getcharges(object_t *o); int geteffecttime(int min, int max, enum BLESSTYPE isblessed); objecttype_t *getlinkspell(object_t *o); int getmissileaccuracy(lifeform_t *thrower, cell_t *where, object_t *missile, object_t *firearm, enum ATTRIB whichatt); int getobaccuracy(object_t *wep); int getobvalue(object_t *o); //int getobtypevalue(objecttype_t *ot); char *getaccuracyname(int accpct); object_t *getammo(lifeform_t *lf); object_t *getrandomammo(lifeform_t *lf); char *getdamname(enum DAMTYPE damtype); char *getdamnamenoun(enum DAMTYPE damtype); char *getfillingname(int nutrition); int getfirearmrange(object_t *o); int getfirearmspeed(object_t *o); char getglyph(object_t *o); char *genhiddenname(enum OBCLASS id); char *gethiddenname(object_t *o); int getobattackdelay(object_t *o); int getletindex(char let); int getmaterialvalue(enum MATERIAL mat ); int getmaxthrowrange(lifeform_t *lf, object_t *o); char getnextletter(obpile_t *op, char *wantletter); int getnumshards(object_t *o); int getnutritionbase(object_t *o); int getnutrition(object_t *o); char *getobdesc(object_t *o, char *buf); cell_t *getoblocation(object_t *o); char *getobname(object_t *o, char *buf, int count); char *real_getobname(object_t *o, char *buf, int count, int wantcondition, int adjustforblind, int wantblesscurse); float getobpileweight(obpile_t *op); char *getobconditionname(object_t *o, char *buf); char *getobhurtname(object_t *o, enum DAMTYPE damtype); float getobweight(object_t *o); float getobunitweight(object_t *o); objecttype_t *getoppositestairs(objecttype_t *ot); char *real_getrandomob(map_t *map, char *buf, int cond, int cval, int forcedepth); char *getrandomob(map_t *map, char *buf); char *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf); char *getrandomobwithclass(map_t *map, enum OBCLASS cid, char *buf); char *getschoolname(enum SPELLSCHOOL sch); int getshatterdam(object_t *o); int getthrowdam(object_t *o); int hasedibleob(obpile_t *op); object_t *hasknownob(obpile_t *op, enum OBTYPE oid); object_t *hasob(obpile_t *op, enum OBTYPE oid); object_t *hasobofclass(obpile_t *op, enum OBCLASS cid); object_t *hasobmulti(obpile_t *op, enum OBTYPE *oid, int noids); object_t *hasobwithflag(obpile_t *op, enum FLAG flagid); object_t *hasobwithflagval(obpile_t *op, enum FLAG flagid, int val0, int val1, int val2, char *text); object_t *hasobid(obpile_t *op, int id); void identify(object_t *o); void initobjects(void); flag_t *isarmour(object_t *o); int isactivated(object_t *o); int isammofor(object_t *ammo, object_t *gun); int isbetterarmourthan(object_t *a, object_t *b); int isbetterwepthan(object_t *a, object_t *b); int isblessed(object_t *o); int isblessknown(object_t *o); int iscorpse(object_t *o); int iscursed(object_t *o); int isdangerousob(object_t *o, lifeform_t *lf, int onlyifknown); int isdrinkable(object_t *o); int isedible(object_t *o); flag_t *isequipped(object_t *o); int isequippedon(object_t *o, enum BODYPART bp); int isfirearm(object_t *o); int isflammable(object_t *o); int isknown(object_t *o); int isidentified(object_t *o); int ismetal(enum MATERIAL mat); int ismissile(object_t *o); int isoperable(object_t *o); int isplainob(object_t *o); int ispourable(object_t *o); int ispushable(object_t *o); int isreadable(object_t *o); int isrotting(object_t *o); int isweapon(object_t *o); int iswearable(object_t *o); void killmaterial(material_t *m); void killob(object_t *o); void killobpile(obpile_t *o); void killoc(objectclass_t *oc); void killot(objecttype_t *ot); lifeform_t *makeanimated(lifeform_t *lf, object_t *o, int level); void makeknown(enum OBTYPE otid); object_t *moveob(object_t *src, obpile_t *dst, int howmany); void modbonus(object_t *o, int amt); //object_t *newobeffects(object_t *o); void obaction(object_t *o, char *text); object_t *obexists(enum OBTYPE obid); void obdie(object_t *o); int obfits(object_t *o, obpile_t *op); enum DAMTYPE oblastdamtype(object_t *o); int obmodappliesto(obmod_t *om, objecttype_t *ot); flag_t *obproduceslight(object_t *o); int obpropsmatch(object_t *a, object_t *b); int obotpropsmatch(object_t *a, objecttype_t *b); int operate(lifeform_t *lf, object_t *o, cell_t *where); int pilehasletter(obpile_t *op, char let); void potioneffects(lifeform_t *lf, enum OBTYPE oid, enum BLESSTYPE isblessed, int *seen); int pour(lifeform_t *lf, object_t *o); void quaff(lifeform_t *lf, object_t *o); void readsomething(lifeform_t *lf, object_t *o); void removedeadobs(obpile_t *op); int removeob(object_t *o, int howmany); object_t *relinkob(object_t *src, obpile_t *dst); void setblessed(object_t *o, enum BLESSTYPE wantbless); void setinscription(object_t *o, char *text); object_t *splitob(object_t *o); int takedamage(object_t *o, unsigned int howmuch, int damtype); int fireat(lifeform_t *thrower, object_t *o, cell_t *where, int speed, object_t *firearm); void timeeffectsob(object_t *o); void turnoff(lifeform_t *lf, object_t *o); void turnon(lifeform_t *lf, object_t *o); int usecharge(object_t *o); int validateobs(void); int willshatter(enum MATERIAL mat); #endif