version 1.101 | | version 1.102 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.101 2002/11/13 00:26:13 garbled Exp $"; | | * "$Id: player.c,v 1.102 2002/11/13 05:24:54 garbled Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
p->last_weapon_sp= -1; | | p->last_weapon_sp= -1; |
p->peaceful=1; /* default peaceful */ | | p->peaceful=1; /* default peaceful */ |
p->do_los=1; | | p->do_los=1; |
#ifdef EXPLORE_MODE | | |
p->explore=0; | | p->explore=0; |
#endif | | |
| | |
strncpy(p->title,op->arch->clone.name,MAX_NAME); | | strncpy(p->title,op->arch->clone.name,MAX_NAME); |
op->race = add_string (op->arch->clone.race); | | op->race = add_string (op->arch->clone.race); |
| | |
GlobalEvent(&CFP); | | GlobalEvent(&CFP); |
#endif | | #endif |
if(op->stats.food<0) { | | if(op->stats.food<0) { |
#ifdef EXPLORE_MODE | | |
if (op->contr->explore) { | | if (op->contr->explore) { |
new_draw_info(NDI_UNIQUE, 0,op,"You would have starved, but you are"); | | new_draw_info(NDI_UNIQUE, 0,op,"You would have starved, but you are"); |
new_draw_info(NDI_UNIQUE, 0,op,"in explore mode, so..."); | | new_draw_info(NDI_UNIQUE, 0,op,"in explore mode, so..."); |
op->stats.food=999; | | op->stats.food=999; |
return; | | return; |
} | | } |
#endif /* EXPLORE_MODE */ | | |
sprintf(buf,"%s starved to death.",op->name); | | sprintf(buf,"%s starved to death.",op->name); |
strcpy(op->contr->killer,"starvation"); | | strcpy(op->contr->killer,"starvation"); |
} | | } |
else { | | else { |
#ifdef EXPLORE_MODE | | |
if (op->contr->explore) { | | if (op->contr->explore) { |
new_draw_info(NDI_UNIQUE, 0,op,"You would have died, but you are"); | | new_draw_info(NDI_UNIQUE, 0,op,"You would have died, but you are"); |
new_draw_info(NDI_UNIQUE, 0,op,"in explore mode, so..."); | | new_draw_info(NDI_UNIQUE, 0,op,"in explore mode, so..."); |
op->stats.hp=op->stats.maxhp; | | op->stats.hp=op->stats.maxhp; |
return; | | return; |
} | | } |
#endif /* EXPLORE_MODE */ | | |
sprintf(buf,"%s died.",op->name); | | sprintf(buf,"%s died.",op->name); |
} | | } |
play_sound_player_only(op->contr, SOUND_PLAYER_DIES,0,0); | | play_sound_player_only(op->contr, SOUND_PLAYER_DIES,0,0); |