ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/alchemy.C
(Generate patch)

Comparing deliantra/server/server/alchemy.C (file contents):
Revision 1.43 by root, Fri Nov 6 12:27:05 2009 UTC vs.
Revision 1.44 by root, Fri Nov 6 12:49:19 2009 UTC

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 */
78int 78static int
79content_recipe_value (object *op) 79content_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 */
271void 271static void
272adjust_product (object *item, int lvl, int yield) 272adjust_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 */
300object * 300static object *
301attempt_recipe (object *caster, object *cauldron, int ability, recipe *rp, int nbatches) 301attempt_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 */
369void 369static void
370alchemy_failure_effect (object *op, object *cauldron, recipe *rp, int danger) 370alchemy_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 */
580int 580static int
581calc_alch_danger (object *caster, object *cauldron, recipe *rp) 581calc_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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines