ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/player.C
(Generate patch)

Comparing deliantra/server/server/player.C (file contents):
Revision 1.21 by root, Tue Sep 12 19:20:08 2006 UTC vs.
Revision 1.22 by root, Thu Sep 14 21:16:12 2006 UTC

2977 { 2977 {
2978 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "You have been defeated in combat!"); 2978 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "You have been defeated in combat!");
2979 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "Local medics have saved your life..."); 2979 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "Local medics have saved your life...");
2980 2980
2981 /* restore player */ 2981 /* restore player */
2982 at = find_archetype ("poisoning"); 2982 at = archetype::find ("poisoning");
2983 tmp = present_arch_in_ob (at, op); 2983 tmp = present_arch_in_ob (at, op);
2984 if (tmp) 2984 if (tmp)
2985 { 2985 {
2986 remove_ob (tmp); 2986 remove_ob (tmp);
2987 free_object (tmp); 2987 free_object (tmp);
2988 new_draw_info (NDI_UNIQUE, 0, op, "Your body feels cleansed"); 2988 new_draw_info (NDI_UNIQUE, 0, op, "Your body feels cleansed");
2989 } 2989 }
2990 2990
2991 at = find_archetype ("confusion"); 2991 at = archetype::find ("confusion");
2992 tmp = present_arch_in_ob (at, op); 2992 tmp = present_arch_in_ob (at, op);
2993 if (tmp) 2993 if (tmp)
2994 { 2994 {
2995 remove_ob (tmp); 2995 remove_ob (tmp);
2996 free_object (tmp); 2996 free_object (tmp);
3001 op->stats.hp = op->stats.maxhp; 3001 op->stats.hp = op->stats.maxhp;
3002 if (op->stats.food <= 0) 3002 if (op->stats.food <= 0)
3003 op->stats.food = 999; 3003 op->stats.food = 999;
3004 3004
3005 /* create a bodypart-trophy to make the winner happy */ 3005 /* create a bodypart-trophy to make the winner happy */
3006 tmp = arch_to_object (find_archetype ("finger")); 3006 tmp = arch_to_object (archetype::find ("finger"));
3007 if (tmp != NULL) 3007 if (tmp != NULL)
3008 { 3008 {
3009 sprintf (buf, "%s's finger", &op->name); 3009 sprintf (buf, "%s's finger", &op->name);
3010 tmp->name = buf; 3010 tmp->name = buf;
3011 sprintf (buf, " This finger has been cut off %s\n" 3011 sprintf (buf, " This finger has been cut off %s\n"
3108 lost_a_stat = 1; 3108 lost_a_stat = 1;
3109 } 3109 }
3110 else 3110 else
3111 { 3111 {
3112 /* deplete a stat */ 3112 /* deplete a stat */
3113 archetype *deparch = find_archetype ("depletion"); 3113 archetype *deparch = archetype::find ("depletion");
3114 object *dep; 3114 object *dep;
3115 3115
3116 dep = present_arch_in_ob (deparch, op); 3116 dep = present_arch_in_ob (deparch, op);
3117 if (!dep) 3117 if (!dep)
3118 { 3118 {
3188 new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you" " feel a holy presence protecting you from losing yourself completely."); 3188 new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you" " feel a holy presence protecting you from losing yourself completely.");
3189 3189
3190 /* Put a gravestone up where the character 'almost' died. List the 3190 /* Put a gravestone up where the character 'almost' died. List the
3191 * exp loss on the stone. 3191 * exp loss on the stone.
3192 */ 3192 */
3193 tmp = arch_to_object (find_archetype ("gravestone")); 3193 tmp = arch_to_object (archetype::find ("gravestone"));
3194 sprintf (buf, "%s's gravestone", &op->name); 3194 sprintf (buf, "%s's gravestone", &op->name);
3195 tmp->name = buf; 3195 tmp->name = buf;
3196 sprintf (buf, "%s's gravestones", &op->name); 3196 sprintf (buf, "%s's gravestones", &op->name);
3197 tmp->name_pl = buf; 3197 tmp->name_pl = buf;
3198 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); 3198 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);
3209 3209
3210 /**************************************/ 3210 /**************************************/
3211 3211
3212 /* remove any poisoning and confusion the character may be suffering. */ 3212 /* remove any poisoning and confusion the character may be suffering. */
3213 /* restore player */ 3213 /* restore player */
3214 at = find_archetype ("poisoning"); 3214 at = archetype::find ("poisoning");
3215 tmp = present_arch_in_ob (at, op); 3215 tmp = present_arch_in_ob (at, op);
3216 if (tmp) 3216 if (tmp)
3217 { 3217 {
3218 remove_ob (tmp); 3218 remove_ob (tmp);
3219 free_object (tmp); 3219 free_object (tmp);
3220 new_draw_info (NDI_UNIQUE, 0, op, "Your body feels cleansed"); 3220 new_draw_info (NDI_UNIQUE, 0, op, "Your body feels cleansed");
3221 } 3221 }
3222 3222
3223 at = find_archetype ("confusion"); 3223 at = archetype::find ("confusion");
3224 tmp = present_arch_in_ob (at, op); 3224 tmp = present_arch_in_ob (at, op);
3225 if (tmp) 3225 if (tmp)
3226 { 3226 {
3227 remove_ob (tmp); 3227 remove_ob (tmp);
3228 free_object (tmp); 3228 free_object (tmp);
3350 } 3350 }
3351 3351
3352 play_again (op); 3352 play_again (op);
3353 3353
3354 /* peterm: added to create a corpse at deathsite. */ 3354 /* peterm: added to create a corpse at deathsite. */
3355 tmp = arch_to_object (find_archetype ("corpse_pl")); 3355 tmp = arch_to_object (archetype::find ("corpse_pl"));
3356 sprintf (buf, "%s", &op->name); 3356 sprintf (buf, "%s", &op->name);
3357 tmp->name = tmp->name_pl = buf; 3357 tmp->name = tmp->name_pl = buf;
3358 tmp->level = op->level; 3358 tmp->level = op->level;
3359 tmp->x = x; 3359 tmp->x = x;
3360 tmp->y = y; 3360 tmp->y = y;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines