Difference for server/spell_effect.c from version 1.93 to 1.94


version 1.93 version 1.94
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_effect_c =   * static char *rcsid_spell_effect_c =
  *   "$Id: spell_effect.c,v 1.93 2003/01/27 07:34:34 mwedel Exp $";   *   "$Id: spell_effect.c,v 1.94 2003/01/30 00:07:09 garbled Exp $";
  */   */
   
   
Line 3447
 
Line 3447
     sint16 x, y;      sint16 x, y;
     int magic;      int magic;
     mapstruct *m;      mapstruct *m;
       materialtype_t *mt;
    
     if(!at){      if(!at){
  new_draw_info(NDI_UNIQUE, 0,op,"Oops, program error!");   new_draw_info(NDI_UNIQUE, 0,op,"Oops, program error!");
Line 3567
 
Line 3568
     if ( ! tmp->attacktype)      if ( ! tmp->attacktype)
  tmp->attacktype = AT_PHYSICAL;   tmp->attacktype = AT_PHYSICAL;
   
     for(i=0; i<NROFMATERIALS; i++)      mt = NULL;
  for(j=0; j<NROFATTACKS; j++)      if (op->materialname != NULL)
      if(weapon->material & (1<<i)) {   mt = name_to_material(op->materialname);
  /* There was code here to try to even out the saving      if (mt != NULL) {
  * throws.  This is probably not ideal, but works   for (i=0; i < NROFATTACKS; i++)
  * for the time being.       tmp->resist[i] = 50 - (mt->save[i] * 5);
  */   a = mt->save[0];
  if(material[i].save[j] < 3)      } else {
      tmp->resist[j] = 40;   for (i=0; i < NROFATTACKS; i++)
  else if(material[i].save[j] > 14)        tmp->resist[i] = 5;
      tmp->resist[j] = -50;   a = 10;
      }       }
   
     /* Set weapon's immunity */      /* Set weapon's immunity */
     tmp->resist[ATNR_CONFUSION] = 100;      tmp->resist[ATNR_CONFUSION] = 100;
     tmp->resist[ATNR_POISON] = 100;      tmp->resist[ATNR_POISON] = 100;
Line 3592
 
Line 3592
     tmp->resist[ATNR_BLIND] = 100;      tmp->resist[ATNR_BLIND] = 100;
   
     /* Improve weapon's armour value according to best save vs. physical of its material */      /* Improve weapon's armour value according to best save vs. physical of its material */
     for(a=0,i=0; i<NROFMATERIALS; i++) {  
  if(weapon->material & (1<<i) && material[i].save[0] > a) {  
      a = material[i].save[0];  
  }  
     }  
   
     tmp->resist[ATNR_PHYSICAL] = 100 - (int)((100.0-(float)tmp->resist[ATNR_PHYSICAL])/(30.0-2.0*(a>14?14.0:(float)a)));      tmp->resist[ATNR_PHYSICAL] = 100 - (int)((100.0-(float)tmp->resist[ATNR_PHYSICAL])/(30.0-2.0*(a>14?14.0:(float)a)));
 /*    LOG (llevDebug, "animate_weapon: slaying %s\n", tmp->slaying ? tmp->slaying : "nothing"); */  /*    LOG (llevDebug, "animate_weapon: slaying %s\n", tmp->slaying ? tmp->slaying : "nothing"); */


Legend:
line(s) removed in v.1.93 
line(s) changed
 line(s) added in v.1.94

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