Difference for server/spell_util.c from version 1.37 to 1.38


version 1.37 version 1.38
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_util_c =   * static char *rcsid_spell_util_c =
  *   "$Id: spell_util.c,v 1.37 2000/12/15 15:42:36 avogl Exp $";   *   "$Id: spell_util.c,v 1.38 2000/12/16 02:34:34 peterm Exp $";
  */   */
   
 /*  /*
Line 592
 
Line 592
     aggravate_monsters(op);      aggravate_monsters(op);
     success = 1;      success = 1;
     break;      break;
 /* peterm: following spells added */  
   case SP_DIVINE_SHOCK:  
     success = fire_arch(op,caster,dir,find_archetype("divine_shock"),type,!ability);  
     break;  
   case SP_BALL_LIGHTNING:    case SP_BALL_LIGHTNING:
     success = fire_arch(op,caster,dir,find_archetype("ball_lightning"),type,!ability);    case SP_DIVINE_SHOCK:
     case SP_POISON_FOG:
       success = fire_arch(op,caster,dir,spellarch[type],type,!ability);
     break;      break;
   case SP_METEOR_SWARM: {    case SP_METEOR_SWARM: {
     int n;      int n;
Line 799
 
Line 797
   case SP_CONFLICT:    case SP_CONFLICT:
     success = cast_cause_conflict(op,caster,spellarch[type],type);      success = cast_cause_conflict(op,caster,spellarch[type],type);
     break;      break;
   
   case SP_POISON_FOG:  
     /* These two don't do anything yet, but putting the above in  
      * prevents compiler warnings.  
      */  
     break;  
   }    }
   
   play_sound_map(op->map, op->x, op->y, SOUND_CAST_SPELL_0 + type);    play_sound_map(op->map, op->x, op->y, SOUND_CAST_SPELL_0 + type);
Line 1070
 
Line 1062
     case SP_M_MISSILE:      case SP_M_MISSILE:
     move_missile(tmp);      move_missile(tmp);
  break;   break;
     case SP_POISON_FOG:
   case SP_DIVINE_SHOCK:    case SP_DIVINE_SHOCK:
     case SP_BALL_LIGHTNING:      case SP_BALL_LIGHTNING:
  tmp->stats.food=SP_PARAMETERS[type].bdur +   tmp->stats.food=SP_PARAMETERS[type].bdur +
Line 1855
 
Line 1848
       int tmpdir = absdir (op->direction + offset);        int tmpdir = absdir (op->direction + offset);
       nx = op->x + freearr_x[tmpdir];        nx = op->x + freearr_x[tmpdir];
       ny = op->y + freearr_y[tmpdir];        ny = op->y + freearr_y[tmpdir];
       if ( ! wall (op->map, nx, ny) && ! blocks_view (op->map, nx, ny)) {      if ( ! wall (op->map, nx, ny) ) {
  dir = tmpdir;   dir = tmpdir;
  break;   break;
       }        }
Line 1876
 
Line 1869
     /* loop over current square and neighbors to hit. */      /* loop over current square and neighbors to hit. */
     for(j=0;j<9;j++) {      for(j=0;j<9;j++) {
       int hx,hy;  /* hit these squares */        int hx,hy;  /* hit these squares */
       object *new_ob;
   
       hx = nx+freearr_x[j]; hy = ny+freearr_y[j];        hx = nx+freearr_x[j]; hy = ny+freearr_y[j];
               
Line 1885
 
Line 1879
  if(j) op->stats.dam = dam_save/2;   if(j) op->stats.dam = dam_save/2;
        
  if(blocked(op->map,hx,hy)) hit_map(op,j,op->attacktype);   if(blocked(op->map,hx,hy)) hit_map(op,j,op->attacktype);
   
       }
       if(out_of_map(op->map,hx,hy) ||
          wall(op->map,hx,hy)) continue;
       if(op->other_arch) { /* insert the other arch */
         new_ob = arch_to_object(op->other_arch);
         new_ob->x = hx;
         new_ob->y = hy;
         insert_ob_in_map(new_ob,op->map,op);
       }        }
     }      }
     /* restore to the center location and damage*/      /* restore to the center location and damage*/
Line 2012
 
Line 2015
         !QUERY_FLAG(tmp,FLAG_GENERATOR)) ||          !QUERY_FLAG(tmp,FLAG_GENERATOR)) ||
  (tmp == exclude || (tmp->head && tmp->head == exclude))))   (tmp == exclude || (tmp->head && tmp->head == exclude))))
                 tmp=tmp->above;                  tmp=tmp->above;
       if(tmp!=NULL && can_see_monsterP(m,x,y,i))        if(tmp!=NULL && can_see_monsterP(m,x,y,i) && !blocks_view(m,x,y))
         return freedir[i];          return freedir[i];
     }      }
   }    }


Legend:
line(s) removed in v.1.37 
line(s) changed
 line(s) added in v.1.38

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