Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: Low potion prices -- fix




> Mark writes:
>
>  Actually, looking at this, I think if the first thing of the case does is
> check for a special potion and break if it is, things would be OK (

	Yeah, unfortunately, I reversed the logic! The reason I did this
	is a bit arcane, so I won't fully explain it (it was stupid anyway).

	I made a patch file for treasures.c (to the already modified file).
	After removing 1 part of the logic from special_potion and reversing
	its use in the right place, things appear to be moving in greased 
	grooves once again. As an outcome of this patch, prior potions 
	"potion of healing" and "potion of restoration" will have their prices
	set at the (lower) value that the 'artifact' generated potions have.
	This seems fair since: 1) both potions are generated via artifacts
	list anyway and 2) they were pretty pricey before (esp. healing potion).

	One thing I noticed, the "staves of healing" have a cost just barely
	above that of "balm of healing"! Eek. Why would anyone use the balm,
	when you can buy a (multiple use) staff for only 1 platinum more??
	
	I see that the prices of other staffs are a bit higher. Shouldnt this
	be increased? (or balm prices dropped??).

								-b.t.

*** treasure.c	Mon Aug 19 04:32:17 1996
--- ./../../../crossfire/common/treasure.c	Mon Aug 19 04:31:04 1996
***************
*** 691,705 ****
            op->value*=3;
        }
        break;
      case POTION: {
  	int too_many_tries=0,is_special=0; 
! 	while(!(is_special=special_potion(op))) {
  	   generate_artifact(op,difficulty);
  	   if(too_many_tries++ > 10) break;
  	}
! 	if(is_special) { 
  	   int nrof_potion=spells[op->stats.sp].scrolls-RANDOM()%3;
             /* these 'potions' have been generated as artifacts 
  	    * and therefore need a few adjustments 
              */ 
             /* give fewer potions than scrolls */
--- 691,705 ----
            op->value*=3;
        }
        break;
      case POTION: {
  	int too_many_tries=0,is_special=0; 
! 	while(!(is_special=special_potion(op)) && !op->stats.sp) {
  	   generate_artifact(op,difficulty);
  	   if(too_many_tries++ > 10) break;
  	}
! 	if(!is_special) { 
  	   int nrof_potion=spells[op->stats.sp].scrolls-RANDOM()%3;
             /* these 'potions' have been generated as artifacts 
  	    * and therefore need a few adjustments 
              */ 
             /* give fewer potions than scrolls */
***************
*** 1310,1328 ****
        item->vulnerable = donor->vulnerable;
        item->protected = donor->protected;
       /* if donor has some attacktypes, the flesh is poisonous */
        if(donor->attacktype&AT_POISON)
  	item->type=POISON;
!       if(donor->attacktype&AT_ACID) item->stats.hp = -1*item->stats.food; }
  }
  
  /* special_potion() - so that old potion code is still done right. */
  
  int special_potion (object *op) {
  
    if(op->attacktype) return 1;
!   if(op->immune || op->vulnerable || op->protected || op->stats.sp) return 1;
    if(op->stats.Str || op->stats.Dex || op->stats.Con || op->stats.Pow
   	|| op->stats.Wis || op->stats.Int || op->stats.Cha ) return 1;
  
    return 0;
  }
--- 1310,1329 ----
        item->vulnerable = donor->vulnerable;
        item->protected = donor->protected;
       /* if donor has some attacktypes, the flesh is poisonous */
        if(donor->attacktype&AT_POISON)
  	item->type=POISON;
!       if(donor->attacktype&AT_ACID) item->stats.hp = -1*item->stats.food; 
!      } 
  }
  
  /* special_potion() - so that old potion code is still done right. */
  
  int special_potion (object *op) {
  
    if(op->attacktype) return 1;
!   if(op->immune || op->vulnerable || op->protected ) return 1;
    if(op->stats.Str || op->stats.Dex || op->stats.Con || op->stats.Pow
   	|| op->stats.Wis || op->stats.Int || op->stats.Cha ) return 1;
  
    return 0;
  }