Angband 3.0.9b.
[angband.git] / src / tables.c
blobacd74bbf14da15038689e722396f96147f79592f
1 /* File: tables.c */
3 /*
4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
9 */
11 #include "angband.h"
17 * Global array for looping through the "keypad directions".
19 const s16b ddd[9] =
20 { 2, 8, 6, 4, 3, 1, 9, 7, 5 };
23 * Global arrays for converting "keypad direction" into "offsets".
25 const s16b ddx[10] =
26 { 0, -1, 0, 1, -1, 0, 1, -1, 0, 1 };
28 const s16b ddy[10] =
29 { 0, 1, 1, 1, 0, 0, 0, -1, -1, -1 };
32 * Global arrays for optimizing "ddx[ddd[i]]" and "ddy[ddd[i]]".
34 const s16b ddx_ddd[9] =
35 { 0, 0, 1, -1, 1, -1, 1, -1, 0 };
37 const s16b ddy_ddd[9] =
38 { 1, -1, 0, 0, 1, 1, -1, -1, 0 };
42 * Global array for converting numbers to uppercase hecidecimal digit
43 * This array can also be used to convert a number to an octal digit
45 const char hexsym[16] =
47 '0', '1', '2', '3', '4', '5', '6', '7',
48 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
53 * Stat Table (INT/WIS) -- Number of 1/100 spells per level
55 const int adj_mag_study[] =
57 0 /* 3 */,
58 0 /* 4 */,
59 10 /* 5 */,
60 20 /* 6 */,
61 30 /* 7 */,
62 40 /* 8 */,
63 50 /* 9 */,
64 60 /* 10 */,
65 70 /* 11 */,
66 80 /* 12 */,
67 85 /* 13 */,
68 90 /* 14 */,
69 95 /* 15 */,
70 100 /* 16 */,
71 105 /* 17 */,
72 110 /* 18/00-18/09 */,
73 115 /* 18/10-18/19 */,
74 120 /* 18/20-18/29 */,
75 130 /* 18/30-18/39 */,
76 140 /* 18/40-18/49 */,
77 150 /* 18/50-18/59 */,
78 160 /* 18/60-18/69 */,
79 170 /* 18/70-18/79 */,
80 180 /* 18/80-18/89 */,
81 190 /* 18/90-18/99 */,
82 200 /* 18/100-18/109 */,
83 210 /* 18/110-18/119 */,
84 220 /* 18/120-18/129 */,
85 230 /* 18/130-18/139 */,
86 240 /* 18/140-18/149 */,
87 250 /* 18/150-18/159 */,
88 250 /* 18/160-18/169 */,
89 250 /* 18/170-18/179 */,
90 250 /* 18/180-18/189 */,
91 250 /* 18/190-18/199 */,
92 250 /* 18/200-18/209 */,
93 250 /* 18/210-18/219 */,
94 250 /* 18/220+ */
99 * Stat Table (INT/WIS) -- extra 1/100 mana-points per level
101 const int adj_mag_mana[] =
103 0 /* 3 */,
104 10 /* 4 */,
105 20 /* 5 */,
106 30 /* 6 */,
107 40 /* 7 */,
108 50 /* 8 */,
109 60 /* 9 */,
110 70 /* 10 */,
111 80 /* 11 */,
112 90 /* 12 */,
113 100 /* 13 */,
114 110 /* 14 */,
115 120 /* 15 */,
116 130 /* 16 */,
117 140 /* 17 */,
118 150 /* 18/00-18/09 */,
119 160 /* 18/10-18/19 */,
120 170 /* 18/20-18/29 */,
121 180 /* 18/30-18/39 */,
122 190 /* 18/40-18/49 */,
123 200 /* 18/50-18/59 */,
124 225 /* 18/60-18/69 */,
125 250 /* 18/70-18/79 */,
126 300 /* 18/80-18/89 */,
127 350 /* 18/90-18/99 */,
128 400 /* 18/100-18/109 */,
129 450 /* 18/110-18/119 */,
130 500 /* 18/120-18/129 */,
131 550 /* 18/130-18/139 */,
132 600 /* 18/140-18/149 */,
133 650 /* 18/150-18/159 */,
134 700 /* 18/160-18/169 */,
135 750 /* 18/170-18/179 */,
136 800 /* 18/180-18/189 */,
137 800 /* 18/190-18/199 */,
138 800 /* 18/200-18/209 */,
139 800 /* 18/210-18/219 */,
140 800 /* 18/220+ */
145 * Stat Table (INT/WIS) -- Minimum failure rate (percentage)
147 const byte adj_mag_fail[] =
149 99 /* 3 */,
150 99 /* 4 */,
151 99 /* 5 */,
152 99 /* 6 */,
153 99 /* 7 */,
154 50 /* 8 */,
155 30 /* 9 */,
156 20 /* 10 */,
157 15 /* 11 */,
158 12 /* 12 */,
159 11 /* 13 */,
160 10 /* 14 */,
161 9 /* 15 */,
162 8 /* 16 */,
163 7 /* 17 */,
164 6 /* 18/00-18/09 */,
165 6 /* 18/10-18/19 */,
166 5 /* 18/20-18/29 */,
167 5 /* 18/30-18/39 */,
168 5 /* 18/40-18/49 */,
169 4 /* 18/50-18/59 */,
170 4 /* 18/60-18/69 */,
171 4 /* 18/70-18/79 */,
172 4 /* 18/80-18/89 */,
173 3 /* 18/90-18/99 */,
174 3 /* 18/100-18/109 */,
175 2 /* 18/110-18/119 */,
176 2 /* 18/120-18/129 */,
177 2 /* 18/130-18/139 */,
178 2 /* 18/140-18/149 */,
179 1 /* 18/150-18/159 */,
180 1 /* 18/160-18/169 */,
181 1 /* 18/170-18/179 */,
182 1 /* 18/180-18/189 */,
183 1 /* 18/190-18/199 */,
184 0 /* 18/200-18/209 */,
185 0 /* 18/210-18/219 */,
186 0 /* 18/220+ */
191 * Stat Table (INT/WIS) -- failure rate adjustment
193 const int adj_mag_stat[] =
195 -5 /* 3 */,
196 -4 /* 4 */,
197 -3 /* 5 */,
198 -3 /* 6 */,
199 -2 /* 7 */,
200 -1 /* 8 */,
201 0 /* 9 */,
202 0 /* 10 */,
203 0 /* 11 */,
204 0 /* 12 */,
205 0 /* 13 */,
206 1 /* 14 */,
207 2 /* 15 */,
208 3 /* 16 */,
209 4 /* 17 */,
210 5 /* 18/00-18/09 */,
211 6 /* 18/10-18/19 */,
212 7 /* 18/20-18/29 */,
213 8 /* 18/30-18/39 */,
214 9 /* 18/40-18/49 */,
215 10 /* 18/50-18/59 */,
216 11 /* 18/60-18/69 */,
217 12 /* 18/70-18/79 */,
218 15 /* 18/80-18/89 */,
219 18 /* 18/90-18/99 */,
220 21 /* 18/100-18/109 */,
221 24 /* 18/110-18/119 */,
222 27 /* 18/120-18/129 */,
223 30 /* 18/130-18/139 */,
224 33 /* 18/140-18/149 */,
225 36 /* 18/150-18/159 */,
226 39 /* 18/160-18/169 */,
227 42 /* 18/170-18/179 */,
228 45 /* 18/180-18/189 */,
229 48 /* 18/190-18/199 */,
230 51 /* 18/200-18/209 */,
231 54 /* 18/210-18/219 */,
232 57 /* 18/220+ */
237 * Stat Table (CHR) -- payment percentages
239 const byte adj_chr_gold[] =
241 130 /* 3 */,
242 125 /* 4 */,
243 122 /* 5 */,
244 120 /* 6 */,
245 118 /* 7 */,
246 116 /* 8 */,
247 114 /* 9 */,
248 112 /* 10 */,
249 110 /* 11 */,
250 108 /* 12 */,
251 106 /* 13 */,
252 104 /* 14 */,
253 103 /* 15 */,
254 102 /* 16 */,
255 101 /* 17 */,
256 100 /* 18/00-18/09 */,
257 99 /* 18/10-18/19 */,
258 98 /* 18/20-18/29 */,
259 97 /* 18/30-18/39 */,
260 96 /* 18/40-18/49 */,
261 95 /* 18/50-18/59 */,
262 94 /* 18/60-18/69 */,
263 93 /* 18/70-18/79 */,
264 92 /* 18/80-18/89 */,
265 91 /* 18/90-18/99 */,
266 90 /* 18/100-18/109 */,
267 89 /* 18/110-18/119 */,
268 88 /* 18/120-18/129 */,
269 87 /* 18/130-18/139 */,
270 86 /* 18/140-18/149 */,
271 85 /* 18/150-18/159 */,
272 84 /* 18/160-18/169 */,
273 83 /* 18/170-18/179 */,
274 82 /* 18/180-18/189 */,
275 81 /* 18/190-18/199 */,
276 80 /* 18/200-18/209 */,
277 80 /* 18/210-18/219 */,
278 80 /* 18/220+ */
283 * Stat Table (INT) -- Magic devices
285 const byte adj_int_dev[] =
287 0 /* 3 */,
288 0 /* 4 */,
289 0 /* 5 */,
290 0 /* 6 */,
291 0 /* 7 */,
292 1 /* 8 */,
293 1 /* 9 */,
294 1 /* 10 */,
295 1 /* 11 */,
296 1 /* 12 */,
297 1 /* 13 */,
298 1 /* 14 */,
299 2 /* 15 */,
300 2 /* 16 */,
301 2 /* 17 */,
302 3 /* 18/00-18/09 */,
303 3 /* 18/10-18/19 */,
304 4 /* 18/20-18/29 */,
305 4 /* 18/30-18/39 */,
306 5 /* 18/40-18/49 */,
307 5 /* 18/50-18/59 */,
308 6 /* 18/60-18/69 */,
309 6 /* 18/70-18/79 */,
310 7 /* 18/80-18/89 */,
311 7 /* 18/90-18/99 */,
312 8 /* 18/100-18/109 */,
313 9 /* 18/110-18/119 */,
314 10 /* 18/120-18/129 */,
315 11 /* 18/130-18/139 */,
316 12 /* 18/140-18/149 */,
317 13 /* 18/150-18/159 */,
318 14 /* 18/160-18/169 */,
319 15 /* 18/170-18/179 */,
320 16 /* 18/180-18/189 */,
321 17 /* 18/190-18/199 */,
322 18 /* 18/200-18/209 */,
323 19 /* 18/210-18/219 */,
324 20 /* 18/220+ */
329 * Stat Table (WIS) -- Saving throw
331 const byte adj_wis_sav[] =
333 0 /* 3 */,
334 0 /* 4 */,
335 0 /* 5 */,
336 0 /* 6 */,
337 0 /* 7 */,
338 1 /* 8 */,
339 1 /* 9 */,
340 1 /* 10 */,
341 1 /* 11 */,
342 1 /* 12 */,
343 1 /* 13 */,
344 1 /* 14 */,
345 2 /* 15 */,
346 2 /* 16 */,
347 2 /* 17 */,
348 3 /* 18/00-18/09 */,
349 3 /* 18/10-18/19 */,
350 3 /* 18/20-18/29 */,
351 3 /* 18/30-18/39 */,
352 3 /* 18/40-18/49 */,
353 4 /* 18/50-18/59 */,
354 4 /* 18/60-18/69 */,
355 5 /* 18/70-18/79 */,
356 5 /* 18/80-18/89 */,
357 6 /* 18/90-18/99 */,
358 7 /* 18/100-18/109 */,
359 8 /* 18/110-18/119 */,
360 9 /* 18/120-18/129 */,
361 10 /* 18/130-18/139 */,
362 11 /* 18/140-18/149 */,
363 12 /* 18/150-18/159 */,
364 13 /* 18/160-18/169 */,
365 14 /* 18/170-18/179 */,
366 15 /* 18/180-18/189 */,
367 16 /* 18/190-18/199 */,
368 17 /* 18/200-18/209 */,
369 18 /* 18/210-18/219 */,
370 19 /* 18/220+ */
375 * Stat Table (DEX) -- disarming
377 const byte adj_dex_dis[] =
379 0 /* 3 */,
380 0 /* 4 */,
381 0 /* 5 */,
382 0 /* 6 */,
383 0 /* 7 */,
384 0 /* 8 */,
385 0 /* 9 */,
386 0 /* 10 */,
387 0 /* 11 */,
388 0 /* 12 */,
389 1 /* 13 */,
390 1 /* 14 */,
391 1 /* 15 */,
392 2 /* 16 */,
393 2 /* 17 */,
394 4 /* 18/00-18/09 */,
395 4 /* 18/10-18/19 */,
396 4 /* 18/20-18/29 */,
397 4 /* 18/30-18/39 */,
398 5 /* 18/40-18/49 */,
399 5 /* 18/50-18/59 */,
400 5 /* 18/60-18/69 */,
401 6 /* 18/70-18/79 */,
402 6 /* 18/80-18/89 */,
403 7 /* 18/90-18/99 */,
404 8 /* 18/100-18/109 */,
405 8 /* 18/110-18/119 */,
406 8 /* 18/120-18/129 */,
407 8 /* 18/130-18/139 */,
408 8 /* 18/140-18/149 */,
409 9 /* 18/150-18/159 */,
410 9 /* 18/160-18/169 */,
411 9 /* 18/170-18/179 */,
412 9 /* 18/180-18/189 */,
413 9 /* 18/190-18/199 */,
414 10 /* 18/200-18/209 */,
415 10 /* 18/210-18/219 */,
416 10 /* 18/220+ */
421 * Stat Table (INT) -- disarming
423 const byte adj_int_dis[] =
425 0 /* 3 */,
426 0 /* 4 */,
427 0 /* 5 */,
428 0 /* 6 */,
429 0 /* 7 */,
430 1 /* 8 */,
431 1 /* 9 */,
432 1 /* 10 */,
433 1 /* 11 */,
434 1 /* 12 */,
435 1 /* 13 */,
436 1 /* 14 */,
437 2 /* 15 */,
438 2 /* 16 */,
439 2 /* 17 */,
440 3 /* 18/00-18/09 */,
441 3 /* 18/10-18/19 */,
442 3 /* 18/20-18/29 */,
443 4 /* 18/30-18/39 */,
444 4 /* 18/40-18/49 */,
445 5 /* 18/50-18/59 */,
446 6 /* 18/60-18/69 */,
447 7 /* 18/70-18/79 */,
448 8 /* 18/80-18/89 */,
449 9 /* 18/90-18/99 */,
450 10 /* 18/100-18/109 */,
451 10 /* 18/110-18/119 */,
452 11 /* 18/120-18/129 */,
453 12 /* 18/130-18/139 */,
454 13 /* 18/140-18/149 */,
455 14 /* 18/150-18/159 */,
456 15 /* 18/160-18/169 */,
457 16 /* 18/170-18/179 */,
458 17 /* 18/180-18/189 */,
459 18 /* 18/190-18/199 */,
460 19 /* 18/200-18/209 */,
461 19 /* 18/210-18/219 */,
462 19 /* 18/220+ */
467 * Stat Table (DEX) -- bonus to ac (plus 128)
469 const byte adj_dex_ta[] =
471 128 + -4 /* 3 */,
472 128 + -3 /* 4 */,
473 128 + -2 /* 5 */,
474 128 + -1 /* 6 */,
475 128 + 0 /* 7 */,
476 128 + 0 /* 8 */,
477 128 + 0 /* 9 */,
478 128 + 0 /* 10 */,
479 128 + 0 /* 11 */,
480 128 + 0 /* 12 */,
481 128 + 0 /* 13 */,
482 128 + 0 /* 14 */,
483 128 + 1 /* 15 */,
484 128 + 1 /* 16 */,
485 128 + 1 /* 17 */,
486 128 + 2 /* 18/00-18/09 */,
487 128 + 2 /* 18/10-18/19 */,
488 128 + 2 /* 18/20-18/29 */,
489 128 + 2 /* 18/30-18/39 */,
490 128 + 2 /* 18/40-18/49 */,
491 128 + 3 /* 18/50-18/59 */,
492 128 + 3 /* 18/60-18/69 */,
493 128 + 3 /* 18/70-18/79 */,
494 128 + 4 /* 18/80-18/89 */,
495 128 + 5 /* 18/90-18/99 */,
496 128 + 6 /* 18/100-18/109 */,
497 128 + 7 /* 18/110-18/119 */,
498 128 + 8 /* 18/120-18/129 */,
499 128 + 9 /* 18/130-18/139 */,
500 128 + 9 /* 18/140-18/149 */,
501 128 + 10 /* 18/150-18/159 */,
502 128 + 11 /* 18/160-18/169 */,
503 128 + 12 /* 18/170-18/179 */,
504 128 + 13 /* 18/180-18/189 */,
505 128 + 14 /* 18/190-18/199 */,
506 128 + 15 /* 18/200-18/209 */,
507 128 + 15 /* 18/210-18/219 */,
508 128 + 15 /* 18/220+ */
513 * Stat Table (STR) -- bonus to dam (plus 128)
515 const byte adj_str_td[] =
517 128 + -2 /* 3 */,
518 128 + -2 /* 4 */,
519 128 + -1 /* 5 */,
520 128 + -1 /* 6 */,
521 128 + 0 /* 7 */,
522 128 + 0 /* 8 */,
523 128 + 0 /* 9 */,
524 128 + 0 /* 10 */,
525 128 + 0 /* 11 */,
526 128 + 0 /* 12 */,
527 128 + 0 /* 13 */,
528 128 + 0 /* 14 */,
529 128 + 0 /* 15 */,
530 128 + 1 /* 16 */,
531 128 + 2 /* 17 */,
532 128 + 2 /* 18/00-18/09 */,
533 128 + 2 /* 18/10-18/19 */,
534 128 + 3 /* 18/20-18/29 */,
535 128 + 3 /* 18/30-18/39 */,
536 128 + 3 /* 18/40-18/49 */,
537 128 + 3 /* 18/50-18/59 */,
538 128 + 3 /* 18/60-18/69 */,
539 128 + 4 /* 18/70-18/79 */,
540 128 + 5 /* 18/80-18/89 */,
541 128 + 5 /* 18/90-18/99 */,
542 128 + 6 /* 18/100-18/109 */,
543 128 + 7 /* 18/110-18/119 */,
544 128 + 8 /* 18/120-18/129 */,
545 128 + 9 /* 18/130-18/139 */,
546 128 + 10 /* 18/140-18/149 */,
547 128 + 11 /* 18/150-18/159 */,
548 128 + 12 /* 18/160-18/169 */,
549 128 + 13 /* 18/170-18/179 */,
550 128 + 14 /* 18/180-18/189 */,
551 128 + 15 /* 18/190-18/199 */,
552 128 + 16 /* 18/200-18/209 */,
553 128 + 18 /* 18/210-18/219 */,
554 128 + 20 /* 18/220+ */
559 * Stat Table (DEX) -- bonus to hit (plus 128)
561 const byte adj_dex_th[] =
563 128 + -3 /* 3 */,
564 128 + -2 /* 4 */,
565 128 + -2 /* 5 */,
566 128 + -1 /* 6 */,
567 128 + -1 /* 7 */,
568 128 + 0 /* 8 */,
569 128 + 0 /* 9 */,
570 128 + 0 /* 10 */,
571 128 + 0 /* 11 */,
572 128 + 0 /* 12 */,
573 128 + 0 /* 13 */,
574 128 + 0 /* 14 */,
575 128 + 0 /* 15 */,
576 128 + 1 /* 16 */,
577 128 + 2 /* 17 */,
578 128 + 3 /* 18/00-18/09 */,
579 128 + 3 /* 18/10-18/19 */,
580 128 + 3 /* 18/20-18/29 */,
581 128 + 3 /* 18/30-18/39 */,
582 128 + 3 /* 18/40-18/49 */,
583 128 + 4 /* 18/50-18/59 */,
584 128 + 4 /* 18/60-18/69 */,
585 128 + 4 /* 18/70-18/79 */,
586 128 + 4 /* 18/80-18/89 */,
587 128 + 5 /* 18/90-18/99 */,
588 128 + 6 /* 18/100-18/109 */,
589 128 + 7 /* 18/110-18/119 */,
590 128 + 8 /* 18/120-18/129 */,
591 128 + 9 /* 18/130-18/139 */,
592 128 + 9 /* 18/140-18/149 */,
593 128 + 10 /* 18/150-18/159 */,
594 128 + 11 /* 18/160-18/169 */,
595 128 + 12 /* 18/170-18/179 */,
596 128 + 13 /* 18/180-18/189 */,
597 128 + 14 /* 18/190-18/199 */,
598 128 + 15 /* 18/200-18/209 */,
599 128 + 15 /* 18/210-18/219 */,
600 128 + 15 /* 18/220+ */
605 * Stat Table (STR) -- bonus to hit (plus 128)
607 const byte adj_str_th[] =
609 128 + -3 /* 3 */,
610 128 + -2 /* 4 */,
611 128 + -1 /* 5 */,
612 128 + -1 /* 6 */,
613 128 + 0 /* 7 */,
614 128 + 0 /* 8 */,
615 128 + 0 /* 9 */,
616 128 + 0 /* 10 */,
617 128 + 0 /* 11 */,
618 128 + 0 /* 12 */,
619 128 + 0 /* 13 */,
620 128 + 0 /* 14 */,
621 128 + 0 /* 15 */,
622 128 + 0 /* 16 */,
623 128 + 0 /* 17 */,
624 128 + 1 /* 18/00-18/09 */,
625 128 + 1 /* 18/10-18/19 */,
626 128 + 1 /* 18/20-18/29 */,
627 128 + 1 /* 18/30-18/39 */,
628 128 + 1 /* 18/40-18/49 */,
629 128 + 1 /* 18/50-18/59 */,
630 128 + 1 /* 18/60-18/69 */,
631 128 + 2 /* 18/70-18/79 */,
632 128 + 3 /* 18/80-18/89 */,
633 128 + 4 /* 18/90-18/99 */,
634 128 + 5 /* 18/100-18/109 */,
635 128 + 6 /* 18/110-18/119 */,
636 128 + 7 /* 18/120-18/129 */,
637 128 + 8 /* 18/130-18/139 */,
638 128 + 9 /* 18/140-18/149 */,
639 128 + 10 /* 18/150-18/159 */,
640 128 + 11 /* 18/160-18/169 */,
641 128 + 12 /* 18/170-18/179 */,
642 128 + 13 /* 18/180-18/189 */,
643 128 + 14 /* 18/190-18/199 */,
644 128 + 15 /* 18/200-18/209 */,
645 128 + 15 /* 18/210-18/219 */,
646 128 + 15 /* 18/220+ */
651 * Stat Table (STR) -- weight limit in deca-pounds
653 const byte adj_str_wgt[] =
655 5 /* 3 */,
656 6 /* 4 */,
657 7 /* 5 */,
658 8 /* 6 */,
659 9 /* 7 */,
660 10 /* 8 */,
661 11 /* 9 */,
662 12 /* 10 */,
663 13 /* 11 */,
664 14 /* 12 */,
665 15 /* 13 */,
666 16 /* 14 */,
667 17 /* 15 */,
668 18 /* 16 */,
669 19 /* 17 */,
670 20 /* 18/00-18/09 */,
671 22 /* 18/10-18/19 */,
672 24 /* 18/20-18/29 */,
673 26 /* 18/30-18/39 */,
674 28 /* 18/40-18/49 */,
675 30 /* 18/50-18/59 */,
676 30 /* 18/60-18/69 */,
677 30 /* 18/70-18/79 */,
678 30 /* 18/80-18/89 */,
679 30 /* 18/90-18/99 */,
680 30 /* 18/100-18/109 */,
681 30 /* 18/110-18/119 */,
682 30 /* 18/120-18/129 */,
683 30 /* 18/130-18/139 */,
684 30 /* 18/140-18/149 */,
685 30 /* 18/150-18/159 */,
686 30 /* 18/160-18/169 */,
687 30 /* 18/170-18/179 */,
688 30 /* 18/180-18/189 */,
689 30 /* 18/190-18/199 */,
690 30 /* 18/200-18/209 */,
691 30 /* 18/210-18/219 */,
692 30 /* 18/220+ */
697 * Stat Table (STR) -- weapon weight limit in pounds
699 const byte adj_str_hold[] =
701 4 /* 3 */,
702 5 /* 4 */,
703 6 /* 5 */,
704 7 /* 6 */,
705 8 /* 7 */,
706 10 /* 8 */,
707 12 /* 9 */,
708 14 /* 10 */,
709 16 /* 11 */,
710 18 /* 12 */,
711 20 /* 13 */,
712 22 /* 14 */,
713 24 /* 15 */,
714 26 /* 16 */,
715 28 /* 17 */,
716 30 /* 18/00-18/09 */,
717 30 /* 18/10-18/19 */,
718 35 /* 18/20-18/29 */,
719 40 /* 18/30-18/39 */,
720 45 /* 18/40-18/49 */,
721 50 /* 18/50-18/59 */,
722 55 /* 18/60-18/69 */,
723 60 /* 18/70-18/79 */,
724 65 /* 18/80-18/89 */,
725 70 /* 18/90-18/99 */,
726 80 /* 18/100-18/109 */,
727 80 /* 18/110-18/119 */,
728 80 /* 18/120-18/129 */,
729 80 /* 18/130-18/139 */,
730 80 /* 18/140-18/149 */,
731 90 /* 18/150-18/159 */,
732 90 /* 18/160-18/169 */,
733 90 /* 18/170-18/179 */,
734 90 /* 18/180-18/189 */,
735 90 /* 18/190-18/199 */,
736 100 /* 18/200-18/209 */,
737 100 /* 18/210-18/219 */,
738 100 /* 18/220+ */
743 * Stat Table (STR) -- digging value
745 const byte adj_str_dig[] =
747 0 /* 3 */,
748 0 /* 4 */,
749 1 /* 5 */,
750 2 /* 6 */,
751 3 /* 7 */,
752 4 /* 8 */,
753 4 /* 9 */,
754 5 /* 10 */,
755 5 /* 11 */,
756 6 /* 12 */,
757 6 /* 13 */,
758 7 /* 14 */,
759 7 /* 15 */,
760 8 /* 16 */,
761 8 /* 17 */,
762 9 /* 18/00-18/09 */,
763 10 /* 18/10-18/19 */,
764 12 /* 18/20-18/29 */,
765 15 /* 18/30-18/39 */,
766 20 /* 18/40-18/49 */,
767 25 /* 18/50-18/59 */,
768 30 /* 18/60-18/69 */,
769 35 /* 18/70-18/79 */,
770 40 /* 18/80-18/89 */,
771 45 /* 18/90-18/99 */,
772 50 /* 18/100-18/109 */,
773 55 /* 18/110-18/119 */,
774 60 /* 18/120-18/129 */,
775 65 /* 18/130-18/139 */,
776 70 /* 18/140-18/149 */,
777 75 /* 18/150-18/159 */,
778 80 /* 18/160-18/169 */,
779 85 /* 18/170-18/179 */,
780 90 /* 18/180-18/189 */,
781 95 /* 18/190-18/199 */,
782 100 /* 18/200-18/209 */,
783 100 /* 18/210-18/219 */,
784 100 /* 18/220+ */
789 * Stat Table (STR) -- help index into the "blow" table
791 const byte adj_str_blow[] =
793 3 /* 3 */,
794 4 /* 4 */,
795 5 /* 5 */,
796 6 /* 6 */,
797 7 /* 7 */,
798 8 /* 8 */,
799 9 /* 9 */,
800 10 /* 10 */,
801 11 /* 11 */,
802 12 /* 12 */,
803 13 /* 13 */,
804 14 /* 14 */,
805 15 /* 15 */,
806 16 /* 16 */,
807 17 /* 17 */,
808 20 /* 18/00-18/09 */,
809 30 /* 18/10-18/19 */,
810 40 /* 18/20-18/29 */,
811 50 /* 18/30-18/39 */,
812 60 /* 18/40-18/49 */,
813 70 /* 18/50-18/59 */,
814 80 /* 18/60-18/69 */,
815 90 /* 18/70-18/79 */,
816 100 /* 18/80-18/89 */,
817 110 /* 18/90-18/99 */,
818 120 /* 18/100-18/109 */,
819 130 /* 18/110-18/119 */,
820 140 /* 18/120-18/129 */,
821 150 /* 18/130-18/139 */,
822 160 /* 18/140-18/149 */,
823 170 /* 18/150-18/159 */,
824 180 /* 18/160-18/169 */,
825 190 /* 18/170-18/179 */,
826 200 /* 18/180-18/189 */,
827 210 /* 18/190-18/199 */,
828 220 /* 18/200-18/209 */,
829 230 /* 18/210-18/219 */,
830 240 /* 18/220+ */
835 * Stat Table (DEX) -- index into the "blow" table
837 const byte adj_dex_blow[] =
839 0 /* 3 */,
840 0 /* 4 */,
841 0 /* 5 */,
842 0 /* 6 */,
843 0 /* 7 */,
844 0 /* 8 */,
845 0 /* 9 */,
846 1 /* 10 */,
847 1 /* 11 */,
848 1 /* 12 */,
849 1 /* 13 */,
850 1 /* 14 */,
851 1 /* 15 */,
852 1 /* 16 */,
853 1 /* 17 */,
854 1 /* 18/00-18/09 */,
855 2 /* 18/10-18/19 */,
856 2 /* 18/20-18/29 */,
857 2 /* 18/30-18/39 */,
858 2 /* 18/40-18/49 */,
859 3 /* 18/50-18/59 */,
860 3 /* 18/60-18/69 */,
861 4 /* 18/70-18/79 */,
862 4 /* 18/80-18/89 */,
863 5 /* 18/90-18/99 */,
864 6 /* 18/100-18/109 */,
865 7 /* 18/110-18/119 */,
866 8 /* 18/120-18/129 */,
867 9 /* 18/130-18/139 */,
868 10 /* 18/140-18/149 */,
869 11 /* 18/150-18/159 */,
870 12 /* 18/160-18/169 */,
871 14 /* 18/170-18/179 */,
872 16 /* 18/180-18/189 */,
873 18 /* 18/190-18/199 */,
874 20 /* 18/200-18/209 */,
875 20 /* 18/210-18/219 */,
876 20 /* 18/220+ */
881 * Stat Table (DEX) -- chance of avoiding "theft" and "falling"
883 const byte adj_dex_safe[] =
885 0 /* 3 */,
886 1 /* 4 */,
887 2 /* 5 */,
888 3 /* 6 */,
889 4 /* 7 */,
890 5 /* 8 */,
891 5 /* 9 */,
892 6 /* 10 */,
893 6 /* 11 */,
894 7 /* 12 */,
895 7 /* 13 */,
896 8 /* 14 */,
897 8 /* 15 */,
898 9 /* 16 */,
899 9 /* 17 */,
900 10 /* 18/00-18/09 */,
901 10 /* 18/10-18/19 */,
902 15 /* 18/20-18/29 */,
903 15 /* 18/30-18/39 */,
904 20 /* 18/40-18/49 */,
905 25 /* 18/50-18/59 */,
906 30 /* 18/60-18/69 */,
907 35 /* 18/70-18/79 */,
908 40 /* 18/80-18/89 */,
909 45 /* 18/90-18/99 */,
910 50 /* 18/100-18/109 */,
911 60 /* 18/110-18/119 */,
912 70 /* 18/120-18/129 */,
913 80 /* 18/130-18/139 */,
914 90 /* 18/140-18/149 */,
915 100 /* 18/150-18/159 */,
916 100 /* 18/160-18/169 */,
917 100 /* 18/170-18/179 */,
918 100 /* 18/180-18/189 */,
919 100 /* 18/190-18/199 */,
920 100 /* 18/200-18/209 */,
921 100 /* 18/210-18/219 */,
922 100 /* 18/220+ */
927 * Stat Table (CON) -- base regeneration rate
929 const byte adj_con_fix[] =
931 0 /* 3 */,
932 0 /* 4 */,
933 0 /* 5 */,
934 0 /* 6 */,
935 0 /* 7 */,
936 0 /* 8 */,
937 0 /* 9 */,
938 0 /* 10 */,
939 0 /* 11 */,
940 0 /* 12 */,
941 0 /* 13 */,
942 1 /* 14 */,
943 1 /* 15 */,
944 1 /* 16 */,
945 1 /* 17 */,
946 2 /* 18/00-18/09 */,
947 2 /* 18/10-18/19 */,
948 2 /* 18/20-18/29 */,
949 2 /* 18/30-18/39 */,
950 2 /* 18/40-18/49 */,
951 3 /* 18/50-18/59 */,
952 3 /* 18/60-18/69 */,
953 3 /* 18/70-18/79 */,
954 3 /* 18/80-18/89 */,
955 3 /* 18/90-18/99 */,
956 4 /* 18/100-18/109 */,
957 4 /* 18/110-18/119 */,
958 5 /* 18/120-18/129 */,
959 6 /* 18/130-18/139 */,
960 6 /* 18/140-18/149 */,
961 7 /* 18/150-18/159 */,
962 7 /* 18/160-18/169 */,
963 8 /* 18/170-18/179 */,
964 8 /* 18/180-18/189 */,
965 8 /* 18/190-18/199 */,
966 9 /* 18/200-18/209 */,
967 9 /* 18/210-18/219 */,
968 9 /* 18/220+ */
973 * Stat Table (CON) -- extra 1/100th hitpoints per level
975 const int adj_con_mhp[] =
977 -250 /* 3 */,
978 -150 /* 4 */,
979 -100 /* 5 */,
980 -75 /* 6 */,
981 -50 /* 7 */,
982 -25 /* 8 */,
983 -10 /* 9 */,
984 -5 /* 10 */,
985 0 /* 11 */,
986 5 /* 12 */,
987 10 /* 13 */,
988 25 /* 14 */,
989 50 /* 15 */,
990 75 /* 16 */,
991 100 /* 17 */,
992 150 /* 18/00-18/09 */,
993 175 /* 18/10-18/19 */,
994 200 /* 18/20-18/29 */,
995 225 /* 18/30-18/39 */,
996 250 /* 18/40-18/49 */,
997 275 /* 18/50-18/59 */,
998 300 /* 18/60-18/69 */,
999 350 /* 18/70-18/79 */,
1000 400 /* 18/80-18/89 */,
1001 450 /* 18/90-18/99 */,
1002 500 /* 18/100-18/109 */,
1003 550 /* 18/110-18/119 */,
1004 600 /* 18/120-18/129 */,
1005 650 /* 18/130-18/139 */,
1006 700 /* 18/140-18/149 */,
1007 750 /* 18/150-18/159 */,
1008 800 /* 18/160-18/169 */,
1009 900 /* 18/170-18/179 */,
1010 1000 /* 18/180-18/189 */,
1011 1100 /* 18/190-18/199 */,
1012 1250 /* 18/200-18/209 */,
1013 1250 /* 18/210-18/219 */,
1014 1250 /* 18/220+ */
1019 * This table is used to help calculate the number of blows the player can
1020 * make in a single round of attacks (one player turn) with a normal weapon.
1022 * This number ranges from a single blow/round for weak players to up to six
1023 * blows/round for powerful warriors.
1025 * Note that certain artifacts and ego-items give "bonus" blows/round.
1027 * First, from the player class, we extract some values:
1029 * Warrior --> num = 6; mul = 5; div = MAX(30, weapon_weight);
1030 * Mage --> num = 4; mul = 2; div = MAX(40, weapon_weight);
1031 * Priest --> num = 5; mul = 3; div = MAX(35, weapon_weight);
1032 * Rogue --> num = 5; mul = 3; div = MAX(30, weapon_weight);
1033 * Ranger --> num = 5; mul = 4; div = MAX(35, weapon_weight);
1034 * Paladin --> num = 5; mul = 4; div = MAX(30, weapon_weight);
1036 * To get "P", we look up the relevant "adj_str_blow[]" (see above),
1037 * multiply it by "mul", and then divide it by "div", rounding down.
1039 * To get "D", we look up the relevant "adj_dex_blow[]" (see above),
1040 * note especially column 6 (DEX 18/101) and 11 (DEX 18/150).
1042 * The player gets "blows_table[P][D]" blows/round, as shown below,
1043 * up to a maximum of "num" blows/round, plus any "bonus" blows/round.
1045 const byte blows_table[12][12] =
1047 /* P/D */
1048 /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11+ */
1050 /* 0 */
1051 { 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3 },
1053 /* 1 */
1054 { 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4 },
1056 /* 2 */
1057 { 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5 },
1059 /* 3 */
1060 { 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5 },
1062 /* 4 */
1063 { 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5 },
1065 /* 5 */
1066 { 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6 },
1068 /* 6 */
1069 { 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6 },
1071 /* 7 */
1072 { 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6 },
1074 /* 8 */
1075 { 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6 },
1077 /* 9 */
1078 { 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6 },
1080 /* 10 */
1081 { 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6 },
1083 /* 11+ */
1084 { 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6 },
1089 * This table allows quick conversion from "speed" to "energy"
1090 * The basic function WAS ((S>=110) ? (S-110) : (100 / (120-S)))
1091 * Note that table access is *much* quicker than computation.
1093 * Note that the table has been changed at high speeds. From
1094 * "Slow (-40)" to "Fast (+30)" is pretty much unchanged, but
1095 * at speeds above "Fast (+30)", one approaches an asymptotic
1096 * effective limit of 50 energy per turn. This means that it
1097 * is relatively easy to reach "Fast (+30)" and get about 40
1098 * energy per turn, but then speed becomes very "expensive",
1099 * and you must get all the way to "Fast (+50)" to reach the
1100 * point of getting 45 energy per turn. After that point,
1101 * furthur increases in speed are more or less pointless,
1102 * except to balance out heavy inventory.
1104 * Note that currently the fastest monster is "Fast (+30)".
1106 * It should be possible to lower the energy threshhold from
1107 * 100 units to 50 units, though this may interact badly with
1108 * the (compiled out) small random energy boost code. It may
1109 * also tend to cause more "clumping" at high speeds.
1111 const byte extract_energy[200] =
1113 /* Slow */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1114 /* Slow */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1115 /* Slow */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1116 /* Slow */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1117 /* Slow */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1118 /* Slow */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1119 /* S-50 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1120 /* S-40 */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1121 /* S-30 */ 2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
1122 /* S-20 */ 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
1123 /* S-10 */ 5, 5, 5, 5, 6, 6, 7, 7, 8, 9,
1124 /* Norm */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1125 /* F+10 */ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1126 /* F+20 */ 30, 31, 32, 33, 34, 35, 36, 36, 37, 37,
1127 /* F+30 */ 38, 38, 39, 39, 40, 40, 40, 41, 41, 41,
1128 /* F+40 */ 42, 42, 42, 43, 43, 43, 44, 44, 44, 44,
1129 /* F+50 */ 45, 45, 45, 45, 45, 46, 46, 46, 46, 46,
1130 /* F+60 */ 47, 47, 47, 47, 47, 48, 48, 48, 48, 48,
1131 /* F+70 */ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1132 /* Fast */ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1142 * Base experience levels, may be adjusted up for race and/or class
1144 const s32b player_exp[PY_MAX_LEVEL] =
1150 100,
1151 140,
1152 200,
1153 280,
1154 380,
1155 500,
1156 650,
1157 850,
1158 1100,
1159 1400,
1160 1800,
1161 2300,
1162 2900,
1163 3600,
1164 4400,
1165 5400,
1166 6800,
1167 8400,
1168 10200,
1169 12500,
1170 17500,
1171 25000,
1172 35000L,
1173 50000L,
1174 75000L,
1175 100000L,
1176 150000L,
1177 200000L,
1178 275000L,
1179 350000L,
1180 450000L,
1181 550000L,
1182 700000L,
1183 850000L,
1184 1000000L,
1185 1250000L,
1186 1500000L,
1187 1800000L,
1188 2100000L,
1189 2400000L,
1190 2700000L,
1191 3000000L,
1192 3500000L,
1193 4000000L,
1194 4500000L,
1195 5000000L
1200 * Player Sexes
1202 * Title,
1203 * Winner
1205 const player_sex sex_info[MAX_SEXES] =
1208 "Female",
1209 "Queen"
1213 "Male",
1214 "King"
1220 * Each chest has a certain set of traps, determined by pval
1221 * Each chest has a "pval" from 1 to the chest level (max 55)
1222 * If the "pval" is negative then the trap has been disarmed
1223 * The "pval" of a chest determines the quality of its treasure
1224 * Note that disarming a trap on a chest also removes the lock.
1226 const byte chest_traps[64] =
1228 0, /* 0 == empty */
1229 (CHEST_POISON),
1230 (CHEST_LOSE_STR),
1231 (CHEST_LOSE_CON),
1232 (CHEST_LOSE_STR),
1233 (CHEST_LOSE_CON), /* 5 == best small wooden */
1235 (CHEST_POISON),
1236 (CHEST_POISON),
1237 (CHEST_LOSE_STR),
1238 (CHEST_LOSE_CON),
1239 (CHEST_POISON),
1240 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1241 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1242 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1243 (CHEST_SUMMON), /* 15 == best large wooden */
1245 (CHEST_LOSE_STR),
1246 (CHEST_LOSE_CON),
1247 (CHEST_PARALYZE),
1248 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1249 (CHEST_SUMMON),
1250 (CHEST_PARALYZE),
1251 (CHEST_LOSE_STR),
1252 (CHEST_LOSE_CON),
1253 (CHEST_EXPLODE), /* 25 == best small iron */
1255 (CHEST_POISON | CHEST_LOSE_STR),
1256 (CHEST_POISON | CHEST_LOSE_CON),
1257 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1258 (CHEST_EXPLODE | CHEST_SUMMON),
1259 (CHEST_PARALYZE),
1260 (CHEST_POISON | CHEST_SUMMON),
1261 (CHEST_SUMMON),
1262 (CHEST_EXPLODE),
1263 (CHEST_EXPLODE | CHEST_SUMMON), /* 35 == best large iron */
1265 (CHEST_SUMMON),
1266 (CHEST_EXPLODE),
1267 (CHEST_EXPLODE | CHEST_SUMMON),
1268 (CHEST_EXPLODE | CHEST_SUMMON),
1269 (CHEST_POISON | CHEST_PARALYZE),
1270 (CHEST_EXPLODE),
1271 (CHEST_EXPLODE | CHEST_SUMMON),
1272 (CHEST_EXPLODE | CHEST_SUMMON),
1273 (CHEST_POISON | CHEST_PARALYZE), /* 45 == best small steel */
1275 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1276 (CHEST_LOSE_STR | CHEST_LOSE_CON),
1277 (CHEST_POISON | CHEST_PARALYZE | CHEST_LOSE_STR),
1278 (CHEST_POISON | CHEST_PARALYZE | CHEST_LOSE_CON),
1279 (CHEST_POISON | CHEST_LOSE_STR | CHEST_LOSE_CON),
1280 (CHEST_POISON | CHEST_LOSE_STR | CHEST_LOSE_CON),
1281 (CHEST_POISON | CHEST_PARALYZE | CHEST_LOSE_STR | CHEST_LOSE_CON),
1282 (CHEST_POISON | CHEST_PARALYZE),
1283 (CHEST_POISON | CHEST_PARALYZE), /* 55 == best large steel */
1284 (CHEST_EXPLODE | CHEST_SUMMON),
1285 (CHEST_EXPLODE | CHEST_SUMMON),
1286 (CHEST_EXPLODE | CHEST_SUMMON),
1287 (CHEST_EXPLODE | CHEST_SUMMON),
1288 (CHEST_EXPLODE | CHEST_SUMMON),
1289 (CHEST_EXPLODE | CHEST_SUMMON),
1290 (CHEST_EXPLODE | CHEST_SUMMON),
1291 (CHEST_EXPLODE | CHEST_SUMMON),
1296 * Hack -- the "basic" color names (see "TERM_xxx")
1298 cptr color_names[BASIC_COLORS] =
1300 "Dark",
1301 "White",
1302 "Slate",
1303 "Orange",
1304 "Red",
1305 "Green",
1306 "Blue",
1307 "Umber",
1308 "Light Dark",
1309 "Light Slate",
1310 "Violet",
1311 "Yellow",
1312 "Light Red",
1313 "Light Green",
1314 "Light Blue",
1315 "Light Umber",
1320 * Abbreviations of healthy stats
1322 cptr stat_names[A_MAX] =
1324 "STR: ", "INT: ", "WIS: ", "DEX: ", "CON: ", "CHR: "
1328 * Abbreviations of damaged stats
1330 cptr stat_names_reduced[A_MAX] =
1332 "Str: ", "Int: ", "Wis: ", "Dex: ", "Con: ", "Chr: "
1336 * Full stat names
1338 cptr stat_names_full[A_MAX] =
1340 "strength",
1341 "intelligence",
1342 "wisdom",
1343 "dexterity",
1344 "constitution",
1345 "charisma"
1350 * Certain "screens" always use the main screen, including News, Birth,
1351 * Dungeon, Tomb-stone, High-scores, Macros, Colors, Visuals, Options.
1353 * Later, special flags may allow sub-windows to "steal" stuff from the
1354 * main window, including File dump (help), File dump (artifacts, uniques),
1355 * Character screen, Small scale map, Previous Messages, Store screen, etc.
1357 cptr window_flag_desc[32] =
1359 "Display inven/equip",
1360 "Display equip/inven",
1361 "Display player (basic)",
1362 "Display player (extra)",
1363 "Display player (compact)",
1364 "Display map view",
1365 "Display messages",
1366 "Display overhead view",
1367 "Display monster recall",
1368 "Display object recall",
1369 "Display monster list",
1370 "Display status",
1371 NULL,
1372 NULL,
1373 "Display borg messages",
1374 "Display borg status",
1375 NULL,
1376 NULL,
1377 NULL,
1378 NULL,
1379 NULL,
1380 NULL,
1381 NULL,
1382 NULL,
1383 NULL,
1384 NULL,
1385 NULL,
1386 NULL,
1387 NULL,
1388 NULL,
1389 NULL,
1390 NULL
1395 * Options -- textual names (where defined)
1397 cptr option_text[OPT_MAX] =
1399 "rogue_like_commands", /* OPT_rogue_like_commands */
1400 "quick_messages", /* OPT_quick_messages */
1401 "use_sound", /* OPT_use_sound */
1402 "pickup_detail", /* OPT_pickup_detail */
1403 "use_old_target", /* OPT_use_old_target */
1404 "pickup_always", /* OPT_pickup_always */
1405 "pickup_inven", /* OPT_pickup_inven */
1406 "depth_in_feet", /* OPT_depth_in_feet */
1407 NULL, /* xxx stack_force_notes */
1408 NULL, /* xxx stack_force_costs */
1409 "show_labels", /* OPT_show_labels */
1410 NULL, /* xxx show_weights */
1411 NULL, /* xxx show_choices */
1412 NULL, /* xxx show_details */
1413 "ring_bell", /* OPT_ring_bell */
1414 "show_flavors", /* OPT_flavors */
1415 NULL, /* xxx run_ignore_stairs */
1416 NULL, /* xxx run_ignore_doors */
1417 NULL, /* xxx run_cut_corners */
1418 NULL, /* xxx run_use_corners */
1419 "disturb_move", /* OPT_disturb_move */
1420 "disturb_near", /* OPT_disturb_near */
1421 "disturb_panel", /* OPT_disturb_panel */
1422 "disturb_state", /* OPT_disturb_state */
1423 "disturb_minor", /* OPT_disturb_minor */
1424 NULL, /* xxx next_xp */
1425 NULL, /* xxx alert_hitpoint */
1426 NULL, /* xxx alert_failure */
1427 NULL, /* xxx verify_destroy */
1428 NULL, /* xxx verify_special */
1429 NULL, /* xxx allow_quantity */
1430 NULL, /* xxx */
1431 NULL, /* xxx auto_haggle */
1432 NULL, /* xxx auto_scum */
1433 NULL, /* xxx testing_stack */
1434 NULL, /* xxx testing_carry */
1435 NULL, /* xxx expand_look */
1436 NULL, /* xxx expand_list */
1437 "view_perma_grids", /* OPT_view_perma_grids */
1438 "view_torch_grids", /* OPT_view_torch_grids */
1439 NULL, /* xxx dungeon_align */
1440 NULL, /* xxx dungeon_stair */
1441 NULL, /* xxx flow_by_sound */
1442 NULL, /* xxx flow_by_smell */
1443 NULL, /* xxx track_follow */
1444 NULL, /* xxx track_target */
1445 NULL, /* xxx smart_learn */
1446 NULL, /* xxx smart_cheat */
1447 NULL, /* xxx view_reduce_lite */
1448 NULL, /* xxx hidden_player */
1449 NULL, /* xxx avoid_abort */
1450 NULL, /* xxx avoid_other */
1451 "flush_failure", /* OPT_flush_failure */
1452 "flush_disturb", /* OPT_flush_disturb */
1453 NULL, /* xxx flush_command */
1454 NULL, /* xxx fresh_before */
1455 NULL, /* xxx fresh_after */
1456 NULL, /* xxx fresh_message */
1457 NULL, /* xxx compress_savefile */
1458 "hilite_player", /* OPT_hilite_player */
1459 "view_yellow_lite", /* OPT_view_yellow_lite */
1460 "view_bright_lite", /* OPT_view_bright_lite */
1461 "view_granite_lite", /* OPT_view_granite_lite */
1462 "view_special_lite", /* OPT_view_special_lite */
1463 "easy_open", /* OPT_easy_open */
1464 "easy_alter", /* OPT_easy_alter */
1465 NULL, /* xxx easy_floor */
1466 "show_piles", /* OPT_show_piles */
1467 "center_player", /* OPT_center_player */
1468 NULL, /* xxx run_avoid_center */
1469 NULL, /* xxx scroll_target */
1470 "auto_more", /* OPT_auto_more */
1471 NULL, /* xxx smart_monsters */
1472 NULL, /* xxx smart_packs */
1473 "hp_changes_color", /* OPT_hp_changes_color */
1474 "hide_squelchable", /* OPT_hide_squelchable */
1475 "squelch_worthless", /* OPT_squelch_worthless */
1476 "mouse_movement", /* OPT_mouse_movement */
1477 NULL, /* xxx */
1478 NULL, /* xxx */
1479 NULL, /* xxx */
1480 NULL, /* xxx */
1481 NULL, /* xxx */
1482 NULL, /* xxx */
1483 NULL, /* xxx */
1484 NULL, /* xxx */
1485 NULL, /* xxx */
1486 NULL, /* xxx */
1487 NULL, /* xxx */
1488 NULL, /* xxx */
1489 NULL, /* xxx */
1490 NULL, /* xxx */
1491 NULL, /* xxx */
1492 NULL, /* xxx */
1493 NULL, /* xxx */
1494 NULL, /* xxx */
1495 NULL, /* xxx */
1496 NULL, /* xxx */
1497 NULL, /* xxx */
1498 NULL, /* xxx */
1499 NULL, /* xxx */
1500 NULL, /* xxx */
1501 NULL, /* xxx */
1502 NULL, /* xxx */
1503 NULL, /* xxx */
1504 NULL, /* xxx */
1505 NULL, /* xxx */
1506 NULL, /* xxx */
1507 NULL, /* xxx */
1508 NULL, /* xxx */
1509 NULL, /* xxx */
1510 NULL, /* xxx */
1511 NULL, /* xxx */
1512 NULL, /* xxx */
1513 NULL, /* xxx */
1514 NULL, /* xxx */
1515 NULL, /* xxx */
1516 NULL, /* xxx */
1517 NULL, /* xxx */
1518 NULL, /* xxx */
1519 NULL, /* xxx */
1520 NULL, /* xxx */
1521 NULL, /* xxx */
1522 NULL, /* xxx */
1523 NULL, /* xxx */
1524 NULL, /* xxx */
1525 NULL, /* xxx */
1526 NULL, /* xxx */
1527 "birth_maximize",
1528 "birth_randarts",
1529 "birth_autoscum",
1530 "birth_ironman",
1531 "birth_no_stores",
1532 "birth_no_artifacts",
1533 "birth_no_stacking",
1534 "birth_no_preserve",
1535 "birth_no_stairs",
1536 NULL, /* xxx */
1537 NULL, /* xxx */
1538 NULL, /* xxx */
1539 NULL, /* xxx */
1540 "birth_ai_sound",
1541 "birth_ai_smell",
1542 "birth_ai_packs",
1543 "birth_ai_learn",
1544 "birth_ai_cheat",
1545 "birth_ai_smart",
1546 NULL, /* xxx */
1547 NULL, /* xxx */
1548 NULL, /* xxx */
1549 NULL, /* xxx */
1550 NULL, /* xxx */
1551 NULL, /* xxx */
1552 NULL, /* xxx */
1553 NULL, /* xxx */
1554 NULL, /* xxx */
1555 NULL, /* xxx */
1556 NULL, /* xxx */
1557 NULL, /* xxx */
1558 NULL, /* xxx */
1559 "cheat_peek", /* OPT_cheat_peek */
1560 "cheat_hear", /* OPT_cheat_hear */
1561 "cheat_room", /* OPT_cheat_room */
1562 "cheat_xtra", /* OPT_cheat_xtra */
1563 "cheat_know", /* OPT_cheat_know */
1564 "cheat_live", /* OPT_cheat_live */
1565 NULL, /* xxx */
1566 NULL, /* xxx */
1567 NULL, /* xxx */
1568 NULL, /* xxx */
1569 NULL, /* xxx */
1570 NULL, /* xxx */
1571 NULL, /* xxx */
1572 NULL, /* xxx */
1573 NULL, /* xxx */
1574 NULL, /* xxx */
1575 NULL, /* xxx */
1576 NULL, /* xxx */
1577 NULL, /* xxx */
1578 NULL, /* xxx */
1579 NULL, /* xxx */
1580 NULL, /* xxx */
1581 NULL, /* xxx */
1582 NULL, /* xxx */
1583 NULL, /* xxx */
1584 NULL, /* xxx */
1585 NULL, /* xxx */
1586 NULL, /* xxx */
1587 NULL, /* xxx */
1588 NULL, /* xxx */
1589 NULL, /* xxx */
1590 NULL, /* xxx */
1591 "adult_maximize",
1592 "adult_randarts",
1593 "adult_autoscum",
1594 "adult_ironman",
1595 "adult_no_stores",
1596 "adult_no_artifacts",
1597 "adult_no_stacking",
1598 "adult_no_preserve",
1599 "adult_no_stairs",
1600 NULL, /* xxx */
1601 NULL, /* xxx */
1602 NULL, /* xxx */
1603 NULL, /* xxx */
1604 "adult_ai_sound",
1605 "adult_ai_smell",
1606 "adult_ai_packs",
1607 "adult_ai_learn",
1608 "adult_ai_cheat",
1609 "adult_ai_smart",
1610 NULL, /* xxx */
1611 NULL, /* xxx */
1612 NULL, /* xxx */
1613 NULL, /* xxx */
1614 NULL, /* xxx */
1615 NULL, /* xxx */
1616 NULL, /* xxx */
1617 NULL, /* xxx */
1618 NULL, /* xxx */
1619 NULL, /* xxx */
1620 NULL, /* xxx */
1621 NULL, /* xxx */
1622 NULL, /* xxx */
1623 "score_peek", /* OPT_score_peek */
1624 "score_hear", /* OPT_score_hear */
1625 "score_room", /* OPT_score_room */
1626 "score_xtra", /* OPT_score_xtra */
1627 "score_know", /* OPT_score_know */
1628 "score_live", /* OPT_score_live */
1629 NULL, /* xxx */
1630 NULL, /* xxx */
1631 NULL, /* xxx */
1632 NULL, /* xxx */
1633 NULL, /* xxx */
1634 NULL, /* xxx */
1635 NULL, /* xxx */
1636 NULL, /* xxx */
1637 NULL, /* xxx */
1638 NULL, /* xxx */
1639 NULL, /* xxx */
1640 NULL, /* xxx */
1641 NULL, /* xxx */
1642 NULL, /* xxx */
1643 NULL, /* xxx */
1644 NULL, /* xxx */
1645 NULL, /* xxx */
1646 NULL, /* xxx */
1647 NULL, /* xxx */
1648 NULL, /* xxx */
1649 NULL, /* xxx */
1650 NULL, /* xxx */
1651 NULL, /* xxx */
1652 NULL, /* xxx */
1653 NULL, /* xxx */
1654 NULL /* xxx */
1659 * Options -- descriptions (where defined)
1661 cptr option_desc[OPT_MAX] =
1663 "Rogue-like commands", /* OPT_rogue_like_commands */
1664 "Activate quick messages", /* OPT_quick_messages */
1665 "Use sound", /* OPT_use_sound */
1666 "Be verbose when picking things up", /* OPT_pickup_detail */
1667 "Use old target by default", /* OPT_use_old_target */
1668 "Always pickup items", /* OPT_pickup_always */
1669 "Always pickup items matching inventory", /* OPT_pickup_inven */
1670 "Show dungeon level in feet", /* OPT_depth_in_feet */
1671 NULL, /* xxx stack_force_notes */
1672 NULL, /* xxx stack_force_costs */
1673 "Show labels in equipment listings", /* OPT_show_labels */
1674 NULL, /* xxx show_weights */
1675 NULL, /* xxx show_choices */
1676 NULL, /* xxx show_details */
1677 "Audible bell (on errors, etc)", /* OPT_ring_bell */
1678 "Show flavors in object descriptions", /* OPT_show_flavors */
1679 NULL, /* xxx run_ignore_stairs */
1680 NULL, /* xxx run_ignore_doors */
1681 NULL, /* xxx run_cut_corners */
1682 NULL, /* xxx run_use_corners */
1683 "Disturb whenever any monster moves", /* OPT_disturb_move */
1684 "Disturb whenever viewable monster moves", /* OPT_disturb_near */
1685 "Disturb whenever map panel changes", /* OPT_disturb_panel */
1686 "Disturb whenever player state changes", /* OPT_disturb_state */
1687 "Disturb whenever boring things happen", /* OPT_disturb_minor */
1688 NULL, /* xxx next_xp */
1689 NULL, /* xxx alert_hitpoint */
1690 NULL, /* xxx alert_failure */
1691 NULL, /* xxx verify_destroy */
1692 NULL, /* xxx verify_special */
1693 NULL, /* xxx allow_quantity */
1694 NULL, /* xxx */
1695 NULL, /* xxx auto_haggle */
1696 NULL, /* xxx auto_scum */
1697 NULL, /* xxx testing_stack */
1698 NULL, /* xxx testing_carry */
1699 NULL, /* xxx expand_look */
1700 NULL, /* xxx expand_list */
1701 "Map remembers all perma-lit grids", /* OPT_view_perma_grids */
1702 "Map remembers all torch-lit grids", /* OPT_view_torch_grids */
1703 "Generate dungeons with aligned rooms", /* OPT_dungeon_align */
1704 "Generate dungeons with connected stairs", /* OPT_dungeon_stair */
1705 "Monsters chase current location (slow)", /* OPT_adult_ai_sound */
1706 "Monsters chase recent locations (slow)", /* OPT_adult_ai_smell */
1707 NULL, /* xxx track_follow */
1708 NULL, /* xxx track_target */
1709 NULL, /* xxx smart_learn */
1710 NULL, /* xxx smart_cheat */
1711 NULL, /* xxx view_reduce_lite */
1712 NULL, /* xxx hidden_player */
1713 NULL, /* xxx avoid_abort */
1714 NULL, /* xxx avoid_other */
1715 "Flush input on various failures", /* OPT_flush_failure */
1716 "Flush input whenever disturbed", /* OPT_flush_disturb */
1717 NULL, /* xxx */
1718 NULL, /* xxx fresh_before */
1719 NULL, /* xxx fresh_after */
1720 NULL, /* xxx */
1721 NULL, /* xxx compress_savefile */
1722 "Hilite the player with the cursor", /* OPT_hilite_player */
1723 "Use special colors for torch lite", /* OPT_view_yellow_lite */
1724 "Use special colors for field of view", /* OPT_view_bright_lite */
1725 "Use special colors for wall grids", /* OPT_view_granite_lite */
1726 "Use special colors for floor grids", /* OPT_view_special_lite */
1727 "Open/Disarm/Close without direction", /* OPT_easy_open */
1728 "Open/Disarm doors/traps on movement", /* OPT_easy_alter */
1729 NULL, /* xxx easy_floor */
1730 "Show stacks using special attr/char", /* OPT_show_piles */
1731 "Center map continuously", /* OPT_center_player */
1732 NULL, /* xxx run_avoid_center */
1733 NULL, /* xxx scroll_target */
1734 "Automatically clear '-more-' prompts", /* OPT_auto_more */
1735 NULL, /* xxx smart_monsters */
1736 NULL, /* xxx smart_packs */
1737 "Player color indicates low hit points", /* OPT_hp_changes_color */
1738 "Hide items set as squelchable", /* OPT_hide_squelchable */
1739 "Automatically squelch worthless items", /* OPT_squelch_worthless */
1740 "Allow mouse clicks to move the player", /* OPT_mouse_movement */
1741 NULL, /* xxx */
1742 NULL, /* xxx */
1743 NULL, /* xxx */
1744 NULL, /* xxx */
1745 NULL, /* xxx */
1746 NULL, /* xxx */
1747 NULL, /* xxx */
1748 NULL, /* xxx */
1749 NULL, /* xxx */
1750 NULL, /* xxx */
1751 NULL, /* xxx */
1752 NULL, /* xxx */
1753 NULL, /* xxx */
1754 NULL, /* xxx */
1755 NULL, /* xxx */
1756 NULL, /* xxx */
1757 NULL, /* xxx */
1758 NULL, /* xxx */
1759 NULL, /* xxx */
1760 NULL, /* xxx */
1761 NULL, /* xxx */
1762 NULL, /* xxx */
1763 NULL, /* xxx */
1764 NULL, /* xxx */
1765 NULL, /* xxx */
1766 NULL, /* xxx */
1767 NULL, /* xxx */
1768 NULL, /* xxx */
1769 NULL, /* xxx */
1770 NULL, /* xxx */
1771 NULL, /* xxx */
1772 NULL, /* xxx */
1773 NULL, /* xxx */
1774 NULL, /* xxx */
1775 NULL, /* xxx */
1776 NULL, /* xxx */
1777 NULL, /* xxx */
1778 NULL, /* xxx */
1779 NULL, /* xxx */
1780 NULL, /* xxx */
1781 NULL, /* xxx */
1782 NULL, /* xxx */
1783 NULL, /* xxx */
1784 NULL, /* xxx */
1785 NULL, /* xxx */
1786 NULL, /* xxx */
1787 NULL, /* xxx */
1788 NULL, /* xxx */
1789 NULL, /* xxx */
1790 NULL, /* xxx */
1791 "Maximize effect of race/class bonuses", /* OPT_birth_maximize */
1792 "Randomize some of the artifacts (alpha)", /* OPT_birth_randarts */
1793 "Auto-scum for good levels", /* OPT_birth_autoscum */
1794 "Restrict the use of stairs/recall", /* OPT_birth_ironman */
1795 "Restrict the use of stores/home", /* OPT_birth_no_stores */
1796 "Restrict creation of artifacts", /* OPT_birth_no_artifacts */
1797 "Don't stack objects on the floor", /* OPT_birth_no_stacking */
1798 "Don't preserve artifacts when leaving level", /* OPT_birth_no_preserve */
1799 "Don't generate connected stairs", /* OPT_birth_no_stairs */
1800 NULL, /* xxx */
1801 NULL, /* xxx */
1802 NULL, /* xxx */
1803 NULL, /* xxx */
1804 "Monsters chase current location",
1805 "Monsters chase recent locations",
1806 "Monsters act smarter in groups",
1807 "Monsters learn from their mistakes",
1808 "Monsters exploit player's weaknesses",
1809 "Monsters behave more intelligently (broken)",
1810 NULL, /* xxx */
1811 NULL, /* xxx */
1812 NULL, /* xxx */
1813 NULL, /* xxx */
1814 NULL, /* xxx */
1815 NULL, /* xxx */
1816 NULL, /* xxx */
1817 NULL, /* xxx */
1818 NULL, /* xxx */
1819 NULL, /* xxx */
1820 NULL, /* xxx */
1821 NULL, /* xxx */
1822 NULL, /* xxx */
1823 "Cheat: Peek into object creation", /* OPT_cheat_peek */
1824 "Cheat: Peek into monster creation", /* OPT_cheat_hear */
1825 "Cheat: Peek into dungeon creation", /* OPT_cheat_room */
1826 "Cheat: Peek into something else", /* OPT_cheat_xtra */
1827 "Cheat: Know complete monster info", /* OPT_cheat_know */
1828 "Cheat: Allow player to avoid death", /* OPT_cheat_live */
1829 NULL, /* xxx */
1830 NULL, /* xxx */
1831 NULL, /* xxx */
1832 NULL, /* xxx */
1833 NULL, /* xxx */
1834 NULL, /* xxx */
1835 NULL, /* xxx */
1836 NULL, /* xxx */
1837 NULL, /* xxx */
1838 NULL, /* xxx */
1839 NULL, /* xxx */
1840 NULL, /* xxx */
1841 NULL, /* xxx */
1842 NULL, /* xxx */
1843 NULL, /* xxx */
1844 NULL, /* xxx */
1845 NULL, /* xxx */
1846 NULL, /* xxx */
1847 NULL, /* xxx */
1848 NULL, /* xxx */
1849 NULL, /* xxx */
1850 NULL, /* xxx */
1851 NULL, /* xxx */
1852 NULL, /* xxx */
1853 NULL, /* xxx */
1854 NULL, /* xxx */
1855 "Adult: Maximize effect of race/class bonuses", /* OPT_adult_maximize */
1856 "Adult: Randomize some of the artifacts (beta)",/* OPT_adult_randarts */
1857 "Adult: Auto-scum for good levels", /* OPT_adult_autoscum */
1858 "Adult: Restrict the use of stairs/recall", /* OPT_adult_ironman */
1859 "Adult: Restrict the use of stores/home", /* OPT_adult_no_stores */
1860 "Adult: Restrict creation of artifacts", /* OPT_adult_no_artifacts */
1861 "Adult: Don't stack objects on the floor", /* OPT_adult_no_stacking */
1862 "Adult: Preserve artifacts when leaving level", /* OPT_adult_no_preserve */
1863 "Adult: Don't generate connected stairs", /* OPT_adult_no_stairs */
1864 NULL, /* xxx */
1865 NULL, /* xxx */
1866 NULL, /* xxx */
1867 NULL, /* xxx */
1868 "Adult: Monsters chase current location",
1869 "Adult: Monsters chase recent locations",
1870 "Adult: Monsters act smarter in groups",
1871 "Adult: Monsters learn from their mistakes",
1872 "Adult: Monsters exploit players weaknesses",
1873 "Adult: Monsters behave more intelligently (broken)",
1874 NULL, /* xxx */
1875 NULL, /* xxx */
1876 NULL, /* xxx */
1877 NULL, /* xxx */
1878 NULL, /* xxx */
1879 NULL, /* xxx */
1880 NULL, /* xxx */
1881 NULL, /* xxx */
1882 NULL, /* xxx */
1883 NULL, /* xxx */
1884 NULL, /* xxx */
1885 NULL, /* xxx */
1886 NULL, /* xxx */
1887 "Score: Peek into object creation", /* OPT_score_peek */
1888 "Score: Peek into monster creation", /* OPT_score_hear */
1889 "Score: Peek into dungeon creation", /* OPT_score_room */
1890 "Score: Peek into something else", /* OPT_score_xtra */
1891 "Score: Know complete monster info", /* OPT_score_know */
1892 "Score: Allow player to avoid death", /* OPT_score_live */
1893 NULL, /* xxx */
1894 NULL, /* xxx */
1895 NULL, /* xxx */
1896 NULL, /* xxx */
1897 NULL, /* xxx */
1898 NULL, /* xxx */
1899 NULL, /* xxx */
1900 NULL, /* xxx */
1901 NULL, /* xxx */
1902 NULL, /* xxx */
1903 NULL, /* xxx */
1904 NULL, /* xxx */
1905 NULL, /* xxx */
1906 NULL, /* xxx */
1907 NULL, /* xxx */
1908 NULL, /* xxx */
1909 NULL, /* xxx */
1910 NULL, /* xxx */
1911 NULL, /* xxx */
1912 NULL, /* xxx */
1913 NULL, /* xxx */
1914 NULL, /* xxx */
1915 NULL, /* xxx */
1916 NULL, /* xxx */
1917 NULL, /* xxx */
1918 NULL /* xxx */
1923 * Options -- normal values
1925 const bool option_norm[OPT_MAX] =
1927 FALSE, /* OPT_rogue_like_commands */
1928 TRUE, /* OPT_quick_messages */
1929 FALSE, /* OPT_use_sound */
1930 TRUE, /* OPT_query_floor */
1931 FALSE, /* OPT_use_old_target */
1932 FALSE, /* OPT_always_pickup */
1933 TRUE, /* OPT_pickup_inven */
1934 FALSE, /* OPT_depth_in_feet */
1935 FALSE, /* OPT_stack_force_notes */
1936 FALSE, /* xxx stack_force_costs */
1937 TRUE, /* OPT_show_labels */
1938 FALSE, /* xxx show_weights */
1939 FALSE, /* xxx show_choices */
1940 FALSE, /* xxx show_details */
1941 TRUE, /* OPT_ring_bell */
1942 TRUE, /* OPT_show_flavors */
1943 FALSE, /* xxx run_ignore_stairs */
1944 FALSE, /* xxx run_ignore_doors */
1945 FALSE, /* xxx run_cut_corners */
1946 FALSE, /* xxx run_use_corners */
1947 FALSE, /* OPT_disturb_move */
1948 TRUE, /* OPT_disturb_near */
1949 TRUE, /* OPT_disturb_panel */
1950 TRUE, /* OPT_disturb_state */
1951 TRUE, /* OPT_disturb_minor */
1952 FALSE, /* xxx next_xp */
1953 FALSE, /* xxx alert_hitpoint */
1954 FALSE, /* xxx alert_failure */
1955 FALSE, /* xxx verify_destroy */
1956 FALSE, /* xxx verify_special */
1957 FALSE, /* xxx allow_quantity */
1958 FALSE, /* xxx */
1959 FALSE, /* xxx auto_haggle */
1960 FALSE, /* xxx auto_scum */
1961 FALSE, /* xxx */
1962 FALSE, /* xxx */
1963 FALSE, /* xxx expand_look */
1964 FALSE, /* xxx expand_list */
1965 TRUE, /* OPT_view_perma_grids */
1966 TRUE, /* OPT_view_torch_grids */
1967 TRUE, /* OPT_dungeon_align */
1968 TRUE, /* OPT_dungeon_stair */
1969 FALSE, /* xxx adult_ai_sound */
1970 FALSE, /* xxx adult_ai_smell */
1971 FALSE, /* xxx track_follow */
1972 FALSE, /* xxx track_target */
1973 FALSE, /* xxx smart_learn */
1974 FALSE, /* xxx smart_cheat */
1975 FALSE, /* xxx view_reduce_lite */
1976 FALSE, /* xxx hidden_player */
1977 FALSE, /* xxx avoid_abort */
1978 FALSE, /* xxx avoid_other */
1979 TRUE, /* OPT_flush_failure */
1980 FALSE, /* OPT_flush_disturb */
1981 FALSE, /* xxx */
1982 FALSE, /* xxx fresh_before */
1983 FALSE, /* xxx fresh_after */
1984 FALSE, /* xxx */
1985 FALSE, /* xxx compress_savefile */
1986 FALSE, /* OPT_hilite_player */
1987 FALSE, /* OPT_view_yellow_lite */
1988 TRUE, /* OPT_view_bright_lite */
1989 FALSE, /* OPT_view_granite_lite */
1990 TRUE, /* OPT_view_special_lite */
1991 FALSE, /* OPT_easy_open */
1992 FALSE, /* OPT_easy_alter */
1993 FALSE, /* xxx easy_floor */
1994 FALSE, /* OPT_show_piles */
1995 FALSE, /* OPT_center_player */
1996 FALSE, /* xxx run_avoid_center */
1997 FALSE, /* xxx */
1998 FALSE, /* OPT_auto_more */
1999 FALSE, /* xxx smart_monsters */
2000 FALSE, /* xxx smart_packs */
2001 FALSE, /* OPT_hp_changes_color */
2002 FALSE, /* OPT_hide_squelchable */
2003 FALSE, /* OPT_squelch_worthless */
2004 FALSE, /* OPT_mouse_movement */
2005 FALSE, /* xxx */
2006 FALSE, /* xxx */
2007 FALSE, /* xxx */
2008 FALSE, /* xxx */
2009 FALSE, /* xxx */
2010 FALSE, /* xxx */
2011 FALSE, /* xxx */
2012 FALSE, /* xxx */
2013 FALSE, /* xxx */
2014 FALSE, /* xxx */
2015 FALSE, /* xxx */
2016 FALSE, /* xxx */
2017 FALSE, /* xxx */
2018 FALSE, /* xxx */
2019 FALSE, /* xxx */
2020 FALSE, /* xxx */
2021 FALSE, /* xxx */
2022 FALSE, /* xxx */
2023 FALSE, /* xxx */
2024 FALSE, /* xxx */
2025 FALSE, /* xxx */
2026 FALSE, /* xxx */
2027 FALSE, /* xxx */
2028 FALSE, /* xxx */
2029 FALSE, /* xxx */
2030 FALSE, /* xxx */
2031 FALSE, /* xxx */
2032 FALSE, /* xxx */
2033 FALSE, /* xxx */
2034 FALSE, /* xxx */
2035 FALSE, /* xxx */
2036 FALSE, /* xxx */
2037 FALSE, /* xxx */
2038 FALSE, /* xxx */
2039 FALSE, /* xxx */
2040 FALSE, /* xxx */
2041 FALSE, /* xxx */
2042 FALSE, /* xxx */
2043 FALSE, /* xxx */
2044 FALSE, /* xxx */
2045 FALSE, /* xxx */
2046 FALSE, /* xxx */
2047 FALSE, /* xxx */
2048 FALSE, /* xxx */
2049 FALSE, /* xxx */
2050 FALSE, /* xxx */
2051 FALSE, /* xxx */
2052 FALSE, /* xxx */
2053 FALSE, /* xxx */
2054 FALSE, /* xxx */
2055 TRUE, /* birth_maximise */
2056 FALSE, /* birth_randarts */
2057 FALSE, /* birth_autoscum */
2058 FALSE, /* birth_ironman */
2059 FALSE, /* birth_no_stores */
2060 FALSE, /* birth_no_artifacts */
2061 FALSE, /* birth_no_stacking */
2062 FALSE, /* birth_no_preserve */
2063 FALSE, /* birth_no_stairs */
2064 FALSE, /* xxx */
2065 FALSE, /* xxx */
2066 FALSE, /* xxx */
2067 FALSE, /* xxx */
2068 TRUE, /* birth_ai_sound */
2069 TRUE, /* birth_ai_smell */
2070 TRUE, /* birth_ai_packs */
2071 FALSE, /* birth_ai_learn */
2072 FALSE, /* birth_ai_cheat */
2073 FALSE, /* birth_ai_smart */
2074 FALSE, /* xxx */
2075 FALSE, /* xxx */
2076 FALSE, /* xxx */
2077 FALSE, /* xxx */
2078 FALSE, /* xxx */
2079 FALSE, /* xxx */
2080 FALSE, /* xxx */
2081 FALSE, /* xxx */
2082 FALSE, /* xxx */
2083 FALSE, /* xxx */
2084 FALSE, /* xxx */
2085 FALSE, /* xxx */
2086 FALSE, /* xxx */
2087 FALSE, /* OPT_cheat_peek */
2088 FALSE, /* OPT_cheat_hear */
2089 FALSE, /* OPT_cheat_room */
2090 FALSE, /* OPT_cheat_xtra */
2091 FALSE, /* OPT_cheat_know */
2092 FALSE, /* OPT_cheat_live */
2093 FALSE, /* xxx */
2094 FALSE, /* xxx */
2095 FALSE, /* xxx */
2096 FALSE, /* xxx */
2097 FALSE, /* xxx */
2098 FALSE, /* xxx */
2099 FALSE, /* xxx */
2100 FALSE, /* xxx */
2101 FALSE, /* xxx */
2102 FALSE, /* xxx */
2103 FALSE, /* xxx */
2104 FALSE, /* xxx */
2105 FALSE, /* xxx */
2106 FALSE, /* xxx */
2107 FALSE, /* xxx */
2108 FALSE, /* xxx */
2109 FALSE, /* xxx */
2110 FALSE, /* xxx */
2111 FALSE, /* xxx */
2112 FALSE, /* xxx */
2113 FALSE, /* xxx */
2114 FALSE, /* xxx */
2115 FALSE, /* xxx */
2116 FALSE, /* xxx */
2117 FALSE, /* xxx */
2118 FALSE, /* xxx */
2119 TRUE, /* adult_maximise */
2120 FALSE, /* adult_randarts */
2121 FALSE, /* adult_autoscum */
2122 FALSE, /* adult_ironman */
2123 FALSE, /* adult_no_stores */
2124 FALSE, /* adult_no_artifacts */
2125 FALSE, /* adult_no_stacking */
2126 FALSE, /* adult_no_preserve */
2127 FALSE, /* adult_no_stairs */
2128 FALSE, /* xxx */
2129 FALSE, /* xxx */
2130 FALSE, /* xxx */
2131 FALSE, /* xxx */
2132 TRUE, /* adult_ai_sound */
2133 TRUE, /* adult_ai_smell */
2134 TRUE, /* adult_ai_packs */
2135 FALSE, /* adult_ai_learn */
2136 FALSE, /* adult_ai_cheat */
2137 FALSE, /* adult_ai_smart */
2138 FALSE, /* xxx */
2139 FALSE, /* xxx */
2140 FALSE, /* xxx */
2141 FALSE, /* xxx */
2142 FALSE, /* xxx */
2143 FALSE, /* xxx */
2144 FALSE, /* xxx */
2145 FALSE, /* xxx */
2146 FALSE, /* xxx */
2147 FALSE, /* xxx */
2148 FALSE, /* xxx */
2149 FALSE, /* xxx */
2150 FALSE, /* xxx */
2151 FALSE, /* OPT_score_peek */
2152 FALSE, /* OPT_score_hear */
2153 FALSE, /* OPT_score_room */
2154 FALSE, /* OPT_score_xtra */
2155 FALSE, /* OPT_score_know */
2156 FALSE, /* OPT_score_live */
2157 FALSE, /* xxx */
2158 FALSE, /* xxx */
2159 FALSE, /* xxx */
2160 FALSE, /* xxx */
2161 FALSE, /* xxx */
2162 FALSE, /* xxx */
2163 FALSE, /* xxx */
2164 FALSE, /* xxx */
2165 FALSE, /* xxx */
2166 FALSE, /* xxx */
2167 FALSE, /* xxx */
2168 FALSE, /* xxx */
2169 FALSE, /* xxx */
2170 FALSE, /* xxx */
2171 FALSE, /* xxx */
2172 FALSE, /* xxx */
2173 FALSE, /* xxx */
2174 FALSE, /* xxx */
2175 FALSE, /* xxx */
2176 FALSE, /* xxx */
2177 FALSE, /* xxx */
2178 FALSE, /* xxx */
2179 FALSE, /* xxx */
2180 FALSE, /* xxx */
2181 FALSE, /* xxx */
2182 FALSE /* xxx */
2187 * Option screen interface
2189 const byte option_page[OPT_PAGE_MAX][OPT_PAGE_PER] =
2191 /* Interface */
2193 OPT_use_sound,
2194 OPT_rogue_like_commands,
2195 OPT_use_old_target,
2196 OPT_pickup_always,
2197 OPT_pickup_inven,
2198 OPT_pickup_detail,
2199 OPT_hide_squelchable,
2200 OPT_squelch_worthless,
2201 OPT_easy_alter,
2202 OPT_easy_open,
2203 OPT_mouse_movement,
2204 OPT_NONE,
2205 OPT_NONE,
2206 OPT_NONE,
2207 OPT_NONE,
2210 /* Display */
2212 OPT_hp_changes_color,
2213 OPT_depth_in_feet,
2214 OPT_hilite_player,
2215 OPT_center_player,
2216 OPT_show_piles,
2217 OPT_show_flavors,
2218 OPT_show_labels,
2219 OPT_view_yellow_lite,
2220 OPT_view_bright_lite,
2221 OPT_view_granite_lite,
2222 OPT_view_special_lite,
2223 OPT_view_perma_grids,
2224 OPT_view_torch_grids,
2225 OPT_NONE,
2226 OPT_NONE,
2229 /* Warning */
2231 OPT_disturb_move,
2232 OPT_disturb_near,
2233 OPT_disturb_panel,
2234 OPT_disturb_state,
2235 OPT_disturb_minor,
2236 OPT_quick_messages,
2237 OPT_auto_more,
2238 OPT_ring_bell,
2239 OPT_flush_failure,
2240 OPT_flush_disturb,
2241 OPT_NONE,
2242 OPT_NONE,
2243 OPT_NONE,
2244 OPT_NONE,
2245 OPT_NONE,
2248 /* Birth/Difficulty */
2250 OPT_birth_maximize,
2251 OPT_birth_randarts,
2252 OPT_birth_autoscum,
2253 OPT_birth_ironman,
2254 OPT_birth_no_stores,
2255 OPT_birth_no_artifacts,
2256 OPT_birth_no_stacking,
2257 OPT_birth_no_preserve,
2258 OPT_birth_no_stairs,
2259 OPT_birth_ai_sound,
2260 OPT_birth_ai_smell,
2261 OPT_birth_ai_packs,
2262 OPT_birth_ai_learn,
2263 OPT_birth_ai_cheat,
2264 OPT_birth_ai_smart,
2267 /* Cheat */
2269 OPT_cheat_peek,
2270 OPT_cheat_hear,
2271 OPT_cheat_room,
2272 OPT_cheat_xtra,
2273 OPT_cheat_know,
2274 OPT_cheat_live,
2275 OPT_NONE,
2276 OPT_NONE,
2277 OPT_NONE,
2278 OPT_NONE,
2279 OPT_NONE,
2280 OPT_NONE,
2281 OPT_NONE,
2282 OPT_NONE,
2283 OPT_NONE,
2288 cptr inscrip_text[MAX_INSCRIP] =
2290 NULL,
2291 "terrible",
2292 "worthless",
2293 "cursed",
2294 "broken",
2295 "average",
2296 "good",
2297 "excellent",
2298 "special",
2299 "uncursed",
2300 "indestructible"
2303 const grouper object_text_order [] =
2305 {TV_RING, "Ring" },
2306 {TV_AMULET, "Amulet" },
2307 {TV_POTION, "Potion" },
2308 {TV_SCROLL, "Scroll" },
2309 {TV_WAND, "Wand" },
2310 {TV_STAFF, "Staff" },
2311 {TV_ROD, "Rod" },
2312 {TV_FOOD, "Food" },
2313 {TV_PRAYER_BOOK, "Priest Book" },
2314 {TV_MAGIC_BOOK, "Magic Book" },
2315 {TV_LITE, "Light" },
2316 {TV_FLASK, "Flask" },
2317 {TV_SWORD, "Sword" },
2318 {TV_POLEARM, "Polearm" },
2319 {TV_HAFTED, "Hafted Weapon" },
2320 {TV_BOW, "Bow" },
2321 {TV_ARROW, "Ammunition" },
2322 {TV_BOLT, NULL },
2323 {TV_SHOT, NULL },
2324 {TV_SHIELD, "Shield" },
2325 {TV_CROWN, "Crown" },
2326 {TV_HELM, "Helm" },
2327 {TV_GLOVES, "Gloves" },
2328 {TV_BOOTS, "Boots" },
2329 {TV_CLOAK, "Cloak" },
2330 {TV_DRAG_ARMOR, "Dragon Scale Mail" },
2331 {TV_HARD_ARMOR, "Hard Armor" },
2332 {TV_SOFT_ARMOR, "Soft Armor" },
2333 {TV_SPIKE, "Spike" },
2334 {TV_DIGGING, "Digger" },
2335 {TV_JUNK, "Junk" },
2336 {0, NULL }
2342 * Objects sold in the stores, by tval/sval pair.
2344 const byte store_choices[MAX_STORES-2][STORE_CHOICES][2] =
2347 /* General Store */
2349 { 0, 0 },
2353 /* Armoury */
2355 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
2356 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
2357 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
2358 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
2359 { TV_HELM, SV_HARD_LEATHER_CAP },
2360 { TV_HELM, SV_HARD_LEATHER_CAP },
2361 { TV_HELM, SV_METAL_CAP },
2362 { TV_HELM, SV_IRON_HELM },
2364 { TV_SOFT_ARMOR, SV_ROBE },
2365 { TV_SOFT_ARMOR, SV_ROBE },
2366 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
2367 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
2368 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
2369 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
2370 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
2371 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
2373 { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL },
2374 { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL },
2375 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
2376 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
2377 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
2378 { TV_HARD_ARMOR, SV_AUGMENTED_CHAIN_MAIL },
2379 { TV_HARD_ARMOR, SV_BAR_CHAIN_MAIL },
2380 { TV_HARD_ARMOR, SV_DOUBLE_CHAIN_MAIL },
2382 { TV_HARD_ARMOR, SV_METAL_BRIGANDINE_ARMOUR },
2383 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
2384 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
2385 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
2386 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
2387 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
2388 { TV_SHIELD, SV_LARGE_LEATHER_SHIELD },
2389 { TV_SHIELD, SV_SMALL_METAL_SHIELD }
2393 /* Weaponsmith */
2395 { TV_SWORD, SV_DAGGER },
2396 { TV_SWORD, SV_MAIN_GAUCHE },
2397 { TV_SWORD, SV_RAPIER },
2398 { TV_SWORD, SV_SMALL_SWORD },
2399 { TV_SWORD, SV_SHORT_SWORD },
2400 { TV_SWORD, SV_SABRE },
2401 { TV_SWORD, SV_CUTLASS },
2402 { TV_SWORD, SV_TULWAR },
2404 { TV_SWORD, SV_BROAD_SWORD },
2405 { TV_SWORD, SV_LONG_SWORD },
2406 { TV_SWORD, SV_SCIMITAR },
2407 { TV_SWORD, SV_KATANA },
2408 { TV_SWORD, SV_BASTARD_SWORD },
2409 { TV_POLEARM, SV_SPEAR },
2410 { TV_POLEARM, SV_AWL_PIKE },
2411 { TV_POLEARM, SV_TRIDENT },
2413 { TV_POLEARM, SV_PIKE },
2414 { TV_POLEARM, SV_BEAKED_AXE },
2415 { TV_POLEARM, SV_BROAD_AXE },
2416 { TV_POLEARM, SV_LANCE },
2417 { TV_POLEARM, SV_BATTLE_AXE },
2418 { TV_HAFTED, SV_WHIP },
2419 { TV_BOW, SV_SLING },
2420 { TV_BOW, SV_SHORT_BOW },
2422 { TV_BOW, SV_LONG_BOW },
2423 { TV_BOW, SV_LIGHT_XBOW },
2424 { TV_SHOT, SV_AMMO_NORMAL },
2425 { TV_SHOT, SV_AMMO_NORMAL },
2426 { TV_ARROW, SV_AMMO_NORMAL },
2427 { TV_ARROW, SV_AMMO_NORMAL },
2428 { TV_BOLT, SV_AMMO_NORMAL },
2429 { TV_BOLT, SV_AMMO_NORMAL },
2433 /* Temple */
2435 { TV_HAFTED, SV_WHIP },
2436 { TV_HAFTED, SV_QUARTERSTAFF },
2437 { TV_HAFTED, SV_MACE },
2438 { TV_HAFTED, SV_MACE },
2439 { TV_HAFTED, SV_BALL_AND_CHAIN },
2440 { TV_HAFTED, SV_WAR_HAMMER },
2441 { TV_HAFTED, SV_LUCERN_HAMMER },
2442 { TV_HAFTED, SV_MORNING_STAR },
2444 { TV_HAFTED, SV_FLAIL },
2445 { TV_HAFTED, SV_FLAIL },
2446 { TV_HAFTED, SV_LEAD_FILLED_MACE },
2447 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
2448 { TV_SCROLL, SV_SCROLL_BLESSING },
2449 { TV_SCROLL, SV_SCROLL_HOLY_CHANT },
2450 { TV_POTION, SV_POTION_BOLDNESS },
2451 { TV_POTION, SV_POTION_HEROISM },
2453 { TV_POTION, SV_POTION_CURE_LIGHT },
2454 { TV_POTION, SV_POTION_CURE_SERIOUS },
2455 { TV_POTION, SV_POTION_CURE_SERIOUS },
2456 { TV_POTION, SV_POTION_CURE_CRITICAL },
2457 { TV_POTION, SV_POTION_CURE_CRITICAL },
2458 { TV_POTION, SV_POTION_RESTORE_EXP },
2459 { TV_POTION, SV_POTION_RESTORE_EXP },
2460 { TV_POTION, SV_POTION_RESTORE_EXP },
2462 { TV_PRAYER_BOOK, 0 },
2463 { TV_PRAYER_BOOK, 0 },
2464 { TV_PRAYER_BOOK, 0 },
2465 { TV_PRAYER_BOOK, 1 },
2466 { TV_PRAYER_BOOK, 1 },
2467 { TV_PRAYER_BOOK, 2 },
2468 { TV_PRAYER_BOOK, 2 },
2469 { TV_PRAYER_BOOK, 3 }
2473 /* Alchemy shop */
2475 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
2476 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
2477 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
2478 { TV_SCROLL, SV_SCROLL_IDENTIFY },
2479 { TV_SCROLL, SV_SCROLL_IDENTIFY },
2480 { TV_SCROLL, SV_SCROLL_IDENTIFY },
2481 { TV_SCROLL, SV_SCROLL_IDENTIFY },
2482 { TV_SCROLL, SV_SCROLL_LIGHT },
2484 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
2485 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
2486 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
2487 { TV_SCROLL, SV_SCROLL_MONSTER_CONFUSION },
2488 { TV_SCROLL, SV_SCROLL_MAPPING },
2489 { TV_SCROLL, SV_SCROLL_DETECT_GOLD },
2490 { TV_SCROLL, SV_SCROLL_DETECT_ITEM },
2491 { TV_SCROLL, SV_SCROLL_DETECT_TRAP },
2493 { TV_SCROLL, SV_SCROLL_DETECT_DOOR },
2494 { TV_SCROLL, SV_SCROLL_DETECT_INVIS },
2495 { TV_SCROLL, SV_SCROLL_RECHARGING },
2496 { TV_SCROLL, SV_SCROLL_SATISFY_HUNGER },
2497 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
2498 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
2499 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
2500 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
2502 { TV_POTION, SV_POTION_RESIST_HEAT },
2503 { TV_POTION, SV_POTION_RESIST_COLD },
2504 { TV_POTION, SV_POTION_RES_STR },
2505 { TV_POTION, SV_POTION_RES_INT },
2506 { TV_POTION, SV_POTION_RES_WIS },
2507 { TV_POTION, SV_POTION_RES_DEX },
2508 { TV_POTION, SV_POTION_RES_CON },
2509 { TV_POTION, SV_POTION_RES_CHR }
2513 /* Magic-User store */
2515 { TV_RING, SV_RING_SEARCHING },
2516 { TV_RING, SV_RING_FEATHER_FALL },
2517 { TV_RING, SV_RING_PROTECTION },
2518 { TV_AMULET, SV_AMULET_CHARISMA },
2519 { TV_AMULET, SV_AMULET_SLOW_DIGEST },
2520 { TV_AMULET, SV_AMULET_RESIST_ACID },
2521 { TV_WAND, SV_WAND_SLOW_MONSTER },
2522 { TV_WAND, SV_WAND_CONFUSE_MONSTER },
2524 { TV_WAND, SV_WAND_SLEEP_MONSTER },
2525 { TV_WAND, SV_WAND_MAGIC_MISSILE },
2526 { TV_WAND, SV_WAND_STINKING_CLOUD },
2527 { TV_WAND, SV_WAND_WONDER },
2528 { TV_STAFF, SV_STAFF_LITE },
2529 { TV_STAFF, SV_STAFF_MAPPING },
2530 { TV_STAFF, SV_STAFF_DETECT_TRAP },
2531 { TV_STAFF, SV_STAFF_DETECT_DOOR },
2533 { TV_STAFF, SV_STAFF_DETECT_GOLD },
2534 { TV_STAFF, SV_STAFF_DETECT_ITEM },
2535 { TV_STAFF, SV_STAFF_DETECT_INVIS },
2536 { TV_STAFF, SV_STAFF_DETECT_EVIL },
2537 { TV_STAFF, SV_STAFF_TELEPORTATION },
2538 { TV_STAFF, SV_STAFF_TELEPORTATION },
2539 { TV_STAFF, SV_STAFF_IDENTIFY },
2540 { TV_STAFF, SV_STAFF_IDENTIFY },
2542 { TV_MAGIC_BOOK, 0 },
2543 { TV_MAGIC_BOOK, 0 },
2544 { TV_MAGIC_BOOK, 0 },
2545 { TV_MAGIC_BOOK, 1 },
2546 { TV_MAGIC_BOOK, 1 },
2547 { TV_MAGIC_BOOK, 2 },
2548 { TV_MAGIC_BOOK, 2 },
2549 { TV_MAGIC_BOOK, 3 }