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