Wikia

Wikihack

Source:NetHack 1.3d/you.h

2,032pages on
this wiki
Talk0

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

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

Screenshots and source code from Hack are used under the CWI license.
1.    /*	SCCS Id: @(#)you.h	1.3	87/07/14
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* you.h - version 1 */
4.    
5.    #include "config.h"
6.    #include "onames.h"
7.    #include "permonst.h"
8.    
9.    struct prop {
10.   #define	TIMEOUT		007777	/* mask */
11.   #define	LEFT_RING	W_RINGL	/* 010000L */
12.   #define	RIGHT_RING	W_RINGR	/* 020000L */
13.   #define	INTRINSIC	040000L
14.   #define	LEFT_SIDE	LEFT_RING
15.   #define	RIGHT_SIDE	RIGHT_RING
16.   #define	BOTH_SIDES	(LEFT_SIDE | RIGHT_SIDE)
17.   	long p_flgs;
18.   	int (*p_tofn)();	/* called after timeout */
19.   };
20.   
21.   struct you {
22.   	xchar ux, uy;
23.   	schar dx, dy, dz;	/* direction of move (or zap or ... ) */
24.   	schar di;		/* direction of FF */
25.   	xchar ux0, uy0;		/* initial position FF */
26.   	xchar udisx, udisy;	/* last display pos */
27.   	char usym;		/* usually '@' */
28.   	schar uluck;
29.   #define	LUCKMAX		10	/* on moonlit nights 11 */
30.   #define	LUCKMIN		(-10)
31.   	int last_str_turn;	/* 0: none, 1: half turn, 2: full turn */
32.   				/* +: turn right, -: turn left */
33.   	unsigned udispl;	/* @ on display */
34.   	unsigned ulevel;	/* 1 - 14 */
35.   #ifdef QUEST
36.   	unsigned uhorizon;
37.   #endif
38.   	unsigned utrap;		/* trap timeout */
39.   	unsigned utraptype;	/* defined if utrap nonzero */
40.   #define	TT_BEARTRAP	0
41.   #define	TT_PIT		1
42.   #ifdef SPIDERS
43.   #define	TT_WEB		2
44.   #endif SPIDERS
45.   	unsigned uinshop;	/* used only in shk.c - (roomno+1) of shop */
46.   
47.   /* perhaps these #define's should also be generated by makedefs */
48.   #define	TELEPAT		LAST_RING		/* not a ring */
49.   #define	HTelepat	u.uprops[TELEPAT].p_flgs
50.   #define	Telepat		((HTelepat) || (u.usym == 'E'))
51.   #define	FAST		(LAST_RING+1)		/* not a ring */
52.   #define	Fast		u.uprops[FAST].p_flgs
53.   #define	CONFUSION	(LAST_RING+2)		/* not a ring */
54.   #define	HConfusion	u.uprops[CONFUSION].p_flgs
55.   #define Confusion	((HConfusion) || index("BIy", u.usym))
56.   #define	INVIS		(LAST_RING+3)		/* not a ring */
57.   #define	HInvis		u.uprops[INVIS].p_flgs
58.   #define Invis		((HInvis) || u.usym == 'I')
59.   #define Invisible	(Invis && !See_invisible)
60.   #define	GLIB		(LAST_RING+4)		/* not a ring */
61.   #define	Glib		u.uprops[GLIB].p_flgs
62.   #define	PUNISHED	(LAST_RING+5)		/* not a ring */
63.   #define	Punished	u.uprops[PUNISHED].p_flgs
64.   #define	SICK		(LAST_RING+6)		/* not a ring */
65.   #define	Sick		u.uprops[SICK].p_flgs
66.   #define	BLIND		(LAST_RING+7)		/* not a ring */
67.   #define	Blind		u.uprops[BLIND].p_flgs
68.   #define	WOUNDED_LEGS	(LAST_RING+8)		/* not a ring */
69.   #define Wounded_legs	u.uprops[WOUNDED_LEGS].p_flgs
70.   #define STONED		(LAST_RING+9)		/* not a ring */
71.   #define Stoned		u.uprops[STONED].p_flgs
72.   #define HALLUCINATION	(LAST_RING+10)		/* not a ring */
73.   #define Hallucination	u.uprops[HALLUCINATION].p_flgs
74.   #define PROP(x) (x-RIN_ADORNMENT)       /* convert ring to index in uprops */
75.   	unsigned umconf;
76.   	char *usick_cause;
77.   	struct prop uprops[LAST_RING+11];
78.   	int mh, mhmax, mtimedone, umonnum;	    /* for polymorph-self */
79.   #if defined(KOPS) && defined(KAA)
80.   	unsigned ucreamed;
81.   #endif
82.   	unsigned uswallow;		/* set if swallowed by a monster */
83.   	unsigned uswldtim;		/* time you have been swallowed */
84.   	unsigned uhs;			/* hunger state - see hack.eat.c */
85.   #ifdef HARD
86.   	unsigned udemigod;		/* once you kill the wiz */
87.   	unsigned udg_cnt;		/* how long you have been demigod */
88.   #endif
89.   	schar ustr,ustrmax;
90.   	schar udaminc;
91.   	schar uac;
92.   	int uhp,uhpmax;
93.   #ifdef SPELLS
94.   	int uen,uenmax;			/* magical energy - M. Stephenson */
95.   #endif
96.   #ifdef PRAYERS
97.   	int ugangr;			/* if the gods are angry at you */
98.   	int ublessed,ublesscnt;		/* blessing/duration from #pray */
99.   #endif
100.  	long int ugold,ugold0,uexp,urexp;
101.  	int uhunger;			/* refd only in eat.c and shk.c */
102.  	int uinvault;
103.  	struct monst *ustuck;
104.  	int nr_killed[CMNUM+2];		/* used for experience bookkeeping */
105.  };

Around Wikia's network

Random Wiki