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

CF: alchemy patch




	This is a patch for Raphael's alchemy bug. Now, if a backfire
	generates an item, its value will be made to 0 (unsaleable) 
	AND, it is more likely that you will decrease your stats by
	using the item (in the case of POTIONS, the decrease is
	PERMANENT). Stat loss was a possibility before, I just increased
	the amount of stats you can lose. It is still possible (33%
	chance, opps 25%) that you can create a cursed potion that
	wont decrease your stats when you use it.

							-b.t.
*** ../../tarfiles/crossfire-0.92.5/server/alchemy.c	Wed Jul 24 03:45:49 1996
--- ./alchemy.c	Tue Aug 27 13:58:28 1996
***************
*** 352,374 ****
  			tmp->type=FOOD; 
  			tmp->stats.hp=RANDOM()%150;
  	    	}
             }
  
!        	    /* change stats downward */
!            if(tmp->type!=FOOD) 
!  	     do {
!            	change_attr_value(&tmp->stats,RANDOM()%6,-1*RANDOM()%3);
!              } while (RANDOM()%3);
        }  
        return;
  
    } if(level==40) {                  		/* MAKE RANDOM RECIPE */
        recipelist *fl;
        int numb=numb_ob_inside(cauldron);
  
!       fl=get_formulalist(numb);
        if(fl &&(rp=get_random_recipe(fl)))
            (void) attempt_recipe(op,cauldron,rp);
        else 
  	  alchemy_failure_effect(op,cauldron,rp,level-1);
        return;
--- 352,375 ----
  			tmp->type=FOOD; 
  			tmp->stats.hp=RANDOM()%150;
  	    	}
             }
  
! 	   tmp->value = 0; /* unsaleable item */
!  
!        	   /* change stats downward */
!  	   do {
!            	change_attr_value(&tmp->stats,RANDOM()%7,-1*(RANDOM()%3+1));
!            } while (RANDOM()%3);
        }  
        return;
  
    } if(level==40) {                  		/* MAKE RANDOM RECIPE */
        recipelist *fl;
        int numb=numb_ob_inside(cauldron);
  
!       fl=get_formulalist(numb-1); /* take a lower recipe list */ 
        if(fl &&(rp=get_random_recipe(fl)))
            (void) attempt_recipe(op,cauldron,rp);
        else 
  	  alchemy_failure_effect(op,cauldron,rp,level-1);
        return;