xref: /dragonfly/games/phantasia/phantdefs.h (revision 25a2db75)
1 /*
2  * phantdefs.h - important constants for Phantasia
3  */
4 
5 /* ring constants */
6 #define	R_NONE		0		/* no ring */
7 #define	R_NAZREG	1		/* regular Nazgul ring (expires) */
8 #define	R_DLREG		2		/* regular Dark Lord ring (does not expire) */
9 #define	R_BAD		3		/* bad ring */
10 #define	R_SPOILED 	4		/* ring which has gone bad */
11 
12 /* status constants */
13 #define	S_NOTUSED	0		/* record not in use */
14 #define	S_OFF		1		/* not playing */
15 #define	S_PLAYING	2		/* playing - nothing else */
16 #define	S_CLOAKED	3		/* playing - cloaked */
17 #define	S_INBATTLE	4		/* playing - in battle */
18 #define	S_MONSTER	5		/* playing - fighting monster */
19 #define	S_TRADING	6		/* playing - at a trading post */
20 #define	S_HUNGUP	7		/* error occurred with character */
21 
22 /* tampered constants */
23 #define	T_OFF		0		/* nothing */
24 #define	T_NRGVOID	1		/* hit an energy void */
25 #define	T_GRAIL		2		/* landed on the holy grail */
26 #define	T_TRANSPORT	3		/* transported by king */
27 #define	T_BESTOW	4		/* gold bestowed by king */
28 #define	T_CURSED	5		/* cursed by king */
29 #define	T_MONSTER	6		/* monster lobbed by valar */
30 #define	T_BLESSED	7		/* blessed by valar */
31 #define	T_RELOCATE	8		/* moved by valar */
32 #define	T_HEAL		9		/* healed by valar */
33 #define	T_VAPORIZED	10		/* vaporized by wizard */
34 #define	T_EXVALAR	11		/* no longer valar */
35 
36 /* inter-terminal battle status constants */
37 #define	I_OFF		0		/* nothing */
38 #define	I_RAN		1		/* ran away */
39 #define	I_STUCK		2		/* tried to run unsuccessfully */
40 #define	I_BLEWIT	3		/* tried to luckout unsuccessfully */
41 #define	I_KILLED	4		/* killed foe */
42 
43 /* constants for altering coordinates */
44 #define	A_SPECIFIC	0		/* coordinates specified */
45 #define	A_FORCED	1		/* coordinates specified, ignore Beyond */
46 #define	A_NEAR		2		/* coordinates not specified, move near */
47 #define	A_FAR		3		/* coordinates not specified, move far */
48 
49 /* constants for character types */
50 #define	C_MAGIC		0		/* magic user */
51 #define	C_FIGHTER	1		/* fighter */
52 #define	C_ELF		2		/* elf */
53 #define	C_DWARF		3		/* dwarf */
54 #define	C_HALFLING	4		/* halfling */
55 #define	C_EXPER		5		/* experimento */
56 #define	C_SUPER		6		/* super being */
57 
58 /* constants for special character types */
59 #define	SC_NONE		0		/* not a special character */
60 #define	SC_KING		1		/* king */
61 #define	SC_COUNCIL	2		/* council of the wise */
62 #define	SC_VALAR	3		/* valar */
63 #define	SC_EXVALAR	4		/* ex-valar */
64 
65 /* special monster constants */
66 #define	SM_NONE		0		/* nothing special */
67 #define	SM_UNICORN	1		/* unicorn */
68 #define	SM_MODNAR	2		/* Modnar */
69 #define	SM_MIMIC	3		/* mimic */
70 #define	SM_DARKLORD	4		/* Dark Lord */
71 #define	SM_LEANAN	5		/* Leanan-Sidhe */
72 #define	SM_SARUMAN	6		/* Saruman */
73 #define	SM_THAUMATURG	7		/* thaumaturgist */
74 #define	SM_BALROG	8		/* balrog */
75 #define	SM_VORTEX	9		/* vortex */
76 #define	SM_NAZGUL	10		/* nazgul */
77 #define	SM_TIAMAT	11		/* Tiamat */
78 #define	SM_KOBOLD	12		/* kobold */
79 #define	SM_SHELOB	13		/* Shelob */
80 #define	SM_FAERIES	14		/* assorted faeries */
81 #define	SM_LAMPREY	15		/* lamprey */
82 #define	SM_SHRIEKER	16		/* shrieker */
83 #define	SM_BONNACON	17		/* bonnacon */
84 #define	SM_SMEAGOL	18		/* Smeagol */
85 #define	SM_SUCCUBUS	19		/* succubus */
86 #define	SM_CERBERUS	20		/* Cerberus */
87 #define	SM_UNGOLIANT	21		/* Ungoliant */
88 #define	SM_JABBERWOCK	22		/* jabberwock */
89 #define	SM_MORGOTH	23		/* Morgoth */
90 #define	SM_TROLL	24		/* troll */
91 #define	SM_WRAITH	25		/* wraith */
92 
93 /* constants for spells */
94 #define	ML_ALLORNOTHING	0.0		/* magic level for 'all or nothing' */
95 #define	MM_ALLORNOTHING	1.0		/* mana used for 'all or nothing' */
96 #define	ML_MAGICBOLT	5.0		/* magic level for 'magic bolt' */
97 #define	ML_FORCEFIELD	15.0		/* magic level for 'force field' */
98 #define	MM_FORCEFIELD	30.0		/* mana used for 'force field' */
99 #define	ML_XFORM	25.0		/* magic level for 'transform' */
100 #define	MM_XFORM	50.0		/* mana used for 'transform' */
101 #define	ML_INCRMIGHT	35.0		/* magic level for 'increase might' */
102 #define	MM_INCRMIGHT	75.0		/* mana used for 'increase might' */
103 #define	ML_INVISIBLE	45.0		/* magic level for 'invisibility' */
104 #define	MM_INVISIBLE	90.0		/* mana used for 'invisibility' */
105 #define	ML_XPORT	60.0		/* magic level for 'transport' */
106 #define	MM_XPORT	125.0		/* mana used for 'transport' */
107 #define	ML_PARALYZE	75.0		/* magic level for 'paralyze' */
108 #define	MM_PARALYZE	150.0		/* mana used for 'paralyze' */
109 #define	MM_SPECIFY	1000.0		/* mana used for 'specify' */
110 #define	ML_CLOAK	20.0		/* magic level for 'cloak' */
111 #define	MEL_CLOAK	7.0		/* experience level for 'cloak' */
112 #define	MM_CLOAK	35.0		/* mana used for 'cloak' */
113 #define	ML_TELEPORT	40.0		/* magic level for 'teleport' */
114 #define	MEL_TELEPORT	12.0		/* experience level for 'teleport' */
115 #define	MM_INTERVENE	1000.0		/* mana used to 'intervene' */
116 
117 /* some miscellaneous constants */
118 #define	SZ_DATABUF	100		/* size of input buffer */
119 #define	SZ_PLAYERSTRUCT	sizeof(struct player) /* size of player structure */
120 #define	SZ_VOIDSTRUCT	sizeof(struct energyvoid) /* size of energy void struct */
121 #define	SZ_SCORESTRUCT	sizeof(struct scoreboard) /* size of score board entry */
122 #define	SZ_MONSTERSTRUCT sizeof(struct monster) /* size of monster structure */
123 #define	SZ_NAME		21		/* size of player name (incl. trailing nul) */
124 #define	SZ_PASSWORD	9		/* size of password (incl. trailing nul) */
125 #define	SZ_LOGIN	9		/* size of login (incl. trailing nul) */
126 
127 #define	N_DAYSOLD	21		/* number of days old for purge */
128 #define	N_AGE		500		/* age to degenerate ratio */
129 #define	N_GEMVALUE	(1000.0)	/* number of gold pieces to gem ratio */
130 #define	N_TAXAMOUNT	(7.0)		/* tax percent */
131 
132 #define	D_BEYOND	(1.1e6)		/* distance to beyond point of no return */
133 #define	D_EXPER		(2000.0)	/* distance experimentos are allowed */
134 
135 #define	CH_MARKDELETE	'\001'		/* used to alter name of deleted players */
136 #define	CH_KILL		'\030'		/* kill character (ctrl-X) */
137 #define	CH_ERASE	'\010'		/* erase character (ctrl-H) */
138 #define	CH_NEWLINE	'\n'		/* newline */
139 #define	CH_REDRAW	'\014'		/* redraw screen character (ctrl-L) */
140