Difference for common/treasure.c from version 1.47 to 1.48


version 1.47 version 1.48
Line 1
 
Line 1
    
 /*   /*
  * static char *rcs_treasure_c =    * static char *rcs_treasure_c =
  *   "$Id: treasure.c,v 1.47 2004/03/12 19:21:22 ryo_saeba Exp $";    *   "$Id: treasure.c,v 1.48 2004/04/08 06:48:51 mwedel Exp $";
  */    */
    
 /*   /*
Line 832
 
Line 832
    
      case POTION: {        case POTION: {
  int too_many_tries=0,is_special=0;    int too_many_tries=0,is_special=0;
    extern char *spell_mapping[];
   
    /* Handle healing and magic power potions */
    if (op->stats.sp && !op->randomitems) {
        object *tmp;
   
        tmp = get_archetype(spell_mapping[op->stats.sp]);
        insert_ob_in_ob(tmp, op);
        op->stats.sp=0;
    }
    
  while(!(is_special=special_potion(op)) && !op->inv) {    while(!(is_special=special_potion(op)) && !op->inv) {
      generate_artifact(op,difficulty);        generate_artifact(op,difficulty);
      if(too_many_tries++ > 10) break;        if(too_many_tries++ > 10) break;
  }    }
  if (op->inv) {    /* don't want to change value for healing/magic power potions,
    * since the value set on those is already correct.
    */
    if (op->inv && op->randomitems) {
      /* value multiplier is same as for scrolls */        /* value multiplier is same as for scrolls */
      op->value=(op->value*op->inv->value);        op->value=(op->value*op->inv->value);
      op->level = op->inv->level/2+ RANDOM()%difficulty + RANDOM()%difficulty;        op->level = op->inv->level/2+ RANDOM()%difficulty + RANDOM()%difficulty;


Legend:
line(s) removed in v.1.47 
line(s) changed
 line(s) added in v.1.48

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