[rec.games.moria] Bug in Umoria 4.85

tj@Alliant.COM (Tom Jaskiewicz) (06/01/88)

In article <26764@cmcl2.NYU.EDU> kaplan@cmcl2.UUCP (Laurence S. Kaplan) writes:
>After running Umoria 4.85 for months with a level 35+ character operating
>at level 2500+, I began to wonder why I was never seeing items marked as
>level 50 items.  Things like lordly protection rings, scrolls of *enchant*,
>ribbed plate, etc. were not to be found.  Well, I looked at the code and it
>seems in misc1.c an array called t_level is initialized where t_level[level]
>contains the number of items with level number equal to or below level. 
>The size of the array is MAX_OBJ_LEVEL which is 50.  However, note that
>there are really 51 levels since some items are marked level 0!  So the
>level 50 items were never getting counted in t_level.  The fix involved
>increasing the size of t_level to MAX_OBJ_LEVEL+1 and allowing the index
>to reach the value MAX_OBJ_LEVEL in misc2.c and the init code in misc1.c.

An alternative fix is to change all the level 50 items by turning them into
level 49 items.  The command to do this in vi is

	:s/50}/49}/

and is done to the the file treasures1.c

...!{linus,mit_eddie}!alliant!tj
--------------------------------
	"But boss, what if the company comes up against a customer
	that chooses their supplier by comparing rogue score files?"