version 1.153 | | version 1.154 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.153 2004/09/19 17:13:54 akirschbaum Exp $"; | | * "$Id: player.c,v 1.154 2004/12/29 08:45:08 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
int this_stat; | | int this_stat; |
int killed_script_rtn; /* GROS: For script return value */ | | int killed_script_rtn; /* GROS: For script return value */ |
CFParm CFP; | | CFParm CFP; |
int evtid; | | int evtid, will_kill_again; |
archetype *at; | | archetype *at; |
object *tmp; | | object *tmp; |
event *evt; | | event *evt; |
| | |
* in the map. | | * in the map. |
*/ | | */ |
| | |
tmp= get_map_ob(op->map, op->x, op->y); | | for (tmp= get_map_ob(op->map, op->x, op->y); tmp; tmp=tmp->above) { |
if (tmp && tmp->type == SHOP_FLOOR) { | | if (tmp && tmp->type == SHOP_FLOOR) { |
remove_unpaid_objects(op->inv, op); | | remove_unpaid_objects(op->inv, op); |
} | | } |
| | } |
| | |
| | |
/****************************************/ | | /****************************************/ |
| | |
| | |
enter_player_savebed(op); | | enter_player_savebed(op); |
| | |
| | /* Save the player before inserting the force to reduce |
| | * chance of abuse. |
| | */ |
| | op->contr->braced=0; |
| | save_player(op,1); |
| | |
| | /* it is possible that the player has blown something up |
| | * at his savebed location, and that can have long lasting |
| | * spell effects. So first see if there is a spell effect |
| | * on the space that might harm the player. |
| | */ |
| | will_kill_again=0; |
| | for (tmp= get_map_ob(op->map, op->x, op->y); tmp; tmp=tmp->above) { |
| | if (tmp->type ==SPELL_EFFECT) |
| | will_kill_again|=tmp->attacktype; |
| | } |
| | if (will_kill_again) { |
| | object *force; |
| | int at; |
| | |
| | force=get_archetype(FORCE_NAME); |
| | /* 50 ticks should be enough time for the spell to abate */ |
| | force->speed=0.1; |
| | force->speed_left=-5.0; |
| | SET_FLAG(force, FLAG_APPLIED); |
| | for (at=0; at<NROFATTACKS; at++) { |
| | if (will_kill_again & (1 << at)) |
| | force->resist[at] = 100; |
| | } |
| | insert_ob_in_ob(force, op); |
| | fix_player(op); |
| | |
| | } |
/**************************************/ | | /**************************************/ |
/* */ | | /* */ |
/* Repaint the characters inv, and */ | | /* Repaint the characters inv, and */ |
| | |
/**************************************/ | | /**************************************/ |
| | |
new_draw_info(NDI_UNIQUE, 0,op,"YOU HAVE DIED."); | | new_draw_info(NDI_UNIQUE, 0,op,"YOU HAVE DIED."); |
op->contr->braced=0; | | |
save_player(op,1); | | |
return; | | return; |
} /* NOT_PERMADETH */ | | } /* NOT_PERMADETH */ |
else { | | else { |