Article View: net.games.hack
Article #655Bug (feature) in calculating carrying capacity
From: William Pugh
Date: Wed, 22 May 1985 13:08
Date: Wed, 22 May 1985 13:08
35 lines
1673 bytes
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);
}
Technical Details
Message-ID:
<1918@cornell.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!harpo!whuxlm!whuxl!houxm!vax135!cornell!pughShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site cornell.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!harpo!whuxlm!whuxl!houxm!vax135!cornell!pugh From: pugh@cornell.UUCP (William Pugh) Newsgroups: net.games.hack Subject: Bug (feature) in calculating carrying capacity Message-ID: <1918@cornell.UUCP> Date: Wed, 22-May-85 09:08:24 EDT Article-I.D.: cornell.1918 Posted: Wed May 22 09:08:24 1985 Date-Received: Fri, 24-May-85 21:50:13 EDT Reply-To: pugh@gvax.UUCP (William Pugh) Distribution: net Organization: Cornell Univ. CS Dept. Lines: 34