xref: /dragonfly/games/phantasia/phantstruct.h (revision b40e316c)
1 /*
2  * phantstruct.h - structure definitions for Phantasia
3  */
4 
5 struct	player	    	/* player statistics */
6     {
7     double	p_experience;	/* experience */
8     double	p_level;    	/* level */
9     double	p_strength;	/* strength */
10     double	p_sword;	/* sword */
11     double	p_might;	/* effect strength */
12     double	p_energy;	/* energy */
13     double	p_maxenergy;	/* maximum energy */
14     double	p_shield;	/* shield */
15     double	p_quickness;	/* quickness */
16     double	p_quksilver;	/* quicksilver */
17     double	p_speed;	/* effective quickness */
18     double	p_magiclvl;	/* magic level */
19     double	p_mana;		/* mana */
20     double	p_brains;	/* brains */
21     double	p_poison;	/* poison */
22     double	p_gold;		/* gold */
23     double	p_gems;		/* gems */
24     double	p_sin;		/* sin */
25     double	p_x;	    	/* x coord */
26     double	p_y;	    	/* y coord */
27     double	p_1scratch,
28 		p_2scratch;	/* variables used for decree, player battle */
29 
30     struct
31 	{
32 	short	ring_type;	/* type of ring */
33 	short	ring_duration;	/* duration of ring */
34 	bool	ring_inuse;	/* ring in use flag */
35 	}	p_ring;	    	/* ring stuff */
36 
37     long	p_age;		/* age of player */
38 
39     int		p_degenerated;	/* age/3000 last degenerated */
40 
41     short	p_type;		/* character type */
42     short	p_specialtype;	/* special character type */
43     short	p_lives;	/* multiple lives for council, valar */
44     short	p_crowns;	/* crowns */
45     short	p_charms;	/* charms */
46     short	p_amulets;	/* amulets */
47     short	p_holywater;   	/* holy water */
48     short	p_lastused;	/* day of year last used */
49     short	p_status;	/* playing, cloaked, etc. */
50     short	p_tampered;	/* decree'd, etc. flag */
51     short	p_istat;	/* used for inter-terminal battle */
52 
53     bool	p_palantir;	/* palantir */
54     bool	p_blessing;	/* blessing */
55     bool	p_virgin;	/* virgin */
56     bool	p_blindness;	/* blindness */
57 
58     char	p_name[SZ_NAME];	/* name */
59     char	p_password[SZ_PASSWORD];/* password */
60     char	p_login[SZ_LOGIN];	/* login */
61     };
62 
63 struct	monster	    	/* monster stats */
64     {
65     double	m_strength;	/* strength */
66     double	m_brains;	/* brains */
67     double	m_speed;	/* speed */
68     double	m_energy;	/* energy */
69     double	m_experience;	/* experience */
70     double	m_flock;    	/* % chance of flocking */
71 
72     double	m_o_strength;	/* original strength */
73     double	m_o_speed;	/* original speed */
74     double	m_maxspeed;	/* maximum speed */
75     double	m_o_energy;	/* original energy */
76     double	m_melee;	/* melee damage */
77     double	m_skirmish;	/* skirmish damage */
78 
79     int		m_treasuretype;	/* treasure type */
80     int		m_type;	    	/* special type */
81 
82     char	m_name[26];	/* name */
83     };
84 
85 struct	energyvoid     	/* energy void */
86     {
87     double	ev_x;		/* x coordinate */
88     double	ev_y;		/* y coordinate */
89     bool	ev_active;	/* active or not */
90     };
91 
92 struct	scoreboard			/* scoreboard entry */
93     {
94     double	sb_level;		/* level of player */
95     char	sb_type[4];		/* character type of player */
96     char	sb_name[SZ_NAME];	/* name of player */
97     char	sb_login[SZ_LOGIN];	/* login of player */
98     };
99 
100 struct	charstats			/* character type statistics */
101     {
102     double	c_maxbrains;		/* max brains per level */
103     double	c_maxmana;		/* max mana per level */
104     double	c_weakness;		/* how strongly poison affects player */
105     double	c_goldtote;		/* how much gold char can carry */
106     int		c_ringduration;		/* bad ring duration */
107     struct
108 	{
109 	double	base;		/* base for roll */
110 	double	interval;	/* interval for roll */
111 	double	increase;	/* increment per level */
112 	} c_quickness,		/* quickness */
113 	  c_strength,		/* strength */
114 	  c_mana,		/* mana */
115 	  c_energy,		/* energy level */
116 	  c_brains,		/* brains */
117 	  c_magiclvl;		/* magic level */
118     };
119 
120 struct menuitem				/* menu item for purchase */
121     {
122     char	*item;		/* menu item name */
123     double	cost;		/* cost of item */
124     };
125