Difference for server/alchemy.c from version 1.27 to 1.28


version 1.27 version 1.28
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_alchemy_c =   * static char *rcsid_alchemy_c =
  *   "$Id: alchemy.c,v 1.27 2006/04/06 21:18:35 tchize Exp $";   *   "$Id: alchemy.c,v 1.28 2006/05/05 09:26:34 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 67
 
Line 67
   
 static int is_defined_recipe(const recipe *rp, const object *cauldron, object *caster);  static int is_defined_recipe(const recipe *rp, const object *cauldron, object *caster);
 static recipe *find_recipe(recipelist *fl, int formula, object *ingredients);  static recipe *find_recipe(recipelist *fl, int formula, object *ingredients);
   static int content_recipe_value (object *op);
   static int numb_ob_inside (object *op);
   static void alchemy_failure_effect(object *op,object *cauldron,recipe *rp,int danger);
   static object * attempt_recipe(object *caster, object *cauldron, int ability, recipe *rp, int nbatches);
   static int calc_alch_danger(object *caster,object *cauldron, recipe *rp);
   static object * make_item_from_recipe(object *cauldron, recipe *rp);
   static void remove_contents (object *first_ob, object *save_item);
   static void adjust_product(object *item, int lvl, int yield);
   static object * find_transmution_ob ( object *first_ingred, recipe *rp, size_t *rp_arch_index, int create_item);
   
 /** Returns a random selection from cauldron_effect[] */  /** Returns a random selection from cauldron_effect[] */
 static const char *cauldron_sound(void) {  static const char *cauldron_sound(void) {
Line 209
 
Line 217
  * ok, but the possibility of duplicate hashes is certainly possible - msw   * ok, but the possibility of duplicate hashes is certainly possible - msw
   */    */
   
 int content_recipe_value (object *op) {  static int content_recipe_value (object *op) {
   char name[MAX_BUF];    char name[MAX_BUF];
   object *tmp=op->inv;    object *tmp=op->inv;
   int tval=0, formula=0;    int tval=0, formula=0;
Line 237
 
Line 245
  * Returns total number of items in op    * Returns total number of items in op
  */   */
   
 int numb_ob_inside (object *op) {  static int numb_ob_inside (object *op) {
   object *tmp=op->inv;    object *tmp=op->inv;
   int number=0,o_number=0;    int number=0,o_number=0;
   
Line 261
 
Line 269
  * failed recipe)   * failed recipe)
  */    */
    
 object * attempt_recipe(object *caster, object *cauldron, int ability, recipe *rp, int nbatches) {   static object * attempt_recipe(object *caster, object *cauldron, int ability, recipe *rp, int nbatches) {
   
     object *item=NULL, *skop;      object *item=NULL, *skop;
     /* this should be passed to this fctn, not effiecent cpu use this way */      /* this should be passed to this fctn, not effiecent cpu use this way */
Line 324
 
Line 332
  * on the item's default parameters, and the relevant caster skill level.    * on the item's default parameters, and the relevant caster skill level.
  */   */
    
 void adjust_product(object *item, int lvl, int yield) {  static void adjust_product(object *item, int lvl, int yield) {
     int nrof=1;      int nrof=1;
   
     if (!yield)      if (!yield)
Line 351
 
Line 359
  * @return the newly created object, NULL if something failed   * @return the newly created object, NULL if something failed
  */   */
   
 object * make_item_from_recipe(object *cauldron, recipe *rp) {  static object * make_item_from_recipe(object *cauldron, recipe *rp) {
   artifact *art=NULL;    artifact *art=NULL;
   object *item=NULL;    object *item=NULL;
     size_t rp_arch_index;      size_t rp_arch_index;
Line 391
 
Line 399
  * set to zero if not using a transmution formula   * set to zero if not using a transmution formula
  */   */
    
 object * find_transmution_ob ( object *first_ingred, recipe *rp, size_t *rp_arch_index, int create_item) {  static object * find_transmution_ob ( object *first_ingred, recipe *rp, size_t *rp_arch_index, int create_item) {
    object *item=NULL;     object *item=NULL;
    
    *rp_arch_index = 0;     *rp_arch_index = 0;
Line 437
 
Line 445
  * adjustment for playbalance. -b.t.   * adjustment for playbalance. -b.t.
  */   */
    
 void alchemy_failure_effect(object *op,object *cauldron,recipe *rp,int danger) {  static void alchemy_failure_effect(object *op,object *cauldron,recipe *rp,int danger) {
     int level=0;      int level=0;
    
     if(!op || !cauldron) return;       if(!op || !cauldron) return;
Line 631
 
Line 639
  * of objects in the cauldron inventory (ex icecube has stuff in it).     * of objects in the cauldron inventory (ex icecube has stuff in it). 
  */   */
    
 void remove_contents (object *first_ob, object *save_item) {  static void remove_contents (object *first_ob, object *save_item) {
   object *next,*tmp=first_ob;    object *next,*tmp=first_ob;
    
     while(tmp) {      while(tmp) {
Line 658
 
Line 666
  * -b.t.    * -b.t.
  */   */
    
 int calc_alch_danger(object *caster,object *cauldron, recipe *rp) {  static int calc_alch_danger(object *caster,object *cauldron, recipe *rp) {
    object *item;      object *item;
    char name[MAX_BUF];     char name[MAX_BUF];
    int danger=0,nrofi=0;      int danger=0,nrofi=0;


Legend:
line(s) removed in v.1.27 
line(s) changed
 line(s) added in v.1.28

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