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.22 by root, Sat May 12 18:38:44 2007 UTC vs.
Revision 1.23 by root, Mon May 14 21:32:27 2007 UTC

489 new_symptom->move_block = 0; 489 new_symptom->move_block = 0;
490 insert_ob_in_ob (new_symptom, victim); 490 insert_ob_in_ob (new_symptom, victim);
491 return 1; 491 return 1;
492 } 492 }
493 493
494 /* now deal with progressing diseases: we increase the debility 494 /* now deal with progressing diseases: we increase the debility
495 * caused by the symptoms. 495 * caused by the symptoms.
496 */ 496 */
497
498 if (disease->stats.ac != 0) 497 if (disease->stats.ac != 0)
499 { 498 {
500 float scale;
501
502 symptom->value += disease->stats.ac; 499 symptom->value += disease->stats.ac;
500
503 scale = 1.0 + symptom->value / 100.0; 501 float scale = 1.f + symptom->value / 100.f;
504 502
505 /* now rescale all the debilities */ 503 /* now rescale all the debilities */
506 for (int i = 0; i < NUM_STATS; ++i) 504 for (int i = 0; i < NUM_STATS; ++i)
507 symptom->stats.stat (i) = scale * disease->stats.stat (i); 505 symptom->stats.stat (i) = scale * disease->stats.stat (i);
508 506
516 514
517 symptom->msg = disease->msg; 515 symptom->msg = disease->msg;
518 symptom->attacktype = disease->attacktype; 516 symptom->attacktype = disease->attacktype;
519 symptom->other_arch = disease->other_arch; 517 symptom->other_arch = disease->other_arch;
520 } 518 }
519
521 SET_FLAG (symptom, FLAG_APPLIED); 520 SET_FLAG (symptom, FLAG_APPLIED);
522 victim->update_stats (); 521 victim->update_stats ();
522
523 return 1; 523 return 1;
524} 524}
525
526 525
527/* grants immunity to plagues we've seen before. */ 526/* grants immunity to plagues we've seen before. */
528int 527int
529grant_immunity (object *disease) 528grant_immunity (object *disease)
530{ 529{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines