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.32 by root, Mon Sep 29 10:32:50 2008 UTC vs.
Revision 1.33 by root, Sat Dec 27 02:31:19 2008 UTC

462 462
463 /* failed, create a fresh object. Note no nrof>1 because that would 463 /* failed, create a fresh object. Note no nrof>1 because that would
464 * allow players to create massive amounts of artifacts easily */ 464 * allow players to create massive amounts of artifacts easily */
465 if (create_item && (!item || item->nrof > 1)) 465 if (create_item && (!item || item->nrof > 1))
466 { 466 {
467 *rp_arch_index = RANDOM () % rp->arch_names; 467 *rp_arch_index = rndm (rp->arch_names);
468 item = get_archetype (rp->arch_name[*rp_arch_index]); 468 item = get_archetype (rp->arch_name[*rp_arch_index]);
469 } 469 }
470 470
471#ifdef ALCHEMY_DEBUG 471#ifdef ALCHEMY_DEBUG
472 LOG (llevDebug, "recipe calls for%stransmution.\n", rp->transmute ? " " : " no "); 472 LOG (llevDebug, "recipe calls for%stransmution.\n", rp->transmute ? " " : " no ");
666 * in this one, we allow *any* valid alchemy artifact 666 * in this one, we allow *any* valid alchemy artifact
667 * to be made (rather than only those on the given 667 * to be made (rather than only those on the given
668 * formulalist) */ 668 * formulalist) */
669 if (!rp) 669 if (!rp)
670 rp = get_random_recipe ((recipelist *) NULL); 670 rp = get_random_recipe ((recipelist *) NULL);
671
671 if (rp && (tmp = get_archetype (rp->arch_name[RANDOM () % rp->arch_names]))) 672 if (rp && (tmp = get_archetype (rp->arch_name [rndm (rp->arch_names)])))
672 { 673 {
673 generate_artifact (tmp, random_roll (1, op->level / 2 + 1, op, PREFER_HIGH) + 1); 674 generate_artifact (tmp, random_roll (1, op->level / 2 + 1, op, PREFER_HIGH) + 1);
674 if ((tmp = insert_ob_in_ob (tmp, cauldron))) 675 if ((tmp = insert_ob_in_ob (tmp, cauldron)))
675 { 676 {
676 remove_contents (cauldron->inv, tmp); 677 remove_contents (cauldron->inv, tmp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines