… | |
… | |
73 | /** |
73 | /** |
74 | * Recipe value of the entire contents of a container. |
74 | * Recipe value of the entire contents of a container. |
75 | * This appears to just generate a hash value, which I guess for now works |
75 | * This appears to just generate a hash value, which I guess for now works |
76 | * ok, but the possibility of duplicate hashes is certainly possible - msw |
76 | * ok, but the possibility of duplicate hashes is certainly possible - msw |
77 | */ |
77 | */ |
78 | int |
78 | static int |
79 | content_recipe_value (object *op) |
79 | content_recipe_value (object *op) |
80 | { |
80 | { |
81 | char name[MAX_BUF]; |
81 | char name[MAX_BUF]; |
82 | object *tmp = op->inv; |
82 | object *tmp = op->inv; |
83 | int tval = 0, formula = 0; |
83 | int tval = 0, formula = 0; |
… | |
… | |
266 | |
266 | |
267 | /** |
267 | /** |
268 | * We adjust the nrof, exp and level of the final product, based |
268 | * We adjust the nrof, exp and level of the final product, based |
269 | * on the item's default parameters, and the relevant caster skill level. |
269 | * on the item's default parameters, and the relevant caster skill level. |
270 | */ |
270 | */ |
271 | void |
271 | static void |
272 | adjust_product (object *item, int lvl, int yield) |
272 | adjust_product (object *item, int lvl, int yield) |
273 | { |
273 | { |
274 | int nrof = 1; |
274 | int nrof = 1; |
275 | |
275 | |
276 | if (!yield) |
276 | if (!yield) |
… | |
… | |
295 | * insert_ob_in_ob. If the caster has some alchemy skill, then they might |
295 | * insert_ob_in_ob. If the caster has some alchemy skill, then they might |
296 | * gain some exp from (successfull) fabrication of the product. |
296 | * gain some exp from (successfull) fabrication of the product. |
297 | * If nbatches==-1, don't give exp for this creation (random generation/ |
297 | * If nbatches==-1, don't give exp for this creation (random generation/ |
298 | * failed recipe) |
298 | * failed recipe) |
299 | */ |
299 | */ |
300 | object * |
300 | static object * |
301 | attempt_recipe (object *caster, object *cauldron, int ability, recipe *rp, int nbatches) |
301 | attempt_recipe (object *caster, object *cauldron, int ability, recipe *rp, int nbatches) |
302 | { |
302 | { |
303 | |
303 | |
304 | object *item = NULL, *skop; |
304 | object *item = NULL, *skop; |
305 | |
305 | |
… | |
… | |
364 | * This fctn simulates the backfire effects--worse effects as the level |
364 | * This fctn simulates the backfire effects--worse effects as the level |
365 | * increases. If SPELL_FAILURE_EFFECTS is defined some really evil things |
365 | * increases. If SPELL_FAILURE_EFFECTS is defined some really evil things |
366 | * can happen to the would be alchemist. This table probably needs some |
366 | * can happen to the would be alchemist. This table probably needs some |
367 | * adjustment for playbalance. -b.t. |
367 | * adjustment for playbalance. -b.t. |
368 | */ |
368 | */ |
369 | void |
369 | static void |
370 | alchemy_failure_effect (object *op, object *cauldron, recipe *rp, int danger) |
370 | alchemy_failure_effect (object *op, object *cauldron, recipe *rp, int danger) |
371 | { |
371 | { |
372 | int level = 0; |
372 | int level = 0; |
373 | |
373 | |
374 | if (!op || !cauldron) |
374 | if (!op || !cauldron) |
… | |
… | |
575 | * mixing device (aka "cauldron"). Higher values of 'danger' indicate more |
575 | * mixing device (aka "cauldron"). Higher values of 'danger' indicate more |
576 | * danger. Note that we assume that we have had the caster ready the alchemy |
576 | * danger. Note that we assume that we have had the caster ready the alchemy |
577 | * skill *before* this routine is called. (no longer auto-readies that skill) |
577 | * skill *before* this routine is called. (no longer auto-readies that skill) |
578 | * -b.t. |
578 | * -b.t. |
579 | */ |
579 | */ |
580 | int |
580 | static int |
581 | calc_alch_danger (object *caster, object *cauldron, recipe *rp) |
581 | calc_alch_danger (object *caster, object *cauldron, recipe *rp) |
582 | { |
582 | { |
583 | object *item; |
583 | object *item; |
584 | char name[MAX_BUF]; |
584 | char name[MAX_BUF]; |
585 | int danger = 0, nrofi = 0; |
585 | int danger = 0, nrofi = 0; |