Difference for server/spell_effect.c from version 1.71 to 1.72


version 1.71 version 1.72
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_effect_c =   * static char *rcsid_spell_effect_c =
  *   "$Id: spell_effect.c,v 1.71 2002/07/05 22:22:29 uid39786 Exp $";   *   "$Id: spell_effect.c,v 1.72 2002/07/15 04:57:13 mwedel Exp $";
  */   */
   
   
Line 706
 
Line 706
 }  }
   
 int perceive_self(object *op) {  int perceive_self(object *op) {
     char *cp=describe_item(op), buf[MAX_BUF];      char *cp=describe_item(op, op), buf[MAX_BUF];
     archetype *at=find_archetype("depletion");      archetype *at=find_archetype("depletion");
     object *tmp;      object *tmp;
     int i;      int i;
Line 1795
 
Line 1795
   
     if((dir==-1) || arch_blocked(at,op->map, op->x + freearr_x[dir], op->y+freearr_y[dir])) {      if((dir==-1) || arch_blocked(at,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;
     }      }
     for (i = 1; i < number + 1; i++) {      for (i = 1; i < number + 1; i++) {
Line 2052
 
Line 2050
 }  }
   
   
 /* Alchemy code by Mark Wedel (master@rahul.net)  /* Alchemy code by Mark Wedel
  *   *
  * This code adds a new spell, called alchemy.  Alchemy will turn   * This code adds a new spell, called alchemy.  Alchemy will turn
  * objects to gold nuggets, the value of the gold nuggets being   * objects to gold nuggets, the value of the gold nuggets being
Line 2293
 
Line 2291
       if (op->type==PLAYER) {        if (op->type==PLAYER) {
   
  new_draw_info_format(NDI_UNIQUE, 0, op,   new_draw_info_format(NDI_UNIQUE, 0, op,
  "You have %s.", long_desc(tmp));   "You have %s.", long_desc(tmp, op));
  if (tmp->msg) {   if (tmp->msg) {
    new_draw_info(NDI_UNIQUE, 0,op, "The item has a story:");     new_draw_info(NDI_UNIQUE, 0,op, "The item has a story:");
    new_draw_info(NDI_UNIQUE, 0,op, tmp->msg);     new_draw_info(NDI_UNIQUE, 0,op, tmp->msg);
Line 2316
 
Line 2314
       identify(tmp);        identify(tmp);
       if (op->type==PLAYER) {        if (op->type==PLAYER) {
  new_draw_info_format(NDI_UNIQUE, 0,op,   new_draw_info_format(NDI_UNIQUE, 0,op,
  "On the ground is %s.", long_desc(tmp));   "On the ground is %s.", long_desc(tmp, op));
  if (tmp->msg) {   if (tmp->msg) {
    new_draw_info(NDI_UNIQUE, 0,op, "The item has a story:");     new_draw_info(NDI_UNIQUE, 0,op, "The item has a story:");
    new_draw_info(NDI_UNIQUE, 0,op, tmp->msg);     new_draw_info(NDI_UNIQUE, 0,op, tmp->msg);
Line 3174
 
Line 3172
   
   if((dir==-1) || arch_blocked(at,op->map, op->x + freearr_x[dir], op->y+freearr_y[dir])) {     if((dir==-1) || arch_blocked(at,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;
   }    }
   
Line 3187
 
Line 3183
   if(op->type==PLAYER) {    if(op->type==PLAYER) {
     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;
   }     }
   
   /*  This sets the level dependencies on dam, wc and hp */    /*  This sets the level dependencies on dam, wc and hp */
Line 3412
 
Line 3408
   /* if there's no place to put the golem, abort */    /* if there's no place to put the golem, abort */
   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;
   }    }
   
Line 3433
 
Line 3427
     if(!weapon) {      if(!weapon) {
       if(op->type==PLAYER) {         if(op->type==PLAYER) {
  new_draw_info(NDI_UNIQUE, 0,op,"You need to wield a weapon to animate it.");   new_draw_info(NDI_UNIQUE, 0,op,"You need to wield a weapon to animate it.");
  op->contr->count_left=0;     
       }         }
       return 0;        return 0;
     } else if (spellnum == SP_STAFF_TO_SNAKE && strcmp(weapon->name,"quarterstaff")) {      } else if (spellnum == SP_STAFF_TO_SNAKE && strcmp(weapon->name,"quarterstaff")) {
       if(op->type==PLAYER) {         if(op->type==PLAYER) {
  new_draw_info(NDI_UNIQUE, 0,op,"The spell fails to transform your weapon.");   new_draw_info(NDI_UNIQUE, 0,op,"The spell fails to transform your weapon.");
  op->contr->count_left=0;     
       }        }
       return 0;        return 0;
     } else if(op->type==PLAYER &&       } else if(op->type==PLAYER &&
        (QUERY_FLAG(weapon,FLAG_CURSED) || QUERY_FLAG(weapon,FLAG_DAMNED))) {         (QUERY_FLAG(weapon,FLAG_CURSED) || QUERY_FLAG(weapon,FLAG_DAMNED))) {
       new_draw_info(NDI_UNIQUE, 0,op,"You can't animate it.  It won't let go of your hand.");        new_draw_info(NDI_UNIQUE, 0,op,"You can't animate it.  It won't let go of your hand.");
       op->contr->count_left=0;     
       return 0;        return 0;
     }      }
   }    }
Line 3463
 
Line 3454
     tmp->type=GOLEM;      tmp->type=GOLEM;
     set_owner(tmp,op);      set_owner(tmp,op);
     op->contr->golem=tmp;      op->contr->golem=tmp;
     op->contr->shoottype=range_scroll;      op->contr->shoottype=range_golem;
   } else {    } else {
   /* If spell is cast by a pet, and the weapon is not cursed, make the animated    /* If spell is cast by a pet, and the weapon is not cursed, make the animated
    * weapon a pet. */     * weapon a pet. */


Legend:
line(s) removed in v.1.71 
line(s) changed
 line(s) added in v.1.72

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