--- deliantra/server/include/define.h 2007/07/01 05:00:18 1.62 +++ deliantra/server/include/define.h 2007/08/28 02:37:15 1.70 @@ -74,11 +74,13 @@ #define MAX_AC 120 #define MIN_DAM 0 #define MAX_DAM 200 +#define MIN_DIGESTION -35 +#define MAX_DIGESTION 70 #define MAX_BUF 1024 /* Used for all kinds of things */ #define VERY_BIG_BUF 2048 -#define HUGE_BUF 4096 /* Used for messages - some can be quite long */ +#define HUGE_BUF 10240 /* Used for messages - some can be quite long */ #define SOCKET_BUFLEN 4096 /* Max length a packet could be */ #define FONTSIZE 3000 /* Max chars in font */ @@ -186,13 +188,16 @@ #define FIREWALL 62 #define ANVIL 63 #define CHECK_INV 64 /* by b.t. thomas@nomad.astro.psu.edu */ -#define MOOD_FLOOR 65 /* by b.t. thomas@nomad.astro.psu.edu +#define MOOD_FLOOR 65 /* * values of last_sp set how to change: * 0 = furious, all monsters become aggressive * 1 = angry, all but friendly become aggressive * 2 = calm, all aggressive monsters calm down * 3 = sleep, all monsters fall asleep - * 4 = charm, monsters become pets */ + * 4 = charm, monsters become pets + * 5 = destroy monsters + * 6 = destroy pets / friendlies + */ #define EXIT 66 #define ENCOUNTER 67 #define SHOP_FLOOR 68 @@ -239,6 +244,7 @@ #define WAND 109 +#define INSCRIBABLE 110 // inscribable things, st 0 book st 1 spell #define SCROLL 111 #define DIRECTOR 112 #define GIRDLE 113 @@ -778,94 +784,6 @@ #define PREFER_HIGH 1 #define PREFER_LOW 0 -/* Simple function we use below to keep adding to the same string - * but also make sure we don't overwrite that string. - */ -static inline void -safe_strcat (char *dest, const char *orig, int *curlen, int maxlen) -{ - if (*curlen == (maxlen - 1)) - return; - - strncpy (dest + *curlen, orig, maxlen - *curlen - 1); - dest[maxlen - 1] = 0; - *curlen += strlen (orig); - - if (*curlen > (maxlen - 1)) - *curlen = maxlen - 1; -} - - -/* The SAFE versions of these call the safe_strcat function above. - * Ideally, all functions should use the SAFE functions, but they - * require some extra support in the calling function to remain as - * efficient. - */ -#define DESCRIBE_ABILITY_SAFE(retbuf, variable, name, len, maxlen) \ - if(variable) { \ - int i,j=0; \ - safe_strcat(retbuf,"(" name ": ", len, maxlen); \ - for(i=0; i