Mercurial > hg > early-roguelike
comparison xrogue/rogue.c @ 133:e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
author | John "Elwin" Edwards |
---|---|
date | Tue, 21 Apr 2015 08:55:20 -0400 |
parents | |
children | 1fbdefa82533 |
comparison
equal
deleted
inserted
replaced
124:d10fc4a065ac | 133:e6179860cb76 |
---|---|
1 /* | |
2 rogue.c - Global game variables | |
3 | |
4 XRogue: Expeditions into the Dungeons of Doom | |
5 Copyright (C) 1991 Robert Pietkivitch | |
6 All rights reserved. | |
7 | |
8 Based on "Advanced Rogue" | |
9 Copyright (C) 1984, 1985 Michael Morgan, Ken Dalka and AT&T | |
10 All rights reserved. | |
11 | |
12 Based on "Rogue: Exploring the Dungeons of Doom" | |
13 Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman | |
14 All rights reserved. | |
15 | |
16 See the file LICENSE.TXT for full copyright and licensing information. | |
17 */ | |
18 | |
19 #include <ctype.h> | |
20 #include <curses.h> | |
21 #include "rogue.h" | |
22 | |
23 /* | |
24 * Now all the global variables | |
25 */ | |
26 | |
27 struct trap traps[MAXTRAPS]; | |
28 struct room rooms[MAXROOMS]; /* One for each room -- A level */ | |
29 struct room *oldrp; /* Roomin(&player.t_oldpos) */ | |
30 struct thing player; /* The rogue */ | |
31 struct object *cur_armor; /* What a well dresssed rogue wears */ | |
32 struct object *cur_ring[NUM_FINGERS]; /* Which rings are being worn */ | |
33 struct object *cur_misc[NUM_MM]; /* which MM's are in use */ | |
34 int cur_relic[MAXRELIC]; /* Currently used relics */ | |
35 struct linked_list *lvl_obj = NULL; | |
36 struct linked_list *mlist = NULL; | |
37 struct linked_list *rlist = NULL; /* list of dead monsters to be reaped */ | |
38 struct linked_list *tlist = NULL; /* list of monsters fallen down traps */ | |
39 struct linked_list *monst_dead = NULL; /* monster killed by monster */ | |
40 struct object *cur_weapon = NULL; | |
41 int char_type = -1; /* what type of character is player */ | |
42 int foodlev = 1; /* how fast he eats food */ | |
43 int ntraps; /* Number of traps on this level */ | |
44 int trader = 0; /* no. of purchases */ | |
45 int curprice = -1; /* current price of item */ | |
46 int seed; /* Random number seed */ | |
47 int max_level; /* Deepest player has gone ever */ | |
48 int cur_max; /* Deepest player has gone currently */ | |
49 int prev_max; /* A flag indicating worm hole */ | |
50 int move_free = 0; /* Movement check (io.c & actions.c) */ | |
51 int mpos = 0; | |
52 int level = 0; | |
53 long purse = 0; | |
54 int inpack = 0; | |
55 int total = 0; | |
56 int no_food = 0; /* how long has he gone with no food */ | |
57 int foods_this_level = 0; /* foods made per level */ | |
58 int count = 0; | |
59 int food_left = STOMACHSIZE-MORETIME-1; | |
60 int group = 1; | |
61 int hungry_state = F_OKAY; | |
62 int infest_dam=0; | |
63 int lost_str=0; | |
64 int lastscore = -1; | |
65 int hold_count = 0; | |
66 int trap_tries = 0; | |
67 int chant_time = 0; | |
68 int pray_time = 0; | |
69 int spell_power = 0; | |
70 long turns = 0; /* Number of turns player has taken */ | |
71 int quest_item = 0; /* Item player is looking for */ | |
72 int cols = 0; /* number of columns in terminal */ | |
73 int lines = 0; /* number of lines on the terminal */ | |
74 int nfloors = -1; /* Number of floors in this dungeon */ | |
75 char curpurch[LINELEN]; /* name of item ready to buy */ | |
76 char PLAYER = VPLAYER; /* what the player looks like */ | |
77 char take; /* Thing the rogue is taking */ | |
78 char prbuf[LINELEN*2]; /* Buffer for sprintfs */ | |
79 char runch; /* Direction player is running */ | |
80 char *s_names[MAXSCROLLS]; /* Names of the scrolls */ | |
81 char *p_colors[MAXPOTIONS]; /* Colors of the potions */ | |
82 char *r_stones[MAXRINGS]; /* Stone settings of the rings */ | |
83 char *ws_made[MAXSTICKS]; /* What sticks are made of */ | |
84 char whoami[LINELEN]; /* Name of player */ | |
85 char huh[LINELEN]; /* The last message printed */ | |
86 char *s_guess[MAXSCROLLS]; /* Players guess at what scroll is */ | |
87 char *p_guess[MAXPOTIONS]; /* Players guess at what potion is */ | |
88 char *r_guess[MAXRINGS]; /* Players guess at what ring is */ | |
89 char *ws_guess[MAXSTICKS]; /* Players guess at what wand is */ | |
90 char *m_guess[MAXMM]; /* Players guess at what MM is */ | |
91 char *ws_type[MAXSTICKS]; /* Is it a wand or a staff */ | |
92 char file_name[LINELEN]; /* Save file name */ | |
93 char score_file[LINELEN]; /* Score file name */ | |
94 char home[LINELEN]; /* User's home directory */ | |
95 WINDOW *cw; /* Window that the player sees */ | |
96 WINDOW *hw; /* Used for the help command */ | |
97 WINDOW *mw; /* Used to store monsters */ | |
98 WINDOW *msgw; /* Used to display messages */ | |
99 bool pool_teleport = FALSE; /* just teleported from a pool */ | |
100 bool inwhgt = FALSE; /* true if from wghtchk() */ | |
101 bool after; /* True if we want after daemons */ | |
102 bool waswizard; /* Was a wizard sometime */ | |
103 bool s_know[MAXSCROLLS]; /* Does he know what a scroll does */ | |
104 bool p_know[MAXPOTIONS]; /* Does he know what a potion does */ | |
105 bool r_know[MAXRINGS]; /* Does he know what a ring does */ | |
106 bool ws_know[MAXSTICKS]; /* Does he know what a stick does */ | |
107 bool m_know[MAXMM]; /* Does he know what a MM does */ | |
108 | |
109 /* options */ | |
110 bool playing = TRUE; /* Defaults */ | |
111 bool running = FALSE; | |
112 bool wizard = FALSE; | |
113 bool notify = TRUE; | |
114 bool fight_flush = FALSE; | |
115 bool terse = FALSE; | |
116 bool auto_pickup = FALSE; | |
117 bool def_attr = FALSE; /* default attributes */ | |
118 bool menu_overlay = TRUE; | |
119 bool door_stop = TRUE; | |
120 bool jump = TRUE; | |
121 bool slow_invent = FALSE; | |
122 bool firstmove = FALSE; | |
123 bool askme = TRUE; | |
124 bool in_shell = FALSE; | |
125 bool daytime = TRUE; | |
126 bool funfont = FALSE; | |
127 | |
128 LEVTYPE levtype; /* what type of level am i'm on? */ | |
129 | |
130 char *nothing = "Nothing seems to happen. "; | |
131 char *spacemsg = "--Press space to continue--"; | |
132 char *morestr = " --More--"; | |
133 char *retstr = "[Press return to continue]"; | |
134 | |
135 /* | |
136 * This lays out all the class specific details | |
137 * | |
138 * Here are the beginning experience levels for all players. | |
139 * All further experience levels are computed by muliplying by 2 | |
140 * up through MAXDOUBLE. Then exp pts are calculated by adding | |
141 * in the cap figure. You must change MAXDOUBLE if you change the | |
142 * cap figure. | |
143 */ | |
144 | |
145 struct character_types char_class[NUM_CHARTYPES] = { | |
146 /* name exppts cap hitpts Base Maxlvl, Factor, Offset, Range */ | |
147 { "fighter", 90, 1310720, 13, 10, 30, 2, 1, 3 }, | |
148 { "ranger", 110, 2293760, 10, 10, 22, 2, 1, 2 }, | |
149 { "paladin", 110, 1966080, 10, 10, 23, 2, 1, 2 }, | |
150 { "magician", 105, 2129920, 9, 10, 24, 2, 1, 2 }, | |
151 { "cleric", 105, 1802240, 9, 10, 24, 2, 1, 2 }, | |
152 { "thief", 95, 1228800, 11, 10, 28, 2, 1, 3 }, | |
153 { "assassin", 95, 1392640, 11, 10, 26, 2, 1, 3 }, | |
154 { "druid", 105, 1638400, 9, 10, 24, 2, 1, 2 }, | |
155 { "monk", 100, 1556480, 10, 10, 25, 2, 1, 2 }, | |
156 { "monster", 0, 0, 8, 10, 20, 1, 0, 2 }, | |
157 }; | |
158 | |
159 /* | |
160 * This array lists the names of the character's abilities. It must be ordered | |
161 * according to the ability definitions in rogue.h. | |
162 */ | |
163 | |
164 struct words abilities[NUMABILITIES] = { | |
165 "Intelligence", "Strength", "Wisdom", "Dexterity", "Constitution", "Charisma" | |
166 }; | |
167 | |
168 /* | |
169 * NOTE: the ordering of the points in this array is critical. They MUST | |
170 * be listed in the following sequence: | |
171 * | |
172 * 7 4 6 | |
173 * 1 0 2 | |
174 * 5 3 8 | |
175 */ | |
176 | |
177 coord grid[9] = {{0,0}, | |
178 { 0,-1}, { 0, 1}, {-1, 0}, { 1, 0}, | |
179 {-1,-1}, { 1, 1}, { 1,-1}, {-1, 1} | |
180 }; | |
181 | |
182 struct death_type deaths[DEATHNUM] = { | |
183 { D_ARROW, "an arrow"}, | |
184 { D_DART, "a dart"}, | |
185 { D_BOLT, "a bolt"}, | |
186 { D_POISON, "poison"}, | |
187 { D_POTION, "a cursed potion"}, | |
188 { D_PETRIFY, "petrification"}, | |
189 { D_SUFFOCATION, "suffocation"}, | |
190 { D_INFESTATION, "a parasite"}, | |
191 { D_DROWN, "drowning"}, | |
192 { D_ROT, "body rot"}, | |
193 { D_CONSTITUTION, "poor health"}, | |
194 { D_STRENGTH, "being too weak"}, | |
195 { D_SIGNAL, "a bug"}, | |
196 { D_CHOKE, "dust of choking"}, | |
197 { D_STRANGLE, "strangulation"}, | |
198 { D_FALL, "a fall"}, | |
199 { D_RELIC, "an artifact's wrath"}, | |
200 { D_STARVATION, "starvation"}, | |
201 { D_FOOD_CHOKE, "choking on food"}, | |
202 { D_SCROLL, "reading a scroll"}, | |
203 { D_FRIGHT, "being too frightened"}, | |
204 { D_CRYSTAL, "being absorbed"}, | |
205 { D_CARD, "the face of death"}, | |
206 }; | |
207 | |
208 /* | |
209 * weapons and their attributes | |
210 */ | |
211 | |
212 struct init_weps weaps[MAXWEAPONS] = { | |
213 { "mace", "2d10","2d10", NONE, ISMETAL, 6, 150, 15 }, | |
214 { "long sword", "3d4", "2d8", NONE, ISMETAL, 5, 200, 25 }, | |
215 { "short bow", "1d1", "1d1", NONE, 0, 8, 50, 4 }, | |
216 { "arrow", "2d4", "1d6", BOW, ISMANY|ISMISL, 1, 5, 4 }, | |
217 { "dagger", "2d8", "1d6", NONE, ISMETAL|ISMISL|ISMANY, 2,10,7}, | |
218 { "rock", "2d4", "1d6", SLING, ISMANY|ISMISL, 1, 20, 3 }, | |
219 { "two-handed sword","3d10","3d8", NONE, ISMETAL, 4, 250, 40 }, | |
220 { "sling", "1d1", "1d1", NONE, 0, 8, 25, 3 }, | |
221 { "dart", "2d4", "2d6", NONE, ISMANY|ISMISL, 2, 15, 7 }, | |
222 { "crossbow", "1d1", "1d1", NONE, 0, 8, 75, 5 }, | |
223 { "crossbow bolt", "2d4", "2d4", CROSSBOW, ISMANY|ISMISL, 1, 10, 5 }, | |
224 { "spear", "2d6", "3d10", NONE, ISMISL, 7, 100, 15 }, | |
225 { "trident", "3d6", "3d4", NONE, ISMETAL, 4, 200, 30 }, | |
226 { "spetum", "2d6", "2d8", NONE, ISMETAL, 6, 150, 20 }, | |
227 { "bardiche", "3d4", "2d10", NONE, ISMETAL, 5, 150, 25 }, | |
228 { "pike", "2d8", "2d8", NONE, ISMETAL, 7, 100, 15 }, | |
229 { "bastard sword", "3d8", "3d6", NONE, ISMETAL, 4, 175, 30 }, | |
230 { "halberd", "2d8", "2d4", NONE, ISMETAL, 6, 100, 10 }, | |
231 { "battle axe", "2d8", "3d8", NONE, ISMETAL, 5, 150, 15 }, | |
232 } ; | |
233 | |
234 struct init_armor armors[MAXARMORS] = { | |
235 { "leather armor", 10, 8, 200, 100 }, | |
236 { "ring mail", 20, 7, 250, 200 }, | |
237 { "studded leather armor", 30, 5, 320, 250 }, | |
238 { "scale mail", 40, 7, 280, 250 }, | |
239 { "padded armor", 50, 6, 350, 300 }, | |
240 { "chain mail", 60, 6, 350, 600 }, | |
241 { "splint mail", 70, 5, 370, 400 }, | |
242 { "banded mail", 80, 5, 370, 350 }, | |
243 { "plate mail", 90, 4, 400, 400 }, | |
244 { "plate armor", 100, 3, 500, 450 }, | |
245 }; | |
246 | |
247 struct magic_item things[NUMTHINGS] = { | |
248 { "potion", 220, 10 }, /* potion */ | |
249 { "scroll", 220, 30 }, /* scroll */ | |
250 { "food", 190, 20 }, /* food */ | |
251 { "weapon", 90, 0 }, /* weapon */ | |
252 { "armor", 90, 0 }, /* armor */ | |
253 { "ring", 70, 5 }, /* ring */ | |
254 { "stick", 70, 0 }, /* stick */ | |
255 { "miscellaneous magic", 50, 50 }, /* miscellaneous magic */ | |
256 { "artifact", 0, 10 }, /* artifact */ | |
257 }; | |
258 | |
259 struct magic_item s_magic[MAXSCROLLS] = { | |
260 { "monster confusion", 40, 125, 0, 0 }, | |
261 { "magic mapping", 60, 150, 0, 5 }, | |
262 { "light", 60, 100, 15, 15 }, | |
263 { "hold monster", 30, 200, 20, 20 }, | |
264 { "sleep", 20, 150, 25, 0 }, | |
265 { "enchantment", 130, 200, 15, 15 }, | |
266 { "identify", 170, 100, 0, 20 }, | |
267 { "scare monster", 40, 250, 20, 30 }, | |
268 { "gold detection", 30, 110, 0, 0 }, | |
269 { "teleportation", 60, 165, 20, 20 }, | |
270 { "create monster", 20, 75, 0, 0 }, | |
271 { "remove curse", 80, 120, 15, 15 }, | |
272 { "petrification", 30, 185, 0, 0 }, | |
273 { "genocide", 10, 300, 0, 0 }, | |
274 { "cure disease", 80, 160, 0, 0 }, | |
275 { "acquirement", 10, 700, 0, 5 }, | |
276 { "protection", 30, 190, 10, 0 }, | |
277 { "trap finding", 50, 180, 0, 0 }, | |
278 { "runes", 20, 50, 0, 0 }, | |
279 { "charm monster", 30, 275, 0, 20 }, | |
280 }; | |
281 | |
282 struct magic_item p_magic[MAXPOTIONS] = { | |
283 { "clear thought", 50, 180, 10, 5 }, | |
284 { "gain ability", 160, 210, 10, 10 }, | |
285 { "see invisible", 40, 150, 20, 20 }, | |
286 { "healing", 140, 130, 15, 15 }, | |
287 { "monster detection", 40, 120, 0, 0 }, | |
288 { "magic detection", 70, 105, 0, 0 }, | |
289 { "raise level", 10, 450, 10, 5 }, | |
290 { "haste self", 50, 180, 20, 5 }, | |
291 { "restore abilities", 130, 140, 0, 15 }, | |
292 { "phasing", 60, 210, 10, 10 }, | |
293 { "invisibility", 20, 230, 0, 10 }, | |
294 { "flying", 50, 130, 0, 15 }, | |
295 { "food detection", 20, 150, 0, 0 }, | |
296 { "skill", 10, 200, 20, 5 }, | |
297 { "fire resistance", 40, 250, 10, 5 }, | |
298 { "cold resistance", 40, 250, 10, 5 }, | |
299 { "lightning protection", 40, 250, 20, 5 }, | |
300 { "poison", 30, 205, 25, 0 }, | |
301 }; | |
302 | |
303 struct magic_item r_magic[MAXRINGS] = { | |
304 { "protection", 60, 200, 25, 25 }, | |
305 { "add strength", 50, 200, 25, 25 }, | |
306 { "sustain ability", 50, 500, 0, 0 }, | |
307 { "searching", 40, 400, 0, 0 }, | |
308 { "extra sight", 60, 350, 0, 0 }, | |
309 { "alertness", 40, 380, 0, 0 }, | |
310 { "aggravate monster", 30, 100, 100, 0 }, | |
311 { "dexterity", 50, 220, 25, 25 }, | |
312 { "increase damage", 60, 220, 25, 25 }, | |
313 { "regeneration", 40, 600, 0, 0 }, | |
314 { "slow digestion", 50, 240, 20, 20 }, | |
315 { "teleportation", 20, 100, 90, 0 }, | |
316 { "stealth", 20, 300, 0, 0 }, | |
317 { "add intelligence", 50, 240, 25, 25 }, | |
318 { "increase wisdom", 40, 220, 25, 25 }, | |
319 { "sustain health", 80, 500, 0, 0 }, | |
320 { "carrying", 10, 100, 90, 0 }, | |
321 { "illumination", 30, 520, 0, 0 }, | |
322 { "delusion", 10, 100, 100, 0 }, | |
323 { "fear", 20, 100, 75, 0 }, | |
324 { "heroism", 50, 390, 0, 0 }, | |
325 { "fire resistance", 40, 400, 0, 0 }, | |
326 { "warmth", 40, 400, 0, 0 }, | |
327 { "vampiric regeneration", 10,1000, 0, 0 }, | |
328 { "free action", 40, 370, 0, 0 }, | |
329 { "teleport control", 10, 700, 0, 0 }, | |
330 }; | |
331 | |
332 struct magic_item ws_magic[MAXSTICKS] = { | |
333 { "light", 80, 120, 15, 15 }, | |
334 { "striking", 50, 115, 0, 0 }, | |
335 { "lightning", 40, 200, 0, 0 }, | |
336 { "fire", 30, 200, 0, 0 }, | |
337 { "cold", 30, 200, 0, 0 }, | |
338 { "polymorph", 80, 150, 0, 0 }, | |
339 { "magic missile", 90, 170, 0, 0 }, | |
340 { "slow", 70, 220, 20, 10 }, | |
341 { "drain life", 50, 210, 20, 0 }, | |
342 { "charging", 70, 400, 0, 0 }, | |
343 { "teleport", 90, 140, 20, 10 }, | |
344 { "cancellation", 50, 130, 0, 0 }, | |
345 { "confusion", 30, 100, 20, 0 }, | |
346 { "disintegration", 20, 300, 25, 0 }, | |
347 { "petrification", 30, 240, 0, 0 }, | |
348 { "paralyzation", 30, 180, 10, 0 }, | |
349 { "degeneration", 30, 250, 20, 0 }, | |
350 { "curing", 50, 250, 20, 5 }, | |
351 { "wonder", 40, 110, 20, 20 }, | |
352 { "fear", 40, 180, 0, 0 }, | |
353 }; | |
354 | |
355 /* | |
356 * WARNING: unique miscellaneous magic items must be put at the end | |
357 * of this list. They MUST be the last items. The function | |
358 * create_obj() in wizard.c depends on it. | |
359 */ | |
360 | |
361 struct magic_item m_magic[MAXMM] = { | |
362 { "alchemy jug", 40, 240, 0, 0 }, | |
363 { "beaker of potions", 60, 300, 0, 0 }, | |
364 { "book of spells", 60, 300, 0, 0 }, | |
365 { "boots of elvenkind", 50, 500, 0, 0 }, | |
366 { "bracers of defense", 80, 400, 20, 10 }, | |
367 { "chime of opening", 30, 250, 0, 0 }, | |
368 { "chime of hunger", 20, 100, 100, 0 }, | |
369 { "cloak of displacement", 60, 500, 0, 0 }, | |
370 { "cloak of protection", 80, 400, 20, 10 }, | |
371 { "drums of panic", 60, 350, 0, 0 }, | |
372 { "dust of disappearance", 30, 300, 0, 0 }, | |
373 { "dust of choking", 30, 100, 100, 0 }, | |
374 { "gauntlets of dexterity", 40, 600, 25, 0 }, | |
375 { "gauntlets of ogre power", 40, 600, 25, 0 }, | |
376 { "jewel of attacks", 50, 150, 100, 0 }, | |
377 { "keoghtoms ointment", 60, 350, 0, 0 }, | |
378 { "robe of powerlessness", 20, 100, 100, 0 }, | |
379 { "gauntlets of fumbling", 30, 100, 100, 0 }, | |
380 { "necklace of adaptation", 50, 500, 0, 0 }, | |
381 { "necklace of strangulation", 30, 110, 100, 0 }, | |
382 { "boots of dancing", 40, 120, 100, 0 }, | |
383 { "book of skills", 30, 650, 0, 0 }, | |
384 { "medicine crystal", 10, 800, 25, 5 }, | |
385 }; | |
386 | |
387 struct magic_item rel_magic[MAXRELIC] = { | |
388 { "Daggers of Musty Doit", 0, 50000, 0, 0}, | |
389 { "Cloak of Emori", 0, 50000, 0, 0}, | |
390 { "Ankh of Heil", 0, 50000, 0, 0}, | |
391 { "Staff of Ming", 0, 50000, 0, 0}, | |
392 { "Wand of Orcus", 0, 50000, 0, 0}, | |
393 { "Rod of Asmodeus", 0, 50000, 0, 0}, | |
394 { "Amulet of Yendor", 0, 50000, 0, 0}, | |
395 { "Mandolin of Brian", 0, 50000, 0, 0}, | |
396 { "Horn of Geryon", 0, 50000, 0, 0}, | |
397 { "Morning Star of Hruggek", 0, 50000, 0, 0}, | |
398 { "Flail of Yeenoghu", 0, 50000, 0, 0}, | |
399 { "Eye of Vecna", 0, 50000, 0, 0}, | |
400 { "Axe of Aklad", 0, 50000, 0, 0}, | |
401 { "Quill of Nagrom", 0, 50000, 0, 0}, | |
402 { "Amulet of Stonebones", 0, 50000, 0, 0}, | |
403 { "Ring of Surtur", 0, 50000, 0, 0}, | |
404 { "Card of Alteran", 0, 50000, 0, 0}, | |
405 }; | |
406 | |
407 /* | |
408 * food and fruits that you get | |
409 */ | |
410 struct magic_item foods[MAXFOODS] = { | |
411 | |
412 { "food ration", 690, 50, 750, 0}, | |
413 { "apple", 10, 20, 300, 0}, | |
414 { "banana", 30, 20, 300, 0}, | |
415 { "blueberry", 30, 20, 300, 0}, | |
416 { "candleberry", 10, 20, 300, 0}, | |
417 { "caprifig", 20, 20, 300, 0}, | |
418 { "dewberry", 10, 20, 300, 0}, | |
419 { "elderberry", 30, 20, 300, 0}, | |
420 { "gooseberry", 20, 20, 300, 0}, | |
421 { "guanabana", 30, 20, 300, 0}, | |
422 { "hagberry", 10, 20, 300, 0}, | |
423 { "jaboticaba", 10, 20, 300, 0}, | |
424 { "peach", 10, 20, 300, 0}, | |
425 { "pitanga", 10, 20, 300, 0}, | |
426 { "prickly pear", 10, 20, 300, 0}, | |
427 { "rambutan", 10, 20, 300, 0}, | |
428 { "sapodilla", 10, 20, 300, 0}, | |
429 { "soursop", 10, 20, 300, 0}, | |
430 { "strawberry", 10, 20, 300, 0}, | |
431 { "sweetsop", 10, 20, 300, 0}, | |
432 { "whortleberry", 10, 20, 300, 0}, | |
433 { "slime-mold", 10, 10, 100, 0}, | |
434 }; | |
435 | |
436 /* | |
437 * these are the spells that a magician can cast | |
438 */ | |
439 | |
440 struct spells magic_spells[MAXSPELLS] = { | |
441 { P_TFIND, 3, TYP_POTION, 0 }, | |
442 { S_IDENT, 5, TYP_SCROLL, 0 }, | |
443 { S_LIGHT, 7, TYP_SCROLL, ISBLESSED }, | |
444 { S_REMOVE, 10, TYP_SCROLL, 0 }, | |
445 { S_FINDTRAPS, 15, TYP_SCROLL, 0 }, | |
446 { P_FLY, 20, TYP_POTION, 0 }, | |
447 { S_TELEP, 25, TYP_SCROLL, 0 }, | |
448 { S_SLEEP, 30, TYP_SCROLL, 0 }, | |
449 { P_SEEINVIS, 35, TYP_POTION, ISBLESSED }, | |
450 { P_CLEAR, 40, TYP_POTION, 0 }, | |
451 { WS_COLD, 45, TYP_STICK, 0 }, | |
452 { P_PHASE, 50, TYP_POTION, 0 }, | |
453 { WS_FIRE, 55, TYP_STICK, 0 }, | |
454 { P_HASTE, 60, TYP_POTION, ISBLESSED }, | |
455 { WS_ELECT, 65, TYP_STICK, 0 }, | |
456 { S_HOLD, 70, TYP_SCROLL, ISBLESSED }, | |
457 }; | |
458 | |
459 /* | |
460 * these are the spells that a cleric can cast | |
461 */ | |
462 | |
463 struct spells cleric_spells[MAXPRAYERS] = { | |
464 { P_MFIND, 3, TYP_POTION, 0 }, | |
465 { P_TFIND, 5, TYP_POTION, 0 }, | |
466 { S_LIGHT, 7, TYP_SCROLL, ISBLESSED }, | |
467 { S_REMOVE, 10, TYP_SCROLL, 0 }, | |
468 { P_FFIND, 15, TYP_POTION, 0 }, | |
469 { P_FLY, 20, TYP_POTION, 0 }, | |
470 { P_HEALING, 25, TYP_POTION, 0 }, | |
471 { S_CURING, 30, TYP_SCROLL, 0 }, | |
472 { P_RESTORE, 35, TYP_POTION, 0 }, | |
473 { S_MAP, 40, TYP_SCROLL, 0 }, | |
474 { P_SEEINVIS, 45, TYP_POTION, ISBLESSED }, | |
475 { P_CLEAR, 50, TYP_POTION, 0 }, | |
476 { P_PHASE, 55, TYP_POTION, 0 }, | |
477 { WS_CURING, 60, TYP_STICK, ISBLESSED }, | |
478 { WS_PARALYZE, 65, TYP_STICK, 0 }, | |
479 { S_ALLENCH, 70, TYP_SCROLL, 0 }, | |
480 }; | |
481 | |
482 /* | |
483 * these are the spells that a druid can chant | |
484 */ | |
485 | |
486 struct spells druid_spells[MAXCHANTS] = { | |
487 { P_MFIND, 3, TYP_POTION, 0 }, | |
488 { P_TFIND, 5, TYP_POTION, 0 }, | |
489 { S_LIGHT, 7, TYP_SCROLL, ISBLESSED }, | |
490 { S_REMOVE, 10, TYP_SCROLL, 0 }, | |
491 { S_FINDTRAPS, 15, TYP_SCROLL, 0 }, | |
492 { S_CONFUSE, 20, TYP_SCROLL, 0 }, | |
493 { P_FFIND, 25, TYP_POTION, 0 }, | |
494 { P_HEALING, 30, TYP_POTION, 0 }, | |
495 { S_MAP, 35, TYP_SCROLL, 0 }, | |
496 { P_CLEAR, 40, TYP_POTION, 0 }, | |
497 { P_COLD, 45, TYP_POTION, 0 }, | |
498 { P_FIRE, 50, TYP_POTION, 0 }, | |
499 { P_PHASE, 55, TYP_POTION, 0 }, | |
500 { P_LIGHTNING, 60, TYP_POTION, 0 }, | |
501 { S_CHARM, 65, TYP_SCROLL, ISBLESSED }, | |
502 { S_HOLD, 70, TYP_SCROLL, ISBLESSED }, | |
503 }; | |
504 | |
505 /* | |
506 * these are the scrolls that a quill can write | |
507 */ | |
508 | |
509 struct spells quill_scrolls[MAXQUILL] = { | |
510 { S_GFIND, 5, }, | |
511 { S_IDENT, 10, }, | |
512 { S_LIGHT, 10, }, | |
513 { S_REMOVE, 15, }, | |
514 { S_MAP, 20, }, | |
515 { S_CONFUSE, 25, }, | |
516 { S_SLEEP, 30, }, | |
517 { S_CURING, 40, }, | |
518 { S_TELEP, 50, }, | |
519 { S_SCARE, 60, }, | |
520 { S_HOLD, 70, }, | |
521 { S_PETRIFY, 80, }, | |
522 { S_PROTECT, 90, }, | |
523 { S_ALLENCH, 100, }, | |
524 }; | |
525 | |
526 /* | |
527 * Experience-level names of each character (see NUM_CNAMES in rogue.h) | |
528 */ | |
529 | |
530 const char *cnames[NUM_CHARTYPES-1][NUM_CNAMES] = { | |
531 { "Veteran", "Fighter", /* Fighter */ | |
532 "Ruffian", "Tussler", | |
533 "Swordsman", "Hero", | |
534 "Bravo", "Picador", | |
535 "Stalwart", "Bashar", | |
536 "Swashbuckler", "Myrmidon", | |
537 "Fusileer", "Pugilist", | |
538 "Champion", "Superhero", | |
539 "Warrior", "Lord", | |
540 "Lord I", "Lord II", | |
541 "Lord III", "Lord IV", | |
542 "Lord V", "Lord VI", | |
543 "Lord VII", "Warrior Lord" | |
544 }, | |
545 { "Runner", "Strider", /* Ranger */ | |
546 "Warden", "Steward", | |
547 "Scout", "Courser", | |
548 "Tracker", "Guide", | |
549 "Protector", "Bartizan", | |
550 "Gendarme", "Sentinel", | |
551 "Vigilant", "Pathfinder", | |
552 "Guardian", "Overseer", | |
553 "Castellan", "Ranger", | |
554 "Lord Ranger I", "Lord Ranger II", | |
555 "Lord Ranger III", "Lord Ranger IV", | |
556 "Lord Ranger V", "Lord Ranger VI", | |
557 "Lord Ranger VII", "Master Ranger" | |
558 }, | |
559 { "Gallant", "Keeper", /* Paladin */ | |
560 "Bravado", "Brazen", | |
561 "Protector", "Defender", | |
562 "Warder", "Guardian", | |
563 "Champion", "Bulwark", | |
564 "Venturist", "Inspirator", | |
565 "Chevalier", "Justiciar", | |
566 "Undaunteer", "Plautus", | |
567 "Knight", "Paladin", | |
568 "Paladin I", "Paladin II", | |
569 "Paladin III", "Paladin IV", | |
570 "Paladin V", "Paladin VI", | |
571 "Paladin VII", "Lord Paladin" | |
572 }, | |
573 { "Prestidigitator", "Evoker", /* Magic User */ | |
574 "Summoner", "Invoker", | |
575 "Conjurer", "Theurgist", | |
576 "Illusionist", "Diviner", | |
577 "Thaumaturgist", "Magician", | |
578 "Thelemist", "Magus", | |
579 "Enchanter", "Warlock", | |
580 "Witch", "Shaman", | |
581 "Sorcerer", "Wizard", | |
582 "Wizard I", "Wizard II", | |
583 "Wizard III", "Wizard IV", | |
584 "Wizard V", "Wizard VI", | |
585 "Wizard VII", "Lord Magus" | |
586 }, | |
587 { "Acolyte", "Adept", /* Cleric */ | |
588 "Charmer", "Friar", | |
589 "Priest", "Curate", | |
590 "Vicar", "Deacon", | |
591 "Sabiast", "Cabalist", | |
592 "Prefect", "Canon", | |
593 "Minister", "Cardinal", | |
594 "Bishop", "Patriarch", | |
595 "Exorcist", "Archdeacon", | |
596 "High Priest I", "High Priest II", | |
597 "High Priest III", "High Priest IV", | |
598 "High Priest V", "High Priest VI", | |
599 "High Priest VII", "Reverend Lord" | |
600 }, | |
601 { "Rogue", "Footpad", /* Thief */ | |
602 "Cutpurse", "Robber", | |
603 "Vagrant", "Truant", | |
604 "Burglar", "Filcher", | |
605 "Sharper", "Magsman", | |
606 "Racketeer", "Prowler", | |
607 "Crook", "Bounder", | |
608 "Quisling", "Malfeasor", | |
609 "Swindler", "Thief", | |
610 "Master Thief I", "Master Thief II", | |
611 "Master Thief III", "Master Thief IV", | |
612 "Master Thief V", "Master Thief VI", | |
613 "Master Thief VII", "Master Rogue" | |
614 }, | |
615 { "Bravo", "Rutterkin", /* Assassin */ | |
616 "Waghalter", "Murderer", | |
617 "Butcher", "Desperado", | |
618 "Thug", "Killer", | |
619 "Cutthroat", "Executioner", | |
620 "Eradicator", "Obliterator", | |
621 "Mechanic", "Wiseguy", | |
622 "Nihilist", "Berserker", | |
623 "Assassin", "Expert Assassin", | |
624 "Prime Assassin I", "Prime Assassin II", | |
625 "Prime Assassin III", "Prime Assassin IV", | |
626 "Prime Assassin V", "Prime Assassin VI", | |
627 "Prime Assassin VII", "Master Assassin" | |
628 }, | |
629 { "Aspirant", "Ovate", /* Druid */ | |
630 "Practitioner", "Devoutist", | |
631 "Initiate 1st Circle", "Initiate 2nd Circle", | |
632 "Initiate 3rd Circle", "Initiate 4th Circle", | |
633 "Initiate 5th Circle", "Initiate 6th Circle", | |
634 "Initiate 7th Circle", "Initiate 8th Circle", | |
635 "Initiate 9th Circle", "Illuminati", | |
636 "Lesser Druid", "Arch Druid", | |
637 "Druid", "Master Druid", | |
638 "Master Druid I", "Master Druid II", | |
639 "Master Druid III", "Master Druid IV", | |
640 "Master Druid V", "Master Druid VI", | |
641 "Master Druid VII", "Lord Druid" | |
642 }, | |
643 { "Novice", "Initiate", /* Monk */ | |
644 "Brother", "Disciple", | |
645 "Canon", "Elder", | |
646 "Precept", "Lama", | |
647 "Immaculate", "Wizard", | |
648 "Shaman", "Master", | |
649 "Superior Master", "Master of Dragons", | |
650 "Master of North Wind", "Master of West Wind", | |
651 "Master of South Wind", "Master of East Wind", | |
652 "Grand Master I", "Grand Master II", | |
653 "Grand Master III", "Grand Master IV", | |
654 "Grand Master V", "Grand Master VI", | |
655 "Grand Master VII", "Lord Monk" | |
656 } | |
657 }; | |
658 |