Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: Bug(?) report about alchemy



I report the unexpected behavior for alchemy.

Players can make just one water of diamond
from n * water of wises and 3n * water of diamonds
for arbitrary integer n.
(n * water of diamonds will be expected at most.)

I've found it is related to the omission of "yield" in
lib/formulae.
This means that a similar behavior will cause on other 16 items.
(water of ruby, balm of transparency, figurine of flame, ....)

But I couldn't find the definition of "yield" in doc/* and lib/formulae.
If omission of "yield" means "yield 1",
then it is a bug
and the following patch is useful to fix it.


*** server/alchemy.c.org	Thu Jan 15 16:43:00 1998
--- server/alchemy.c		Thu Jan 15 16:46:58 1998
***************
*** 211,217 ****
  
    if((item=make_item_from_recipe(cauldron,rp))!=NULL) { 
      remove_contents(cauldron->inv,item);
!     adjust_product(item,ability,rp->yield*batches); /* adj lvl, nrof on caster level */ 
      if(!item->env && (item=insert_ob_in_ob(item,cauldron))==NULL) { 
        new_draw_info(NDI_UNIQUE, 0,caster,"Nothing happened.");
        /* new_draw_info_format(NDI_UNIQUE, 0,caster, 
--- 211,217 ----
  
    if((item=make_item_from_recipe(cauldron,rp))!=NULL) { 
      remove_contents(cauldron->inv,item);
!     adjust_product(item,ability,rp->yield?(rp->yield*batches):batches); /* adj lvl, nrof on caster level */ 
      if(!item->env && (item=insert_ob_in_ob(item,cauldron))==NULL) { 
        new_draw_info(NDI_UNIQUE, 0,caster,"Nothing happened.");
        /* new_draw_info_format(NDI_UNIQUE, 0,caster, 

-------------
s-nisita@ics.es.osaka-u.ac.jp
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]