Difference for server/spell_effect.c from version 1.116 to 1.117


version 1.116 version 1.117
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_effect_c =   * static char *rcsid_spell_effect_c =
  *   "$Id: spell_effect.c,v 1.116 2004/04/07 06:49:38 mwedel Exp $";   *   "$Id: spell_effect.c,v 1.117 2004/04/25 07:17:40 mwedel Exp $";
  */   */
   
   
Line 1633
 
Line 1633
 static void alchemy_object(object *obj, int *small_nuggets,  static void alchemy_object(object *obj, int *small_nuggets,
  int *large_nuggets, int *weight)   int *large_nuggets, int *weight)
 {  {
     int value=query_cost(obj, NULL, F_TRUE);      uint64 value=query_cost(obj, NULL, F_TRUE);
   
     /* Give third price when we alchemy money (This should hopefully      /* Give third price when we alchemy money (This should hopefully
      * make it so that it isn't worth it to alchemy money, sell       * make it so that it isn't worth it to alchemy money, sell
Line 1651
 
Line 1651
  value *= 0.9;   value *= 0.9;
   
     if ((obj->value>0) && rndm(0, 29)) {      if ((obj->value>0) && rndm(0, 29)) {
  static int value_store;  
  int count;   int count;
   
  value_store += value;   count = value / large->value;
  count = value_store / large->value;  
  *large_nuggets += count;   *large_nuggets += count;
  value_store -= count * large->value;   value -= (uint64)count * (uint64)large->value;
  count = value_store / small->value;   count = value / small->value;
  *small_nuggets += count;   *small_nuggets += count;
  value_store -= count * small->value;  
  /* LOG(llevDebug, "alchemize value %d, remainder %d\n", value, value_store); */  
     }      }
   
     /* Turn 25 small nuggets into 1 large nugget.  If the value      /* Turn 25 small nuggets into 1 large nugget.  If the value


Legend:
line(s) removed in v.1.116 
line(s) changed
 line(s) added in v.1.117

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