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.21 by root, Tue May 1 05:48:20 2007 UTC vs.
Revision 1.22 by root, Sat May 12 18:38:44 2007 UTC

465 new_symptom->name = new_symptom->name_pl = disease->name; 465 new_symptom->name = new_symptom->name_pl = disease->name;
466 466
467 new_symptom->level = disease->level; 467 new_symptom->level = disease->level;
468 new_symptom->speed = disease->speed; 468 new_symptom->speed = disease->speed;
469 new_symptom->value = 0; 469 new_symptom->value = 0;
470
471 for (int i = 0; i < NUM_STATS; ++i)
470 new_symptom->stats.Str = disease->stats.Str; 472 new_symptom->stats.stat (i) = disease->stats.stat (i);
471 new_symptom->stats.Dex = disease->stats.Dex; 473
472 new_symptom->stats.Con = disease->stats.Con;
473 new_symptom->stats.Wis = disease->stats.Wis;
474 new_symptom->stats.Int = disease->stats.Int;
475 new_symptom->stats.Pow = disease->stats.Pow;
476 new_symptom->stats.Cha = disease->stats.Cha;
477 new_symptom->stats.sp = disease->stats.sp; 474 new_symptom->stats.sp = disease->stats.sp;
478 new_symptom->stats.food = disease->last_eat; 475 new_symptom->stats.food = disease->last_eat;
479 new_symptom->stats.maxsp = disease->stats.maxsp; 476 new_symptom->stats.maxsp = disease->stats.maxsp;
480 new_symptom->last_sp = disease->last_sp; 477 new_symptom->last_sp = disease->last_sp;
481 new_symptom->stats.exp = 0; 478 new_symptom->stats.exp = 0;
502 { 499 {
503 float scale; 500 float scale;
504 501
505 symptom->value += disease->stats.ac; 502 symptom->value += disease->stats.ac;
506 scale = 1.0 + symptom->value / 100.0; 503 scale = 1.0 + symptom->value / 100.0;
504
507 /* now rescale all the debilities */ 505 /* now rescale all the debilities */
506 for (int i = 0; i < NUM_STATS; ++i)
508 symptom->stats.Str = (int) (scale * disease->stats.Str); 507 symptom->stats.stat (i) = scale * disease->stats.stat (i);
509 symptom->stats.Dex = (int) (scale * disease->stats.Dex); 508
510 symptom->stats.Con = (int) (scale * disease->stats.Con);
511 symptom->stats.Wis = (int) (scale * disease->stats.Wis);
512 symptom->stats.Int = (int) (scale * disease->stats.Int);
513 symptom->stats.Pow = (int) (scale * disease->stats.Pow);
514 symptom->stats.Cha = (int) (scale * disease->stats.Cha);
515 symptom->stats.dam = (int) (scale * disease->stats.dam); 509 symptom->stats.dam = scale * disease->stats.dam;
516 symptom->stats.sp = (int) (scale * disease->stats.sp); 510 symptom->stats.sp = scale * disease->stats.sp;
517 symptom->stats.food = (int) (scale * disease->last_eat); 511 symptom->stats.food = scale * disease->last_eat;
518 symptom->stats.maxsp = (int) (scale * disease->stats.maxsp); 512 symptom->stats.maxsp = scale * disease->stats.maxsp;
519 symptom->last_sp = (int) (scale * disease->last_sp); 513 symptom->last_sp = scale * disease->last_sp;
520 symptom->stats.exp = 0; 514 symptom->stats.exp = 0;
521 symptom->stats.hp = (int) (scale * disease->stats.hp); 515 symptom->stats.hp = scale * disease->stats.hp;
516
522 symptom->msg = disease->msg; 517 symptom->msg = disease->msg;
523 symptom->attacktype = disease->attacktype; 518 symptom->attacktype = disease->attacktype;
524 symptom->other_arch = disease->other_arch; 519 symptom->other_arch = disease->other_arch;
525 } 520 }
526 SET_FLAG (symptom, FLAG_APPLIED); 521 SET_FLAG (symptom, FLAG_APPLIED);
527 victim->update_stats (); 522 victim->update_stats ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines