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

Re: cf: some small bugs



>  Could you actually state what the two bracers where (how they differed)?
> I am curious to know what their differences where, so that I can have
> some idea if nrof 0 is really the best solution, or if it might be a bug
> someplace.

Example: you have in a shop the following items:
  - bracers (ac+1)
  - bracers (ac+1) (sustenance+1)
  - bracers +1 (ac+1)

When looking at the shop inventory you could see:
  two bracers (ac+1)
  bracers +1 (ac+1)

Or if you switch the places of the two first bracers you will see:
  two bracers (ac+1) (sustenance+1)
  bracers +1 (ac+1)


So it only checks things like: magic bonus, identified, detected magical,
was_worn.  I think the following diff would fix the thing.  This way you
can still have the ordinary bracers piled.

*** common/treasure.old	Fri Nov 25 17:35:28 1994
--- common/treasure.c	Fri Nov 25 17:35:58 1994
***************
*** 676,685 ****
--- 676,686 ----
      case BRACERS:
        if(!(RANDOM()%(QUERY_FLAG(op, FLAG_CURSED)?5:20))) {
          set_ring_bonus(op,QUERY_FLAG(op, FLAG_CURSED)?-DICE2:DICE2);
          if (!QUERY_FLAG(op, FLAG_CURSED))
            op->value*=3;
+         op->nrof=0;
        }
        break;
      case AMULET:
        if(op->arch==amulet_arch)
          op->value*=5; /* Since it's not just decoration */