Difference for server/spell_effect.c from version 1.81 to 1.82


version 1.81 version 1.82
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_effect_c =   * static char *rcsid_spell_effect_c =
  *   "$Id: spell_effect.c,v 1.81 2002/11/26 07:57:17 garbled Exp $";   *   "$Id: spell_effect.c,v 1.82 2002/12/03 07:40:18 mwedel Exp $";
  */   */
   
   
Line 42
 
Line 42
  * spell_failure()  handles the various effects for differing degrees   * spell_failure()  handles the various effects for differing degrees
  * of failure badness.   * of failure badness.
  */   */
 /* Might be a better way to do this, but this should work */  
 #define ISQRT(val) ((int)sqrt((double) val))  
   
 void spell_failure(object *op, int failure,int power)  void spell_failure(object *op, int failure,int power)
 {    { 
Line 81
 
Line 79
      tmp->x=op->x;tmp->y=op->y;       tmp->x=op->x;tmp->y=op->y;
   
      /* increase the area of destruction a little for more powerful spells */       /* increase the area of destruction a little for more powerful spells */
      tmp->stats.hp+=ISQRT(power);       tmp->stats.hp+=isqrt(power);
   
      if (power>25) tmp->stats.dam = 25 + ISQRT(power);       if (power>25) tmp->stats.dam = 25 + isqrt(power);
      else tmp->stats.dam=power; /* nasty recoils! */       else tmp->stats.dam=power; /* nasty recoils! */
   
      tmp->stats.maxhp=tmp->count; /*??*/       tmp->stats.maxhp=tmp->count; /*??*/


Legend:
line(s) removed in v.1.81 
line(s) changed
 line(s) added in v.1.82

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