xref: /netbsd-src/games/phantasia/phantstruct.h (revision 58b3287ba1126b63666fb96bb525cb593cd11b5e)
1*58b3287bSjsm /*	$NetBSD: phantstruct.h,v 1.5 2005/02/15 12:58:21 jsm Exp $	*/
29209ce5aSross 
39209ce5aSross #define bool char
4*58b3287bSjsm /* phbool is used when we need this version of bool after <curses.h>.  */
5*58b3287bSjsm #define phbool char
6dcfebd78Scgd 
786a62b8dSjtc /*
886a62b8dSjtc  * phantstruct.h - structure definitions for Phantasia
986a62b8dSjtc  */
1086a62b8dSjtc 
1186a62b8dSjtc struct	player	    	/* player statistics */
1286a62b8dSjtc     {
1386a62b8dSjtc     double	p_experience;	/* experience */
1486a62b8dSjtc     double	p_level;    	/* level */
1586a62b8dSjtc     double	p_strength;	/* strength */
1686a62b8dSjtc     double	p_sword;	/* sword */
1786a62b8dSjtc     double	p_might;	/* effect strength */
1886a62b8dSjtc     double	p_energy;	/* energy */
1986a62b8dSjtc     double	p_maxenergy;	/* maximum energy */
2086a62b8dSjtc     double	p_shield;	/* shield */
2186a62b8dSjtc     double	p_quickness;	/* quickness */
2286a62b8dSjtc     double	p_quksilver;	/* quicksilver */
2386a62b8dSjtc     double	p_speed;	/* effective quickness */
2486a62b8dSjtc     double	p_magiclvl;	/* magic level */
2586a62b8dSjtc     double	p_mana;		/* mana */
2686a62b8dSjtc     double	p_brains;	/* brains */
2786a62b8dSjtc     double	p_poison;	/* poison */
2886a62b8dSjtc     double	p_gold;		/* gold */
2986a62b8dSjtc     double	p_gems;		/* gems */
3086a62b8dSjtc     double	p_sin;		/* sin */
3186a62b8dSjtc     double	p_x;	    	/* x coord */
3286a62b8dSjtc     double	p_y;	    	/* y coord */
3386a62b8dSjtc     double	p_1scratch,
3486a62b8dSjtc 		p_2scratch;	/* variables used for decree, player battle */
3586a62b8dSjtc 
3686a62b8dSjtc     struct
3786a62b8dSjtc 	{
3886a62b8dSjtc 	short	ring_type;	/* type of ring */
3986a62b8dSjtc 	short	ring_duration;	/* duration of ring */
4086a62b8dSjtc 	bool	ring_inuse;	/* ring in use flag */
4186a62b8dSjtc 	}	p_ring;	    	/* ring stuff */
4286a62b8dSjtc 
4386a62b8dSjtc     long	p_age;		/* age of player */
4486a62b8dSjtc 
4586a62b8dSjtc     int		p_degenerated;	/* age/3000 last degenerated */
4686a62b8dSjtc 
4786a62b8dSjtc     short	p_type;		/* character type */
4886a62b8dSjtc     short	p_specialtype;	/* special character type */
4986a62b8dSjtc     short	p_lives;	/* multiple lives for council, valar */
5086a62b8dSjtc     short	p_crowns;	/* crowns */
5186a62b8dSjtc     short	p_charms;	/* charms */
5286a62b8dSjtc     short	p_amulets;	/* amulets */
5386a62b8dSjtc     short	p_holywater;   	/* holy water */
5486a62b8dSjtc     short	p_lastused;	/* day of year last used */
5586a62b8dSjtc     short	p_status;	/* playing, cloaked, etc. */
5686a62b8dSjtc     short	p_tampered;	/* decree'd, etc. flag */
5786a62b8dSjtc     short	p_istat;	/* used for inter-terminal battle */
5886a62b8dSjtc 
5986a62b8dSjtc     bool	p_palantir;	/* palantir */
6086a62b8dSjtc     bool	p_blessing;	/* blessing */
6186a62b8dSjtc     bool	p_virgin;	/* virgin */
6286a62b8dSjtc     bool	p_blindness;	/* blindness */
6386a62b8dSjtc 
6486a62b8dSjtc     char	p_name[SZ_NAME];	/* name */
6586a62b8dSjtc     char	p_password[SZ_PASSWORD];/* password */
6686a62b8dSjtc     char	p_login[SZ_LOGIN];	/* login */
6786a62b8dSjtc     };
6886a62b8dSjtc 
6986a62b8dSjtc struct	monster	    	/* monster stats */
7086a62b8dSjtc     {
7186a62b8dSjtc     double	m_strength;	/* strength */
7286a62b8dSjtc     double	m_brains;	/* brains */
7386a62b8dSjtc     double	m_speed;	/* speed */
7486a62b8dSjtc     double	m_energy;	/* energy */
7586a62b8dSjtc     double	m_experience;	/* experience */
7686a62b8dSjtc     double	m_flock;    	/* % chance of flocking */
7786a62b8dSjtc 
7886a62b8dSjtc     double	m_o_strength;	/* original strength */
7986a62b8dSjtc     double	m_o_speed;	/* original speed */
8086a62b8dSjtc     double	m_maxspeed;	/* maximum speed */
8186a62b8dSjtc     double	m_o_energy;	/* original energy */
8286a62b8dSjtc     double	m_melee;	/* melee damage */
8386a62b8dSjtc     double	m_skirmish;	/* skirmish damage */
8486a62b8dSjtc 
8586a62b8dSjtc     int		m_treasuretype;	/* treasure type */
8686a62b8dSjtc     int		m_type;	    	/* special type */
8786a62b8dSjtc 
8886a62b8dSjtc     char	m_name[26];	/* name */
8986a62b8dSjtc     };
9086a62b8dSjtc 
9186a62b8dSjtc struct	energyvoid     	/* energy void */
9286a62b8dSjtc     {
9386a62b8dSjtc     double	ev_x;		/* x coordinate */
9486a62b8dSjtc     double	ev_y;		/* y coordinate */
9586a62b8dSjtc     bool	ev_active;	/* active or not */
9686a62b8dSjtc     };
9786a62b8dSjtc 
9886a62b8dSjtc struct	scoreboard			/* scoreboard entry */
9986a62b8dSjtc     {
10086a62b8dSjtc     double	sb_level;		/* level of player */
10186a62b8dSjtc     char	sb_type[4];		/* character type of player */
10286a62b8dSjtc     char	sb_name[SZ_NAME];	/* name of player */
10386a62b8dSjtc     char	sb_login[SZ_LOGIN];	/* login of player */
10486a62b8dSjtc     };
10586a62b8dSjtc 
10686a62b8dSjtc struct	charstats			/* character type statistics */
10786a62b8dSjtc     {
10886a62b8dSjtc     double	c_maxbrains;		/* max brains per level */
10986a62b8dSjtc     double	c_maxmana;		/* max mana per level */
11086a62b8dSjtc     double	c_weakness;		/* how strongly poison affects player */
11186a62b8dSjtc     double	c_goldtote;		/* how much gold char can carry */
11286a62b8dSjtc     int		c_ringduration;		/* bad ring duration */
11386a62b8dSjtc     struct
11486a62b8dSjtc 	{
11586a62b8dSjtc 	double	base;		/* base for roll */
11686a62b8dSjtc 	double	interval;	/* interval for roll */
11786a62b8dSjtc 	double	increase;	/* increment per level */
11886a62b8dSjtc 	} c_quickness,		/* quickness */
11986a62b8dSjtc 	  c_strength,		/* strength */
12086a62b8dSjtc 	  c_mana,		/* mana */
12186a62b8dSjtc 	  c_energy,		/* energy level */
12286a62b8dSjtc 	  c_brains,		/* brains */
12386a62b8dSjtc 	  c_magiclvl;		/* magic level */
12486a62b8dSjtc     };
12586a62b8dSjtc 
12686a62b8dSjtc struct menuitem				/* menu item for purchase */
12786a62b8dSjtc     {
128092d3130Sjsm     const char	*item;		/* menu item name */
12986a62b8dSjtc     double	cost;		/* cost of item */
13086a62b8dSjtc     };
131