… | |
… | |
3175 | /* determine_god() seems to not work sometimes... why is this? |
3175 | /* determine_god() seems to not work sometimes... why is this? |
3176 | Should I be using something else? GD */ |
3176 | Should I be using something else? GD */ |
3177 | const char *god = determine_god (op); |
3177 | const char *god = determine_god (op); |
3178 | |
3178 | |
3179 | if (god && (strcmp (god, "none"))) |
3179 | if (god && (strcmp (god, "none"))) |
3180 | new_draw_info_format (NDI_UNIQUE, 0, op, "For a brief " "moment you feel the holy presence of %s protecting" " you.", god); |
3180 | new_draw_info_format (NDI_UNIQUE, 0, op, "For a brief moment you feel the holy presence of %s protecting" " you.", god); |
3181 | else |
3181 | else |
3182 | new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you" " feel a holy presence protecting you."); |
3182 | new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you feel a holy presence protecting you."); |
3183 | } |
3183 | } |
|
|
3184 | #else |
|
|
3185 | new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you" " feel a holy presence protecting you from losing yourself completely."); |
3184 | #endif |
3186 | #endif |
3185 | new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you" " feel a holy presence protecting you from losing yourself completely."); |
|
|
3186 | |
3187 | |
3187 | /* Put a gravestone up where the character 'almost' died. List the |
3188 | /* Put a gravestone up where the character 'almost' died. List the |
3188 | * exp loss on the stone. |
3189 | * exp loss on the stone. |
3189 | */ |
3190 | */ |
3190 | tmp = arch_to_object (archetype::find ("gravestone")); |
3191 | tmp = arch_to_object (archetype::find ("gravestone")); |
… | |
… | |
3195 | sprintf (buf, "RIP\nHere rests the hero %s the %s,\n" "who was killed\n" "by %s.\n", &op->name, op->contr->title, op->contr->killer); |
3196 | sprintf (buf, "RIP\nHere rests the hero %s the %s,\n" "who was killed\n" "by %s.\n", &op->name, op->contr->title, op->contr->killer); |
3196 | tmp->msg = buf; |
3197 | tmp->msg = buf; |
3197 | tmp->x = op->x, tmp->y = op->y; |
3198 | tmp->x = op->x, tmp->y = op->y; |
3198 | insert_ob_in_map (tmp, op->map, NULL, 0); |
3199 | insert_ob_in_map (tmp, op->map, NULL, 0); |
3199 | |
3200 | |
3200 | /**************************************/ |
3201 | /**************************************/ |
3201 | /* */ |
3202 | /* */ |
3202 | /* Subtract the experience points, */ |
3203 | /* Subtract the experience points, */ |
3203 | /* if we died cause of food, give us */ |
3204 | /* if we died cause of food, give us */ |
3204 | /* food, and reset HP's... */ |
3205 | /* food, and reset HP's... */ |
3205 | /* */ |
3206 | /* */ |
3206 | |
|
|
3207 | /**************************************/ |
3207 | /**************************************/ |
3208 | |
3208 | |
3209 | /* remove any poisoning and confusion the character may be suffering. */ |
3209 | /* remove any poisoning and confusion the character may be suffering. */ |
3210 | /* restore player */ |
3210 | /* restore player */ |
3211 | at = archetype::find ("poisoning"); |
3211 | at = archetype::find ("poisoning"); |
3212 | tmp = present_arch_in_ob (at, op); |
3212 | tmp = present_arch_in_ob (at, op); |
… | |
… | |
3223 | { |
3223 | { |
3224 | remove_ob (tmp); |
3224 | remove_ob (tmp); |
3225 | free_object (tmp); |
3225 | free_object (tmp); |
3226 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); |
3226 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); |
3227 | } |
3227 | } |
|
|
3228 | |
3228 | cure_disease (op, 0); /* remove any disease */ |
3229 | cure_disease (op, 0); /* remove any disease */ |
3229 | |
3230 | |
3230 | /*add_exp(op, (op->stats.exp * -0.20)); */ |
3231 | /*add_exp(op, (op->stats.exp * -0.20)); */ |
3231 | apply_death_exp_penalty (op); |
3232 | apply_death_exp_penalty (op); |
3232 | if (op->stats.food < 100) |
3233 | if (op->stats.food < 100) |
… | |
… | |
3242 | */ |
3243 | */ |
3243 | |
3244 | |
3244 | if (is_in_shop (op)) |
3245 | if (is_in_shop (op)) |
3245 | remove_unpaid_objects (op->inv, op); |
3246 | remove_unpaid_objects (op->inv, op); |
3246 | |
3247 | |
3247 | /****************************************/ |
3248 | /****************************************/ |
3248 | /* */ |
3249 | /* */ |
3249 | /* Move player to his current respawn- */ |
3250 | /* Move player to his current respawn- */ |
3250 | /* position (usually last savebed) */ |
3251 | /* position (usually last savebed) */ |
3251 | /* */ |
3252 | /* */ |
3252 | |
|
|
3253 | /****************************************/ |
3253 | /****************************************/ |
3254 | |
3254 | |
3255 | enter_player_savebed (op); |
3255 | enter_player_savebed (op); |
3256 | |
3256 | |
3257 | /* Save the player before inserting the force to reduce |
3257 | /* Save the player before inserting the force to reduce |
3258 | * chance of abuse. |
3258 | * chance of abuse. |
… | |
… | |
3265 | * spell effects. So first see if there is a spell effect |
3265 | * spell effects. So first see if there is a spell effect |
3266 | * on the space that might harm the player. |
3266 | * on the space that might harm the player. |
3267 | */ |
3267 | */ |
3268 | will_kill_again = 0; |
3268 | will_kill_again = 0; |
3269 | for (tmp = get_map_ob (op->map, op->x, op->y); tmp; tmp = tmp->above) |
3269 | for (tmp = get_map_ob (op->map, op->x, op->y); tmp; tmp = tmp->above) |
3270 | { |
|
|
3271 | if (tmp->type == SPELL_EFFECT) |
3270 | if (tmp->type == SPELL_EFFECT) |
3272 | will_kill_again |= tmp->attacktype; |
3271 | will_kill_again |= tmp->attacktype; |
3273 | } |
3272 | |
3274 | if (will_kill_again) |
3273 | if (will_kill_again) |
3275 | { |
3274 | { |
3276 | object *force; |
3275 | object *force; |
3277 | int at; |
3276 | int at; |
3278 | |
3277 | |
… | |
… | |
3280 | /* 50 ticks should be enough time for the spell to abate */ |
3279 | /* 50 ticks should be enough time for the spell to abate */ |
3281 | force->speed = 0.1; |
3280 | force->speed = 0.1; |
3282 | force->speed_left = -5.0; |
3281 | force->speed_left = -5.0; |
3283 | SET_FLAG (force, FLAG_APPLIED); |
3282 | SET_FLAG (force, FLAG_APPLIED); |
3284 | for (at = 0; at < NROFATTACKS; at++) |
3283 | for (at = 0; at < NROFATTACKS; at++) |
3285 | { |
|
|
3286 | if (will_kill_again & (1 << at)) |
3284 | if (will_kill_again & (1 << at)) |
3287 | force->resist[at] = 100; |
3285 | force->resist[at] = 100; |
3288 | } |
3286 | |
3289 | insert_ob_in_ob (force, op); |
3287 | insert_ob_in_ob (force, op); |
3290 | fix_player (op); |
3288 | fix_player (op); |
3291 | |
3289 | |
3292 | } |
3290 | } |
3293 | |
3291 | |