[net.games.hack] merging objects on the inventory listing

aeb@mcvax.UUCP (Andries Brouwer) (07/09/85)

@    Last week Ken Arnold sent out a bug report + attempted fix
for the phenomenon that food rations or green gems or ...
are not always merged in the inventory, for no apparent reason.
     I had noticed this before and never worried about it, since
there was always the possibility that one of the two items
was cursed and the other not, and items with different
characteristics are not merged.
     However, now that it was mentioned explicitly I looked at
this problem again and found that there really is a small bug.
What happens is this: two objects are not merged unless the
"known" field is the same in both. But this field is significant
for only a few types of objects (rings, wands, weapons, armor and amulets)
and should not be accessed for other things.
Thus, a 100% solution is to modify the routine merged() in hack.invent.c
so as to test obj->known == otmp->known only in case obj->olet == WEAPON_SYM.
(A 99% solution would be to change the last 1 in the two trobj structures in
hack.u_init.c containing the line FOOD_SYM to 0.)
This fix will be part of the update to 1.0.3 to be distributed one of
these days, but I mention it already now to save people some needless
worry.
     Remains the question whether we want to eliminate cursed food
(gems, etc.). I have no strong opinion.