🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by William Pugh Wed, 22 May 1985 13:08
Bug (feature) in calculating carrying capacity
#655
Author: William Pugh
Date: Wed, 22 May 1985 13:08
35 lines
1673 bytes
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);
	}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads