Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: alchemy.c diff (the FINAL one).
- To: crossfire (at) ifi.uio.no
- Subject: CF: alchemy.c diff (the FINAL one).
- From: "Brian Thomas" <>
- Date: Tue, 27 Aug 96 14:20:36 EDT
- Sender: owner-crossfire
*** ../../tarfiles/crossfire-0.92.5/server/alchemy.c Wed Jul 24 03:45:49 1996
--- ./alchemy.c Tue Aug 27 14:10:49 1996
***************
*** 346,374 ****
/* special stuff for consumables */
if(tmp->type==POTION||tmp->type==FOOD) {
if(tmp->stats.sp&&RANDOM()%2) /* drains magic */
tmp->stats.sp = SP_REGENERATE_SPELLPOINTS;
if(RANDOM()%2) { /* poisonous */
tmp->type=FOOD;
tmp->stats.hp=RANDOM()%150;
}
}
! /* change stats downward */
! if(tmp->type!=FOOD)
! do {
! change_attr_value(&tmp->stats,RANDOM()%6,-1*RANDOM()%3);
! } while (RANDOM()%3);
}
return;
} if(level==40) { /* MAKE RANDOM RECIPE */
recipelist *fl;
int numb=numb_ob_inside(cauldron);
! fl=get_formulalist(numb);
if(fl &&(rp=get_random_recipe(fl)))
(void) attempt_recipe(op,cauldron,rp);
else
alchemy_failure_effect(op,cauldron,rp,level-1);
return;
--- 346,377 ----
/* special stuff for consumables */
if(tmp->type==POTION||tmp->type==FOOD) {
if(tmp->stats.sp&&RANDOM()%2) /* drains magic */
tmp->stats.sp = SP_REGENERATE_SPELLPOINTS;
+ else
+ tmp->stats.sp = 0; /* so it can drain stats */
if(RANDOM()%2) { /* poisonous */
tmp->type=FOOD;
tmp->stats.hp=RANDOM()%150;
}
}
! tmp->value = 0; /* unsaleable item */
!
! /* change stats downward */
! do {
! change_attr_value(&tmp->stats,RANDOM()%7,-1*(RANDOM()%3+1));
! } while (RANDOM()%3);
}
return;
} if(level==40) { /* MAKE RANDOM RECIPE */
recipelist *fl;
int numb=numb_ob_inside(cauldron);
! fl=get_formulalist(numb-1); /* take a lower recipe list */
if(fl &&(rp=get_random_recipe(fl)))
(void) attempt_recipe(op,cauldron,rp);
else
alchemy_failure_effect(op,cauldron,rp,level-1);
return;