Difference for random_maps/treasure.c from version 1.27 to 1.28


version 1.27 version 1.28
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_treasure_c =   * static char *rcsid_treasure_c =
  *   "$Id: treasure.c,v 1.27 2006/04/06 21:18:35 tchize Exp $";   *   "$Id: treasure.c,v 1.28 2006/06/03 21:56:28 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 187
 
Line 187
   xl = x + freearr_x[i]; yl = y +  freearr_y[i];    xl = x + freearr_x[i]; yl = y +  freearr_y[i];
   
   /* if the placement is blocked, return a fail. */    /* if the placement is blocked, return a fail. */
   if(wall_blocked(map,xl,yl)) return 0;    if(wall_blocked(map,xl,yl)) {
         free_object(the_chest);
         return 0;
     }
      
      
   /* put the treasures in the chest. */    /* put the treasures in the chest. */
Line 288
 
Line 291
   int kx,ky;    int kx,ky;
   object *the_keymaster; /* the monster that gets the key. */    object *the_keymaster; /* the monster that gets the key. */
   object *the_key;    object *the_key;
     char keybuf[256];
   
   /* get a key and set its keycode */    /* get a key and set its keycode */
   the_key = create_archetype("key2");    the_key = create_archetype("key2");
   the_key->slaying = add_string(keycode);     the_key->slaying = add_string(keycode);
     free_string(the_key->name);
     snprintf( keybuf,256, "key from level %d of %s", RP->dungeon_level, RP->dungeon_name[0] != '\0' ? RP->dungeon_name : "a random map" );
     the_key->name = add_string(keybuf);
   
   
   if(door_flag==PASS_DOORS) {    if(door_flag==PASS_DOORS) {
Line 704
 
Line 711
       free_object(door);        free_object(door);
       doorlist[i]=new_door;        doorlist[i]=new_door;
       insert_ob_in_map(new_door,map,NULL,0);        insert_ob_in_map(new_door,map,NULL,0);
       sprintf(keybuf,"%d",(int)RANDOM());        snprintf(keybuf,256,"%d",(int)RANDOM());
       new_door->slaying = add_string(keybuf);        new_door->slaying = add_string(keybuf);
       keyplace(map,new_door->x,new_door->y,keybuf,NO_PASS_DOORS,2,RP);        keyplace(map,new_door->x,new_door->y,keybuf,NO_PASS_DOORS,2,RP);
     }      }


Legend:
line(s) removed in v.1.27 
line(s) changed
 line(s) added in v.1.28

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