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


version 1.26 version 1.27
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_alchemy_c =   * static char *rcsid_alchemy_c =
  *   "$Id: alchemy.c,v 1.26 2006/02/10 23:59:27 akirschbaum Exp $";   *   "$Id: alchemy.c,v 1.27 2006/04/06 21:18:35 tchize Exp $";
  */   */
   
 /*  /*
Line 414
 
Line 414
      * allow players to create massive amounts of artifacts easily */       * allow players to create massive amounts of artifacts easily */
     if(create_item && (!item || item->nrof > 1)) {      if(create_item && (!item || item->nrof > 1)) {
         *rp_arch_index = RANDOM()%rp->arch_names;          *rp_arch_index = RANDOM()%rp->arch_names;
         item = get_archetype(rp->arch_name[*rp_arch_index]);          item = create_archetype(rp->arch_name[*rp_arch_index]);
     }      }
   
 #ifdef ALCHEMY_DEBUG  #ifdef ALCHEMY_DEBUG
Line 463
 
Line 463
      material |= tmp->material;        material |= tmp->material;
  tmp=tmp->below;   tmp=tmp->below;
      }       }
      tmp = get_archetype("rock");       tmp = create_archetype("rock");
      tmp->weight=weight;       tmp->weight=weight;
      tmp->value=0;       tmp->value=0;
      tmp->material=material;       tmp->material=material;
Line 531
 
Line 531
  remove_contents(cauldron->inv,NULL);   remove_contents(cauldron->inv,NULL);
  switch(rndm(0, 2)) {   switch(rndm(0, 2)) {
      case 0:        case 0:
  tmp=get_archetype("bomb");   tmp=create_archetype("bomb");
  tmp->stats.dam=random_roll(1, level, op, PREFER_LOW);   tmp->stats.dam=random_roll(1, level, op, PREFER_LOW);
  tmp->stats.hp=random_roll(1, level, op, PREFER_LOW);   tmp->stats.hp=random_roll(1, level, op, PREFER_LOW);
  new_draw_info_format(NDI_UNIQUE,0,op,"The %s creates a bomb!",   new_draw_info_format(NDI_UNIQUE,0,op,"The %s creates a bomb!",
Line 539
 
Line 539
  break;    break;
   
      default:       default:
  tmp=get_archetype("fireball");   tmp=create_archetype("fireball");
  tmp->stats.dam=random_roll(1, level, op, PREFER_LOW)/5+1;   tmp->stats.dam=random_roll(1, level, op, PREFER_LOW)/5+1;
  tmp->stats.hp=random_roll(1, level, op, PREFER_LOW)/10+2;   tmp->stats.hp=random_roll(1, level, op, PREFER_LOW)/10+2;
  new_draw_info_format(NDI_UNIQUE,0,op,"The %s erupts in flame!",   new_draw_info_format(NDI_UNIQUE,0,op,"The %s erupts in flame!",
Line 556
 
Line 556
  remove_contents(cauldron->inv,NULL);   remove_contents(cauldron->inv,NULL);
  return;   return;
     } else if (level<80) {                /* MAJOR FIRE */      } else if (level<80) {                /* MAJOR FIRE */
  object *fb = get_archetype(SP_MED_FIREBALL);   object *fb = create_archetype(SP_MED_FIREBALL);
  remove_contents(cauldron->inv,NULL);   remove_contents(cauldron->inv,NULL);
  fire_arch_from_position(cauldron, cauldron,cauldron->x, cauldron->y,   fire_arch_from_position(cauldron, cauldron,cauldron->x, cauldron->y,
      0, fb);       0, fb);
Line 606
 
Line 606
   * to be made (rather than only those on the given    * to be made (rather than only those on the given
  * formulalist) */   * formulalist) */
  if(!rp) rp=get_random_recipe((recipelist *) NULL);   if(!rp) rp=get_random_recipe((recipelist *) NULL);
  if(rp && (tmp=get_archetype(rp->arch_name[RANDOM()%rp->arch_names]))) {    if(rp && (tmp=create_archetype(rp->arch_name[RANDOM()%rp->arch_names]))) {
      generate_artifact(tmp,random_roll(1, op->level/2+1, op, PREFER_HIGH)+1);       generate_artifact(tmp,random_roll(1, op->level/2+1, op, PREFER_HIGH)+1);
      if((tmp=insert_ob_in_ob(tmp,cauldron))) {        if((tmp=insert_ob_in_ob(tmp,cauldron))) {
  remove_contents(cauldron->inv,tmp);   remove_contents(cauldron->inv,tmp);
Line 616
 
Line 616
  }   }
  return;   return;
   } else {               /* MANA STORM - watch out!! */    } else {               /* MANA STORM - watch out!! */
  object *tmp = get_archetype(LOOSE_MANA);   object *tmp = create_archetype(LOOSE_MANA);
  new_draw_info(NDI_UNIQUE,0,op,"You unwisely release potent forces!");   new_draw_info(NDI_UNIQUE,0,op,"You unwisely release potent forces!");
  remove_contents (cauldron->inv,NULL);   remove_contents (cauldron->inv,NULL);
  cast_magic_storm(op,tmp, level);   cast_magic_storm(op,tmp, level);


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

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