Difference for server/disease.c from version 1.17 to 1.18


version 1.17 version 1.18
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_disease_c =   * static char *rcsid_disease_c =
  *   "$Id: disease.c,v 1.17 2001/07/14 04:11:18 mwedel Exp $";   *   "$Id: disease.c,v 1.18 2001/09/26 21:34:08 garbled Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 265
 
Line 265
   if(!is_susceptible_to_disease(victim, disease)) return 0;    if(!is_susceptible_to_disease(victim, disease)) return 0;
   
   /* roll the dice on infection before doing the inventory check!  */    /* roll the dice on infection before doing the inventory check!  */
   if(!force && (RANDOM() % 127 >= disease->stats.wc)) return 0;    if(!force && (random_roll(0, 126, victim, PREFER_HIGH) >= disease->stats.wc))
       return 0;
   
   /* do an immunity check */    /* do an immunity check */
   if(victim->head) tmp = victim->head->inv;    if(victim->head) tmp = victim->head->inv;
Line 376
 
Line 377
       if(disease->stats.dam != 0) {        if(disease->stats.dam != 0) {
  int dam = disease->stats.dam;   int dam = disease->stats.dam;
  /* reduce the damage, on average, 50%, and making things random. */   /* reduce the damage, on average, 50%, and making things random. */
  dam = RANDOM() % dam +1;   dam = random_roll(1, dam, victim, PREFER_LOW);
  if(disease->stats.dam < 0) dam = -dam;   if(disease->stats.dam < 0) dam = -dam;
  new_symptom->stats.dam = dam;   new_symptom->stats.dam = dam;
       }        }
Line 552
 
Line 553
       * is 1 in 5.        * is 1 in 5.
       */        */
      if ((casting_level >= disease->level) ||       if ((casting_level >= disease->level) ||
  ( ! (RANDOM() % ( disease->level - casting_level)))) {   ( ! (random_roll(0, (disease->level - casting_level - 1),
      caster, PREFER_LOW) ))) {
   
      remove_symptoms(disease);       remove_symptoms(disease);
      remove_ob(disease);       remove_ob(disease);


Legend:
line(s) removed in v.1.17 
line(s) changed
 line(s) added in v.1.18

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:32