Difference for server/spell_util.c from version 1.63 to 1.64


version 1.63 version 1.64
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_util_c =   * static char *rcsid_spell_util_c =
  *   "$Id: spell_util.c,v 1.63 2001/12/23 08:09:05 darth_bob Exp $";   *   "$Id: spell_util.c,v 1.64 2002/07/15 04:57:13 mwedel Exp $";
  */   */
   
   
Line 37
 
Line 37
 #endif  #endif
 #include <sounds.h>  #include <sounds.h>
   
 char *range_name[range_size] = {  
   "none", "bow", "magic", "wand", "rod", "scroll", "horn"  
  ,"steal"  
 };  
   
 archetype *spellarch[NROFREALSPELLS];  archetype *spellarch[NROFREALSPELLS];
   
 void init_spells() {  void init_spells() {
Line 190
 
Line 185
  if(!spells[type].cleric&& op->stats.sp<SP_level_spellpoint_cost(op,caster,type))   if(!spells[type].cleric&& op->stats.sp<SP_level_spellpoint_cost(op,caster,type))
  {   {
    new_draw_info(NDI_UNIQUE, 0,op,"You don't have enough mana.");     new_draw_info(NDI_UNIQUE, 0,op,"You don't have enough mana.");
    op->contr->count_left=0;  
    return 0;     return 0;
  }   }
  if(spells[type].cleric&&op->stats.grace<SP_level_spellpoint_cost(op,caster,type))   if(spells[type].cleric&&op->stats.grace<SP_level_spellpoint_cost(op,caster,type))
Line 211
 
Line 205
    {     {
    prayer_failure(op,op->stats.grace,SP_level_spellpoint_cost(op,caster,type));     prayer_failure(op,op->stats.grace,SP_level_spellpoint_cost(op,caster,type));
    new_draw_info_format(NDI_UNIQUE, 0,op,"%s ignores your prayer.",godname);     new_draw_info_format(NDI_UNIQUE, 0,op,"%s ignores your prayer.",godname);
    op->contr->count_left=0;  
    return 0;     return 0;
    }     }
  }   }
Line 219
 
Line 212
   
   if (caster->path_denied & s->path) {    if (caster->path_denied & s->path) {
     new_draw_info(NDI_UNIQUE, 0,op, "You are unable to cast that spell.");      new_draw_info(NDI_UNIQUE, 0,op, "You are unable to cast that spell.");
     if(op->type==PLAYER) op->contr->count_left=0;  
     return 0;      return 0;
   }    }
   /* If it is an ability, assume that the designer of the archetype knows    /* If it is an ability, assume that the designer of the archetype knows
Line 227
 
Line 219
    */     */
   if (item==spellNormal && !ability && SK_level(caster) < s->level && !QUERY_FLAG(op,FLAG_WIZ)) {    if (item==spellNormal && !ability && SK_level(caster) < s->level && !QUERY_FLAG(op,FLAG_WIZ)) {
     new_draw_info(NDI_UNIQUE, 0,op, "You lack enough skill to cast that spell.");      new_draw_info(NDI_UNIQUE, 0,op, "You lack enough skill to cast that spell.");
     if(op->type==PLAYER) op->contr->count_left=0;  
     return 0;      return 0;
   }    }
   
Line 270
 
Line 261
     case range_magic:      case range_magic:
       new_draw_info(NDI_UNIQUE, 0,op,"Something blocks your spellcasting.");        new_draw_info(NDI_UNIQUE, 0,op,"Something blocks your spellcasting.");
       break;        break;
     case range_wand:      case range_misc:
       new_draw_info(NDI_UNIQUE, 0,op,"Something blocks the magic of your wand.");        new_draw_info(NDI_UNIQUE, 0,op,"Something blocks the magic of your item.");
       break;  
     case range_rod:  
       new_draw_info(NDI_UNIQUE, 0,op,"Something blocks the magic of your rod.");  
       break;        break;
     case range_horn:      case range_golem:
       new_draw_info(NDI_UNIQUE, 0,op,"Something blocks the magic of your horn.");  
       break;  
     case range_scroll:  
       new_draw_info(NDI_UNIQUE, 0,op,"Something blocks the magic of your scroll.");        new_draw_info(NDI_UNIQUE, 0,op,"Something blocks the magic of your scroll.");
       break;        break;
     default:      default:
Line 830
 
Line 815
     dir=find_free_spot(NULL,op->map,op->x,op->y,1,9);      dir=find_free_spot(NULL,op->map,op->x,op->y,1,9);
   if((dir==-1) || blocked(op->map,op->x+freearr_x[dir],op->y+freearr_y[dir])) {    if((dir==-1) || blocked(op->map,op->x+freearr_x[dir],op->y+freearr_y[dir])) {
     new_draw_info(NDI_UNIQUE, 0,op,"There is something in the way.");      new_draw_info(NDI_UNIQUE, 0,op,"There is something in the way.");
     if(op->type==PLAYER)  
       op->contr->count_left=0;  
     return 0;      return 0;
   }    }
   tmp=arch_to_object(at);    tmp=arch_to_object(at);
Line 845
 
Line 828
     set_owner(tmp,op);      set_owner(tmp,op);
     op->contr->golem=tmp;      op->contr->golem=tmp;
     /* give the player control of the golem */      /* give the player control of the golem */
     op->contr->shoottype=range_scroll;      op->contr->shoottype=range_golem;
   } else {    } else {
     if(QUERY_FLAG(op, FLAG_FRIENDLY)) {      if(QUERY_FLAG(op, FLAG_FRIENDLY)) {
       object *owner = get_owner(op);        object *owner = get_owner(op);


Legend:
line(s) removed in v.1.63 
line(s) changed
 line(s) added in v.1.64

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