Difference for server/shop.c from version 1.49 to 1.50


version 1.49 version 1.50
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_shop_c =   * static char *rcsid_shop_c =
  *   "$Id: shop.c,v 1.49 2005/11/09 15:37:29 cavesomething Exp $";   *   "$Id: shop.c,v 1.50 2005/11/19 21:05:30 cavesomething Exp $";
  */   */
   
 /*  /*
Line 842
 
Line 842
 /* returns a double that is the ratio of the price that a shop will offer for  /* returns a double that is the ratio of the price that a shop will offer for
  * item based on the shops specialisation. Does not take account of greed,    * item based on the shops specialisation. Does not take account of greed,
  * returned value is between (2*SPECIALISATION_EFFECT-1) and 1 and in any    * returned value is between (2*SPECIALISATION_EFFECT-1) and 1 and in any
  * event is never less than 0.001 (calling functions divide by it)   * event is never less than 0.1 (calling functions divide by it)
  */   */
 double shop_specialisation_ratio(object *item, mapstruct *map) {  double shop_specialisation_ratio(object *item, mapstruct *map) {
     shopitems *items=map->shopitems;      shopitems *items=map->shopitems;
Line 877
 
Line 877
  likedness = -1.0;    likedness = -1.0;
     }      }
     ratio = ratio + (1.0-ratio) * likedness;      ratio = ratio + (1.0-ratio) * likedness;
     if (ratio <= 0) ratio=0.001; /* negative prices could be interesting, but not very helpful */      if (ratio <= 0.1) ratio=0.1; /* if the ratio were much lower than this, we would get silly prices */
     return ratio;      return ratio;
 }  }
   


Legend:
line(s) removed in v.1.49 
line(s) changed
 line(s) added in v.1.50

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