Source:NetHack 3.0.0/you.h

Below is the full text to you.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/you.h#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)you.h	3.0	88/04/25 2.   /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3.    /* NetHack may be freely redistributed. See license for details. */ 4.     5.    #ifndef YOU_H 6.   #define YOU_H 7.    8.    #ifndef ATTRIB_H 9.   #include "attrib.h"  10. #endif 11.  #ifndef MONST_H 12.  #include "monst.h"  13. #endif 14.  #ifndef YOUPROP_H 15.  #include "youprop.h"  16. #endif 17.   18.   struct prop { 19.   20.   #define	TIMEOUT		007777	/* mask */ 21.   22.   #define	LEFT_RING	W_RINGL	/* 010000L */ 23.  #define	RIGHT_RING	W_RINGR	/* 020000L */ 24.  #define	LEFT_SIDE	LEFT_RING 25.  #define	RIGHT_SIDE	RIGHT_RING 26.  #define	BOTH_SIDES	(LEFT_SIDE | RIGHT_SIDE) 27.   28.   #define WORN_ARMOR	W_ARM	/* 040000L */ 29.  #define WORN_CLOAK	W_ARMC	/* 0100000L */ 30.  #define WORN_HELMET	W_ARMH	/* 0200000L */ 31.  #define WORN_SHIELD	W_ARMS	/* 0400000L */ 32.  #define WORN_GLOVES	W_ARMG	/* 01000000L */ 33.  #define WORN_BOOTS	W_ARMF	/* 02000000L */ 34.  #define	WORN_AMUL	W_AMUL	/* 04000000L */ 35.  #define	WORN_BLINDF	W_TOOL	/* 010000000L */ 36.  #ifdef SHIRT 37.  #define	WORN_SHIRT	W_ARMU	/* 020000000L */ 38.  #endif 39.  #define	INTRINSIC	040000000L 40.   41.    42.   	long p_flgs; 43.  	int (*p_tofn);	/* called after timeout */ 44.  };  45.    46.   struct you { 47.  	xchar ux, uy; 48.  	schar dx, dy, dz;	/* direction of move (or zap or ... ) */ 49.  	schar di;		/* direction of FF */ 50.  	xchar ux0, uy0;		/* initial position FF */ 51.  	xchar udisx, udisy;	/* last display pos */ 52.  	uchar usym;		/* usually '@' */ 53.  	int last_str_turn;	/* 0: none, 1: half turn, 2: full turn */ 54.  				/* +: turn right, -: turn left */ 55.  	boolean umoved;		/* changed map location (post-move) */ 56.  	unsigned udispl;	/* @ on display */ 57.  	unsigned ulevel;	/* 1 - MAXULEV */ 58.  	unsigned utrap;		/* trap timeout */ 59.  	unsigned utraptype;	/* defined if utrap nonzero */ 60.  #define	TT_BEARTRAP	0 61.  #define	TT_PIT		1 62.  #define	TT_WEB		2 63.  	unsigned uinshop;	/* used only in shk.c - (roomno+1) of shop */ 64.  	int	 uhunger;	/* refd only in eat.c and shk.c */ 65.  	unsigned uhs;		/* hunger state - see eat.c */ 66.   67.   	struct prop uprops[LAST_PROP+1]; 68.   69.   	unsigned umconf; 70.  	char *usick_cause; 71.  /* For messages referring to hands, eyes, feet, etc... when polymorphed */ 72.  #define ARM 0 73.  #define EYE 1 74.  #define FACE 2 75.  #define FINGER 3 76.  #define FINGERTIP 4 77.  #define FOOT 5 78.  #define HAND 6 79.  #define HANDED 7 80.  #define HEAD 8 81.  #define LEG 9 82.  #define LIGHT_HEADED 10 83.  #define NECK 11 84.  #define TOE 12 85.  #ifdef POLYSELF 86.  	int mh, mhmax, mtimedone, umonnum;	/* for polymorph-self */ 87.  	struct attribs	macurr,			/* for monster attribs */ 88.  			mamax;			/* for monster attribs */ 89.  	int ulycn;				/* lycanthrope type */ 90.  #endif 91.  	unsigned ucreamed; 92.  	unsigned uswallow;		/* set if swallowed by a monster */ 93.  	unsigned uswldtim;		/* time you have been swallowed */ 94.  #ifdef POLYSELF 95.  	Bitfield(uundetected,1);	/* if you're a hiding monster/piercer */ 96.  #endif 97.  #if defined(THEOLOGY) && defined(ELBERETH) 98.  	Bitfield(uhand_of_elbereth,1);	/* if you become Hand of Elbereth */ 99.  #endif 100. #ifdef MEDUSA 101. 	Bitfield(ukilled_medusa,1);	/* if you kill the medusa */ 102. #endif 103. 	Bitfield(uhave_amulet,1);	/* you're carrying the Amulet */ 104. #ifdef HARD 105. 	Bitfield(udemigod,1);		/* once you kill the wiz */ 106. 	unsigned udg_cnt;		/* how long you have been demigod */ 107. #endif 108. 	struct	attribs	acurr,		/* your current attributes (eg. str) */ 109. 			abon,		/* your bonus attributes (eg. str) */ 110. 			amax,		/* your max attributes (eg. str) */ 111. 			atemp,		/* used for temporary loss/gain */ 112. 			atime;		/* used for loss/gain countdown */ 113. #define U_CHAOTIC      -1		/* the value range of ualigntyp */ 114. #define U_NEUTRAL	0 115. #define U_LAWFUL	1 116. 	int 	ualign;			/* running alignment score */ 117. 	schar 	ualigntyp;		/* basic character alignment */ 118. #ifdef THEOLOGY 119. #define CONVERT 	2 120. 	schar   ualignbase[CONVERT];	/* for ualigntyp conversion record */ 121. #endif 122. 	schar uluck, moreluck;		/* luck and luck bonus */ 123. #define	LUCKADD		3	/* added value when carrying luck stone */ 124. #define Luck	(u.uluck + u.moreluck) 125. #define	LUCKMAX		10	/* on moonlit nights 11 */ 126. #define	LUCKMIN		(-10) 127. 	schar	udaminc; 128. 	schar	uac; 129. 	int	uhp,uhpmax; 130. #ifdef SPELLS 131. 	int	uen, uenmax;		/* magical energy - M. Stephenson */ 132. #endif 133. #ifdef THEOLOGY 134. 	int ugangr;			/* if the gods are angry at you */ 135. 	int ublessed, ublesscnt;	/* blessing/duration from #pray */ 136. #endif 137. 	long	ugold, ugold0; 138. 	long	uexp, urexp; 139. #ifdef ALTARS 140. 	long 	ucleansed;	/* to record moves when player was cleansed */ 141. #endif 142. 	int uinvault; 143. 	struct monst *ustuck; 144. 	int ugrave_arise; /* you die and become something aside from a ghost */ 145. 	int nr_killed[NUMMONS]; 	/* used for experience bookkeeping */ 146. };  147.   148.  #endif /* YOU_H /**/