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

Comparing deliantra/server/server/disease.C (file contents):
Revision 1.54 by root, Fri Nov 6 12:49:19 2009 UTC vs.
Revision 1.57 by root, Sat Nov 7 18:30:06 2009 UTC

157 { 157 {
158 walk->level = disease->level; 158 walk->level = disease->level;
159 return 1; /* just update the existing immunity. */ 159 return 1; /* just update the existing immunity. */
160 } 160 }
161 161
162 immunity = get_archetype ("immunity"); 162 immunity = get_archetype (shstr_immunity);
163 163
164 immunity->name = disease->name; 164 immunity->name = disease->name;
165 immunity->level = disease->level; 165 immunity->level = disease->level;
166 immunity->move_block = 0; 166 immunity->move_block = 0;
167 167
292 for (tmp = victim->head_ ()->inv; tmp; tmp = tmp->below) 292 for (tmp = victim->head_ ()->inv; tmp; tmp = tmp->below)
293 if (tmp->type == SIGN) /* possibly an immunity, or diseased */ 293 if (tmp->type == SIGN) /* possibly an immunity, or diseased */
294 if (tmp->name == disease->name && tmp->level >= disease->level) 294 if (tmp->name == disease->name && tmp->level >= disease->level)
295 return 0; /* Immune! */ 295 return 0; /* Immune! */
296 296
297 object *new_symptom = get_archetype ("symptom"); 297 object *new_symptom = get_archetype (shstr_symptom);
298 298
299 /* Something special done with dam. We want diseases to be more 299 /* Something special done with dam. We want diseases to be more
300 * random in what they'll kill, so we'll make the damage they 300 * random in what they'll kill, so we'll make the damage they
301 * do random, note, this has a weird effect with progressive diseases. 301 * do random, note, this has a weird effect with progressive diseases.
302 */ 302 */
570 for (object *disease = hitter->inv; disease; disease = disease->below) 570 for (object *disease = hitter->inv; disease; disease = disease->below)
571 if (disease->type == DISEASE) 571 if (disease->type == DISEASE)
572 infect_object (victim, disease, 0); 572 infect_object (victim, disease, 0);
573 573
574 return 1; 574 return 1;
575}
576
577// find a disease in someone
578static object *
579find_disease (object *victim)
580{
581 for (object *disease = victim->inv; disease; disease = disease->below)
582 if (disease->type == DISEASE)
583 return disease;
584
585 return 0;
586} 575}
587 576
588/* do the cure disease stuff, from the spell "cure disease" */ 577/* do the cure disease stuff, from the spell "cure disease" */
589int 578int
590cure_disease (object *sufferer, object *caster, object *spell) 579cure_disease (object *sufferer, object *caster, object *spell)
628 } 617 }
629 618
630 return 1; 619 return 1;
631} 620}
632 621
622#if 0 // unused, but seems interesting
633/* reduces disease progression: reduce_symptoms 623/* reduces disease progression: reduce_symptoms
634 * return true if we actually reduce a disease. 624 * return true if we actually reduce a disease.
635 */ 625 */
636int 626static int
637reduce_symptoms (object *sufferer, int reduction) 627reduce_symptoms (object *sufferer, int reduction)
638{ 628{
639 object *walk; 629 object *walk;
640 int success = 0; 630 int success = 0;
641 631
657 if (success) 647 if (success)
658 new_draw_info (NDI_UNIQUE, 0, sufferer, "Your illness seems less severe."); 648 new_draw_info (NDI_UNIQUE, 0, sufferer, "Your illness seems less severe.");
659 649
660 return success; 650 return success;
661} 651}
652#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines