version 1.22 | | version 1.23 |
---|
| | |
/* | | /* |
* static char *rcsid_living_c = | | * static char *rcsid_living_c = |
* "$Id: living.c,v 1.22 2001/02/01 05:02:55 cvs Exp $"; | | * "$Id: living.c,v 1.23 2001/03/11 03:15:18 avogl Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
int flag=QUERY_FLAG(tmp,FLAG_APPLIED)?1:-1,i,j,success=0; | | int flag=QUERY_FLAG(tmp,FLAG_APPLIED)?1:-1,i,j,success=0; |
object refop; | | object refop; |
char message[MAX_BUF]; | | char message[MAX_BUF]; |
| | int potion_max=0; |
| | |
/* remember what object was like before it was changed. note that | | /* remember what object was like before it was changed. note that |
* refop is a local copy of op only to be used for detecting changes | | * refop is a local copy of op only to be used for detecting changes |
| | |
tmp->stats.sp=0;/* Fix it up for super potions */ | | tmp->stats.sp=0;/* Fix it up for super potions */ |
} | | } |
else { | | else { |
set_attr_value(&(tmp->stats),j,0); | | /* potion is useless - player has already hit the natural maximum */ |
| | potion_max = 1; |
} | | } |
} | | } |
/* This section of code ups the characters normal stats also. I am not | | /* This section of code ups the characters normal stats also. I am not |
| | |
} | | } |
} | | } |
| | |
if(tmp->type!=EXPERIENCE) { | | if(tmp->type!=EXPERIENCE && !potion_max) { |
for (j=0; j<7; j++) { | | for (j=0; j<7; j++) { |
if ((i=get_attr_value(&(tmp->stats),j))!=0) { | | if ((i=get_attr_value(&(tmp->stats),j))!=0) { |
success=1; | | success=1; |
| | |
&& (tmp->type!=EXPERIENCE || !strcmp(tmp->arch->name, "experience_wis")) | | && (tmp->type!=EXPERIENCE || !strcmp(tmp->arch->name, "experience_wis")) |
#endif | | #endif |
) { | | ) { |
| | if (tmp->type != POTION) { |
for(i=0;i<7;i++) | | for(i=0;i<7;i++) |
change_attr_value(&(op->stats),i,get_attr_value(&(tmp->stats),i)); | | change_attr_value(&(op->stats),i,get_attr_value(&(tmp->stats),i)); |
| | } |
/* these are the items that currently can change digestion, regeneration, | | /* these are the items that currently can change digestion, regeneration, |
* spell point recovery and mana point recovery. Seems sort of an arbitary | | * spell point recovery and mana point recovery. Seems sort of an arbitary |
* list, but other items store other info into stats array. */ | | * list, but other items store other info into stats array. */ |