version 1.36 | | version 1.37 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.36 2001/04/27 06:16:38 mwedel Exp $"; | | * "$Id: apply.c,v 1.37 2001/05/25 04:29:01 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
static void apply_food (object *op, object *tmp) | | static void apply_food (object *op, object *tmp) |
{ | | { |
int capacity_remaining; | | int capacity_remaining; |
| | |
if(op->type!=PLAYER) | | if(op->type!=PLAYER) |
op->stats.hp=op->stats.maxhp; | | op->stats.hp=op->stats.maxhp; |
else { | | else { |
| | |
/* check for hp, sp change */ | | /* check for hp, sp change */ |
if(food->stats.hp!=0) { | | if(food->stats.hp!=0) { |
if(QUERY_FLAG(food, FLAG_CURSED)) { | | if(QUERY_FLAG(food, FLAG_CURSED)) { |
| | strcpy(who->contr->killer,food->name); |
| | hit_player(who, food->stats.hp, food, AT_POISON); |
new_draw_info(NDI_UNIQUE, 0,who,"Eck!...that was poisonous!"); | | new_draw_info(NDI_UNIQUE, 0,who,"Eck!...that was poisonous!"); |
who->stats.hp -= food->stats.hp; | | |
} else { | | } else { |
if(food->stats.hp>0) | | if(food->stats.hp>0) |
new_draw_info(NDI_UNIQUE, 0,who,"You begin to feel better."); | | new_draw_info(NDI_UNIQUE, 0,who,"You begin to feel better."); |