[net.games.hack] Bug

pugh@cornell.UUCP (William Pugh) (05/22/85)

References:


-----
	There is a bug (feature?) in the routine inv_weight which calculates 
how much you can carry.  If your legs are wounded, your carried capacity is
decreased; irritating, but ok - however, this happens even if you are
levitating.  In fact, I think that if you are levitating, your carrying
capacity should be increased; it makes sense, and adds another use for 
potions of levitation.

	The following shows the changes that need to be made to reflect these
changes.

		Bill Pugh
		Cornell University


hack.c, line 776:

	inv_weight(){
	register struct obj *otmp = invent;
	register int wt = (u.ugold + 500)/1000;
	register int carrcap = 5*(((u.ustr > 18) ? 20 : u.ustr) + u.ulevel);
		if(carrcap > MAX_CARR_CAP) carrcap = MAX_CARR_CAP;
>		if (Levitation) carrcap += 20;
*	 	else { 	if(Wounded_legs & LEFT_SIDE) carrcap -= 10;
*	 		if(Wounded_legs & RIGHT_SIDE) carrcap -= 10;
*			}
		while(otmp){
			wt += otmp->owt;
			otmp = otmp->nobj;
		}
		return(wt - carrcap);
	}