version 1.11 | | version 1.12 |
---|
| | |
/* | | /* |
* static char *rcsid_item_c = | | * static char *rcsid_item_c = |
* "$Id: item.c,v 1.11 2000/11/08 07:19:37 cvs Exp $"; | | * "$Id: item.c,v 1.12 2000/11/26 07:20:11 peterm Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
sprintf(buf+strlen(buf), "(ac%+d)", op->stats.ac); | | sprintf(buf+strlen(buf), "(ac%+d)", op->stats.ac); |
if(op->armour) | | if(op->armour) |
sprintf(buf+strlen(buf), "(armour%+d)", op->armour); | | sprintf(buf+strlen(buf), "(armour%+d)", op->armour); |
if (op->stats.food > 0) | | if (op->stats.food != 0) |
sprintf(buf+strlen(buf), "(sustenance%+d)", op->stats.food); | | sprintf(buf+strlen(buf), "(sustenance%+d)", op->stats.food); |
else if (op->stats.food < 0) | | /* else if (op->stats.food < 0) |
sprintf(buf+strlen(buf), "(hunger%+d)", op->stats.food); | | sprintf(buf+strlen(buf), "(hunger%+d)", op->stats.food); */ |
if(op->stats.grace) | | if(op->stats.grace) |
sprintf(buf+strlen(buf), "(grace%+d)", op->stats.grace); | | sprintf(buf+strlen(buf), "(grace%+d)", op->stats.grace); |
if(op->stats.sp && op->type!=SKILL) | | if(op->stats.sp && op->type!=SKILL) |
| | |
break; | | break; |
default: | | default: |
if(op->stats.food) { | | if(op->stats.food) { |
if(op->stats.food>0) | | if(op->stats.food!=0) |
sprintf(buf,"(sustenance%+d)",op->stats.food); | | sprintf(buf,"(sustenance%+d)",op->stats.food); |
else | | /* else |
sprintf(buf,"(hunger%+d)",op->stats.food); | | sprintf(buf,"(hunger%+d)",op->stats.food); */ |
strcat(retbuf,buf); | | strcat(retbuf,buf); |
} | | } |
if(op->stats.grace) { | | if(op->stats.grace) { |
| | |
} | | } |
} else if(op->type == PLAYER) { | | } else if(op->type == PLAYER) { |
if(op->contr->digestion) { | | if(op->contr->digestion) { |
if(op->contr->digestion>0) | | if(op->contr->digestion!=0) |
sprintf(buf,"(sustenance%+d)",op->contr->digestion); | | sprintf(buf,"(sustenance%+d)",op->contr->digestion); |
else | | /* else |
sprintf(buf,"(hunger%+d)",op->contr->digestion); | | sprintf(buf,"(hunger%+d)",op->contr->digestion); */ |
strcat(retbuf,buf); | | strcat(retbuf,buf); |
} | | } |
if(op->contr->gen_grace) { | | if(op->contr->gen_grace) { |