Difference for common/treasure.c from version 1.44 to 1.45


version 1.44 version 1.45
Line 1
 
Line 1
   
 /*  /*
  * static char *rcs_treasure_c =   * static char *rcs_treasure_c =
  *   "$Id: treasure.c,v 1.44 2004/02/09 05:36:12 mwedel Exp $";   *   "$Id: treasure.c,v 1.45 2004/02/09 08:04:24 mwedel Exp $";
  */   */
   
 /*  /*
Line 1250
 
Line 1250
   
 void add_abilities(object *op, object *change) {  void add_abilities(object *op, object *change) {
     int i,j, tmp;      int i,j, tmp;
   
     if (change->face != blank_face) {      if (change->face != blank_face) {
 #ifdef TREASURE_VERBOSE  #ifdef TREASURE_VERBOSE
  LOG(llevDebug, "FACE: %d\n", change->face->number);   LOG(llevDebug, "FACE: %d\n", change->face->number);
Line 1292
 
Line 1293
     op->stats.wc  += change->stats.wc;      op->stats.wc  += change->stats.wc;
     op->stats.ac  += change->stats.ac;      op->stats.ac  += change->stats.ac;
   
     if (change->other_arch) op->other_arch = change->other_arch;      if (change->other_arch) {
    /* Basically, for horns & potions, the other_arch field is the spell
    * to cast.  So convert that to into a spell and put it into
    * this object.
    */
    if (op->type == HORN || op->type == POTION) {
        object *tmp_obj;
        /* Remove any spells this object currently has in it */
        while (op->inv) {
    tmp_obj = op->inv;
    remove_ob(tmp_obj);
    free_object(tmp_obj);
        }
        tmp_obj = arch_to_object(change->other_arch);
        insert_ob_in_ob(tmp_obj, op);
    }
    /* No harm setting this for potions/horns */
    op->other_arch = change->other_arch;
       }
   
     if (change->stats.hp < 0)      if (change->stats.hp < 0)
  op->stats.hp = -change->stats.hp;   op->stats.hp = -change->stats.hp;


Legend:
line(s) removed in v.1.44 
line(s) changed
 line(s) added in v.1.45

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