Difference for random_maps/treasure.c from version 1.3 to 1.4


version 1.3 version 1.4
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_treasure_c =   * static char *rcsid_treasure_c =
  *   "$Id: treasure.c,v 1.3 2000/05/26 09:50:47 jec Exp $";   *   "$Id: treasure.c,v 1.4 2000/06/19 01:34:31 cvs Exp $";
  */   */
   
 /*  /*
Line 41
 
Line 41
 #define TRAPPED 16 /* trap dropped in same location as chest. */  #define TRAPPED 16 /* trap dropped in same location as chest. */
 #define SPARSE 32  /* 1/2 as much treasure as default */  #define SPARSE 32  /* 1/2 as much treasure as default */
 #define RICH 64   /* 2x as much treasure as default */  #define RICH 64   /* 2x as much treasure as default */
   #define FILLED 128  /* Fill/tile the entire map with treasure */
 #define LAST_OPTION 64  /* set this to the last real option, for random */  #define LAST_OPTION 64  /* set this to the last real option, for random */
   
 #define NO_PASS_DOORS 0  #define NO_PASS_DOORS 0
Line 78
 
Line 79
   if(treasureoptions<=0) treasureoptions=RANDOM() % (2*LAST_OPTION);    if(treasureoptions<=0) treasureoptions=RANDOM() % (2*LAST_OPTION);
   
   /* filter out the mutually exclusive options */    /* filter out the mutually exclusive options */
   if(treasureoptions & (RICH|SPARSE))    if(treasureoptions & (RICH|SPARSE)) {
     if(RANDOM()%2) treasureoptions -=1;      if(RANDOM()%2) treasureoptions -=1;
     else treasureoptions-=2;      else treasureoptions-=2;}
   
   /* pick the number of treasures */    /* pick the number of treasures */
   if(treasureoptions & SPARSE)    if(treasureoptions & SPARSE)
Line 174
 
Line 175
   
   
   /* put the treasures in the chest. */    /* put the treasures in the chest. */
   if(style_map) {    /*  if(style_map) { */
     if(0) {  /* don't use treasure style maps for now!  */
     int ti;      int ti;
     /* if treasurestyle lists a treasure list, use it. */      /* if treasurestyle lists a treasure list, use it. */
     treasurelist *tlist=find_treasurelist(treasurestyle);      treasurelist *tlist=find_treasurelist(treasurestyle);


Legend:
line(s) removed in v.1.3 
line(s) changed
 line(s) added in v.1.4

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