Difference for server/spell_effect.c from version 1.150 to 1.151


version 1.150 version 1.151
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_effect_c =   * static char *rcsid_spell_effect_c =
  *   "$Id: spell_effect.c,v 1.150 2006/03/18 15:05:37 ryo_saeba Exp $";   *   "$Id: spell_effect.c,v 1.151 2006/03/22 09:29:05 akirschbaum Exp $";
  */   */
   
   
Line 1720
 
Line 1720
  * is finished.   * is finished.
  */   */
 static object *small, *large;  static object *small, *large;
   static uint64 small_value, large_value;
   
 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)
Line 1744
 
Line 1745
     if ((obj->value>0) && rndm(0, 29)) {      if ((obj->value>0) && rndm(0, 29)) {
  int count;   int count;
   
  count = value / large->value;   count = value / large_value;
  *large_nuggets += count;   *large_nuggets += count;
  value -= (uint64)count * (uint64)large->value;   value -= (uint64)count * large_value;
  count = value / small->value;   count = value / small_value;
  *small_nuggets += count;   *small_nuggets += count;
     }      }
   
Line 1755
 
Line 1756
      * of large nuggets is not evenly divisable by the small nugget       * of large nuggets is not evenly divisable by the small nugget
      * value, take off an extra small_nugget (Assuming small_nuggets!=0)       * value, take off an extra small_nugget (Assuming small_nuggets!=0)
      */       */
     if (*small_nuggets * small->value >= large->value) {      if (*small_nuggets * small_value >= large_value) {
  (*large_nuggets)++;   (*large_nuggets)++;
  *small_nuggets -= large->value / small->value;   *small_nuggets -= large_value / small_value;
  if (*small_nuggets && large->value % small->value)   if (*small_nuggets && large_value % small_value)
  (*small_nuggets)--;   (*small_nuggets)--;
     }      }
     weight += obj->weight;      weight += obj->weight;
Line 1813
 
Line 1814
     weight_max *= 1000;      weight_max *= 1000;
     small=get_archetype("smallnugget"),      small=get_archetype("smallnugget"),
     large=get_archetype("largenugget");      large=get_archetype("largenugget");
       small_value = query_cost(small, NULL, F_TRUE);
       large_value = query_cost(large, NULL, F_TRUE);
   
     for(y= op->y-1;y<=op->y+1;y++) {      for(y= op->y-1;y<=op->y+1;y++) {
  for(x= op->x-1;x<=op->x+1;x++) {   for(x= op->x-1;x<=op->x+1;x++) {


Legend:
line(s) removed in v.1.150 
line(s) changed
 line(s) added in v.1.151

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