version 1.18 | | version 1.19 |
---|
| | |
/* | | /* |
* static char *rcsid_item_c = | | * static char *rcsid_item_c = |
* "$Id: item.c,v 1.18 2001/07/14 04:04:53 mwedel Exp $"; | | * "$Id: item.c,v 1.19 2002/03/01 21:33:09 avogl Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
buf[0]=0; | | buf[0]=0; |
for (tmpvar=0; tmpvar<NROFATTACKS; tmpvar++) { | | for (tmpvar=0; tmpvar<NROFATTACKS; tmpvar++) { |
if (op->resist[tmpvar]) { | | if (op->resist[tmpvar] && (op->type != FLESH || atnr_is_dragon_enabled(tmpvar)==1)) { |
if (!newline) | | if (!newline) |
sprintf(buf1,"(%s %+d)", resist_plus[tmpvar], op->resist[tmpvar]); | | sprintf(buf1,"(%s %+d)", resist_plus[tmpvar], op->resist[tmpvar]); |
else | | else |
| | |
if(!need_identify(op) || QUERY_FLAG(op,FLAG_IDENTIFIED) || QUERY_FLAG(op,FLAG_BEEN_APPLIED)) { | | if(!need_identify(op) || QUERY_FLAG(op,FLAG_IDENTIFIED) || QUERY_FLAG(op,FLAG_BEEN_APPLIED)) { |
sprintf(buf,"(food+%d)", op->stats.food); | | sprintf(buf,"(food+%d)", op->stats.food); |
strcat(retbuf, buf); | | strcat(retbuf, buf); |
| | |
| | if (op->type == FLESH && op->last_eat>0 && atnr_is_dragon_enabled(op->last_eat)) { |
| | sprintf(buf, "(%s metabolism)", change_resist_msg[op->last_eat]); |
| | strcat(retbuf, buf); |
| | } |
| | |
if (!QUERY_FLAG(op,FLAG_CURSED)) { | | if (!QUERY_FLAG(op,FLAG_CURSED)) { |
if (op->stats.hp) | | if (op->stats.hp) |
strcat(retbuf,"(heals)"); | | strcat(retbuf,"(heals)"); |
| | |
} | | } |
if(!need_identify(op)||QUERY_FLAG(op,FLAG_IDENTIFIED)|| | | if(!need_identify(op)||QUERY_FLAG(op,FLAG_IDENTIFIED)|| |
QUERY_FLAG(op,FLAG_MONSTER)) { | | QUERY_FLAG(op,FLAG_MONSTER)) { |
/* if (op->attacktype != 1)*/ | | |
DESCRIBE_ABILITY(retbuf, op->attacktype, "Attacks"); | | /* describe attacktypes */ |
| | if (op->type == PLAYER && strcmp(op->race, "dragon")==0) { |
| | /* for dragon players display the attacktypes from clawing skill */ |
| | object *tmp; |
| | |
| | for (tmp=op->inv; tmp!=NULL && !(tmp->type == SKILL && |
| | strcmp(tmp->name, "clawing")==0); tmp=tmp->below); |
| | |
| | if (tmp != NULL && tmp->attacktype!=0) { |
| | DESCRIBE_ABILITY(retbuf, tmp->attacktype, "Claws");} |
| | else { |
| | DESCRIBE_ABILITY(retbuf, op->attacktype, "Attacks");} |
| | } |
| | else { |
| | DESCRIBE_ABILITY(retbuf, op->attacktype, "Attacks");} |
| | |
| | /* resistance on flesh is only visible for quetzals */ |
| | if (op->type != FLESH || QUERY_FLAG(op, FLAG_SEE_INVISIBLE)) |
strcat(retbuf,describe_resistance(op, 0)); | | strcat(retbuf,describe_resistance(op, 0)); |
DESCRIBE_PATH(retbuf, op->path_attuned, "Attuned"); | | DESCRIBE_PATH(retbuf, op->path_attuned, "Attuned"); |
DESCRIBE_PATH(retbuf, op->path_repelled, "Repelled"); | | DESCRIBE_PATH(retbuf, op->path_repelled, "Repelled"); |
DESCRIBE_PATH(retbuf, op->path_denied, "Denied"); | | DESCRIBE_PATH(retbuf, op->path_denied, "Denied"); |
} | | } |
| | |
return retbuf; | | return retbuf; |
} | | } |
| | |