version 1.2 | | version 1.3 |
---|
| | |
/* | | /* |
* static char *rcsid_item_c = | | * static char *rcsid_item_c = |
* "$Id: item.c,v 1.2 1999/07/13 06:02:41 cvs Exp $"; | | * "$Id: item.c,v 1.3 1999/09/17 23:33:43 damn Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#include <living.h> | | #include <living.h> |
#include <spells.h> | | #include <spells.h> |
| | |
#define DESCRIBE_ABILITY(retbuf, variable, name) \ | | |
if(variable) { \ | | |
int i,j=0; \ | | |
strcat(retbuf,"(" name ": "); \ | | |
for(i=0; i<NROFATTACKS; i++) \ | | |
if(variable & (1<<i)) { \ | | |
if (j) \ | | |
strcat(retbuf,", "); \ | | |
else \ | | |
j = 1; \ | | |
strcat(retbuf, attacks[i]); \ | | |
} \ | | |
strcat(retbuf,")"); \ | | |
} | | |
| | |
static char numbers[21][20] = { | | static char numbers[21][20] = { |
"no","","two","three","four","five","six","seven","eight","nine","ten", | | "no","","two","three","four","five","six","seven","eight","nine","ten", |
"eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen", | | "eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen", |
| | |
| | |
char *describe_item(object *op) { | | char *describe_item(object *op) { |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
static char retbuf[VERY_BIG_BUF]; | | static char retbuf[VERY_BIG__BUF]; |
| | |
retbuf[0]='\0'; | | retbuf[0]='\0'; |
if(QUERY_FLAG(op,FLAG_MONSTER)) { | | if(QUERY_FLAG(op,FLAG_MONSTER)) { |