comparison xrogue/help.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 f54901b9c39b
comparison
equal deleted inserted replaced
124:d10fc4a065ac 133:e6179860cb76
1 /*
2 help.c - Routines having to do with help
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 <curses.h>
20 #include <ctype.h>
21 #include "mach_dep.h"
22 #include "rogue.h"
23
24 /*
25 * Give character descripts
26 */
27
28 static char *game_fighter = "Strength is the main attribute of the Fighter. \
29 He can wield any weapon and the two-handed sword is his weapon of choice. He \
30 can also wear any type of armor. Plate armor being the best choice and \
31 leather armor the worst. The Fighter is able to sense both traps and gold \
32 at higher experience levels. His natural quest item is the Axe of Aklad. \
33 Due to his superior form, the Fighter usually receives more hit-points per \
34 new experience level than the other characters. The Fighter is neither good \
35 or evil; he is a neutral character. The default attribute values of the \
36 Fighter are: Int=7, Str=16, Wis=7, Dxt=16, Con=17, and Chr=11. Default gold \
37 amount is 2000 pieces and default hit-points are 24.";
38
39 static char *game_thief = "Dexterity is the main attribute of the Thief. His \
40 stealth allows him to move quietly, thus disturbing less monsters. He can \
41 sense traps and gold and can take (steal) things from the monsters. The \
42 Thief can not wield the two-handed sword so the bastard sword is his weapon \
43 of choice. He can only wear studded leather armor. The Thief's natural \
44 quest item is the Daggers of Musty Doit. With higher dexterity the Thief \
45 is able to \"backstab\" monsters, thereby killing them with a single blow. \
46 His character type fluctuates between that of good, neutral, and evil. The \
47 default attribute values of the Thief are: Int=7, Str=14, Wis=7, Dxt=18, \
48 Con=17, and Chr=11. Default gold amount is 2000 pieces and default \
49 hit-points are 23.";
50
51 static char *game_assassin = "Dexterity is the main attribute of the \
52 Assassin. Like the Thief, he moves with an extra degree of stealth. He can \
53 sense gold and steal things from monsters. The ability to sense traps comes \
54 at higher experience levels. The Assassin can not wield the two-handed sword \
55 and he can only wear studded leather armor. The natural quest item of the \
56 Assassin is the Eye of Vecna. He is also skilled in the use of poison. \
57 Higher dexterity enables him to \"assassinate\" monsters with a single blow. \
58 The Assassin is aligned with the powers of evil. The default attribute \
59 values of the Assassin are: Int=7, Str=14, Wis=7, Dxt=18, Con=17, and \
60 Chr=11. Default gold amount is 2000 pieces and default hit-points are 23.";
61
62 static char *game_ranger = "Charisma is the main attribute of the Ranger who \
63 also has a secondary attribute of Intelligence. Like the Magician, this \
64 gives him the ability to cast spells which increases as he attains higher \
65 experience levels. Like the Fighter, he can wield any weapon and wear any \
66 armor. The Ranger's natural quest item is the Mandolin of Brian. He is \
67 aligned with the powers of good. Therefore, he can be made to suffer and \
68 even become cursed by the very powers that allow him to cast spells if he \
69 happens to cause the demise of a likewise good creature. The default \
70 attribute values of the Ranger are: Int=11, Str=11, Wis=7, Dxt=16, Con=16, \
71 and Chr=13. Default gold amount is 2000 pieces and default hit-points \
72 are 22.";
73
74 static char *game_paladin = "Charisma is the main attribute of the Paladin \
75 who has a secondary attribute of Wisdom. Like the Cleric, this gives him \
76 the ability to offer prayers, receive what his heart desires, and an ability \
77 to turn the undead. This ability will increase as he gains higher \
78 experience levels. Like the Fighter, he can wield any weapon and wear any \
79 armor. The Ankh of Heil is the Paladin's natural quest item. Like the \
80 Ranger, the Paladin is aligned with the powers of good. This can cause \
81 him to suffer and become cursed if he brings ruin to a likewise good \
82 creature. The default attribute values of the Paladin are: Int=7, \
83 Str=11, Wis=11, Dxt=16, Con=16, and Chr=13. Default gold amount is \
84 2000 pieces and default hit-points are 22.";
85
86 static char *game_druid = "Wisdom is the main attribute of the Druid. This \
87 gives him the ability to chant secret words and mantras, which is much \
88 greater than that of the Monk. The Druid can not wield the two-handed or \
89 bastard swords but he can wear any armor. His natural quest item is the Quill \
90 of Nagrom. Like the Magician and Cleric, the Druid is aligned neutral. He \
91 therefore, must rely upon his Wisdom and his chanting ability in order to \
92 remain alive. Likewise, he does not receive as many new hit-points per \
93 new experience level. The default attribute values of the Druid are: Int=7, \
94 Str=10, Wis=14, Dxt=16, Con=15, and Chr=12. Default gold amount is 2000 \
95 pieces and default hit-points are 21.";
96
97 static char *game_monk = "Constitution is the main attribute of the Monk who \
98 has a secondary aspect of Wisdom. Like the Druid, this gives him the \
99 ability to chant mantras which will increase as he gains higher experience. \
100 The Monk can not wield the two-handed sword and he can not wear any armor. \
101 The Cloak of Emori is the Monk's natural quest item. The Monk can also \
102 sense traps, though much less than the Thief or Assassin. He is the most \
103 healthy character. Like the Ranger and Paladin, he is aligned with the \
104 powers of good. Therefore, he is made to suffer and can become cursed if \
105 he kills a likewise good creature. The default attribute values of the \
106 Monk are: Int=7, Str=11, Wis=11, Dxt=16, Con=18, and Chr=11. Default \
107 gold amount is 2000 pieces and default hit-points are 22.";
108
109 static char *game_magician = "Intelligence is the main attribute of the \
110 Magician. The Magician's ability to cast spells is much greater than that \
111 of the Ranger. He can not wield the two- handed or bastard swords, but he \
112 can wear any kind of armor. His natural quest item is the Amulet of \
113 Stonebones. The Magician is aligned neutral. He must rely upon his \
114 Intelligence and spell casting abilities to remain alive. There- fore, he \
115 does not receive as many new hit-points per new experience level. The \
116 default attribute values of the Magician are: Int=14, Str=10, Wis=7, \
117 Dxt=16, Con=15, and Chr=12. Default gold amount is 2000 pieces and \
118 default hit-points are 21.";
119
120 static char *game_cleric = "Wisdom is the main attribute of the Cleric. The \
121 Cleric's ability to give or offer prayers, receive their due, and affect \
122 the undead are much greater than that of the Paladin. Like the Magician, \
123 the Cleric can not wield the two- handed or bastard swords, but he can \
124 wear any armor. His natural quest item is the Horn of Geryon. The Cleric \
125 is aligned neutral and he must rely upon his Wisdom and prayer ability to \
126 remain alive. He therefore, does not receive as many new hit-points per \
127 new experience level. The default attribute values of the Cleric are: Int=7, \
128 Str=10, Wis=14, Dxt=16, Con=15, and Chr=12. The default gold amount is 2000 \
129 pieces and default hit-points are 21.";
130
131
132 static char *game_food ="There are three types of food, regular food rations, \
133 various fruits, and slime- molds. Eating regular food will add 750 points to \
134 your current food level [see the CTRL(E) command]. Eating fruit adds \
135 300 points. Certain fruits also cure you, add an attribute point, add a \
136 hit-point, increase your armor, give you additional prayer, chant, or spell \
137 casting abilities, or add experience points. Eating slime-mold (monster \
138 food) can make you ill, but they will add 100 points to your current food \
139 level. If your food level points drop below 100 you will become weak. You \
140 will faint and might die if they drop to 0 or below. At the other extreme, \
141 if your food level points reach 2000 (and above) you will become satiated. \
142 Risk eating more and you could choke to death.";
143
144 /*
145 static char *game_monst ="To be updated.";
146 static char *game_potion ="To be updated...";
147 static char *game_scroll ="To be updated...";
148 static char *game_ring ="To be updated...";
149 static char *game_stick ="To be updated...";
150 static char *game_weapon ="To be updated...";
151 static char *game_armor ="To be updated...";
152 static char *game_miscm ="To be updated...";
153 static char *game_qitems ="To be updated...";
154 static char *game_dungeon ="To be updated...";
155 static char *game_traps ="To be updated...";
156 static char *game_mazes ="To be updated...";
157 static char *game_option ="To be updated...";
158 static char *game_begin ="To be updated...";
159 */
160
161 /* help list */
162 static struct h_list helpstr[] = {
163 '?', " Print help",
164 '/', " Identify object",
165 '=', " Identify a screen character",
166 ' ', "",
167 'h', " Move left",
168 'j', " Move down",
169 'k', " Move up",
170 'l', " Move right",
171 'y', " Move up and left",
172 'u', " Move up and right",
173 'b', " Move down and left",
174 'n', " Move down and right",
175 'H', " Run left",
176 'J', " Run down",
177 'K', " Run up",
178 'L', " Run right",
179 'Y', " Run up & left",
180 'U', " Run up & right",
181 'B', " Run down & left",
182 'N', " Run down & right",
183 ' ', "",
184 '>', " Go down a staircase",
185 '<', " Go up a staircase",
186 '\\', " Game descriptions",
187 '.', " Rest for a while",
188 '*', " Count gold pieces",
189 'a', " Affect the undead",
190 'A', " Choose artifact (equipage)",
191 'c', " Chant a mantra",
192 'C', " Cast a spell",
193 'd', " Drop something",
194 'D', " Dip something (into a pool)",
195 'e', " Eat food or fruit",
196 'f', "<dir> Forward until find something",
197 'F', " Frighten a monster",
198 'g', " Give food to monster",
199 'G', " Sense for gold",
200 'i', " Inventory",
201 'I', " Inventory (single item)",
202 'm', " Mark an object (specific)",
203 'o', " Examine and/or set options",
204 'O', " Character type and quest item",
205 'p', " Pray to the powers that be",
206 'P', " Pick up object(s)",
207 'q', " Quaff a potion",
208 'Q', " Quit the game",
209 'r', " Read a scroll",
210 's', " Search for a trap/secret door",
211 'S', " Save your game",
212 't', "<dir> Throw something",
213 'T', " Take off something",
214 'v', " Print program version",
215 'w', " Wield a weapon",
216 'W', " Wear something",
217 'X', " Sense for traps",
218 'z', "<dir> Zap a wand or staff",
219 ' ', "",
220 '^', " Set a trap",
221 '$', " Price an item (trading post)",
222 '#', " Buy an item (trading post)",
223 '%', " Sell an item (trading post)",
224 '!', " Shell escape",
225 ESC, " Cancel command (Esc)",
226 ' ', "",
227 CTRL('B'), " Current score (if you win)",
228 CTRL('E'), " Current food level",
229 CTRL('L'), " Redraw the screen",
230 CTRL('N'), " Name an object or a monster",
231 CTRL('O'), " Character affect status",
232 CTRL('R'), " Repeat last message",
233 CTRL('T'), "<dir> Take (steal) from (direction)",
234 CTRL('U'), " Use a magic item",
235 0, 0
236 } ;
237
238 /* wizard help list */
239 static struct h_list wiz_help[] = {
240 ' ', "",
241 '+', " Random fortunes",
242 'M', " Make an object",
243 'V', " Display vlevel and turns",
244 CTRL('A'), " System activity",
245 CTRL('C'), " Move to another dungeon level",
246 CTRL('D'), " Go down 1 dungeon level",
247 CTRL('F'), " Display the entire level",
248 CTRL('G'), " Charge wands and staffs",
249 CTRL('H'), " Jump 9 experience levels",
250 CTRL('I'), " Inventory of level",
251 CTRL('J'), " Teleport somewhere",
252 CTRL('K'), " Identify an object",
253 CTRL('M'), " Recharge wand or staff",
254 CTRL('P'), " Toggle wizard status",
255 CTRL('X'), " Detect monsters",
256 CTRL('Y'), " Display food levels",
257 0, 0
258 };
259
260 /* item help list */
261 static struct item_list item_help[] = {
262 '@', " You (visible)",
263 '_', " You (invisible)",
264 ' ', "",
265 ':', " Food ration or fruit (eat)",
266 '!', " Potion (quaff)",
267 '?', " Scroll (read)",
268 '=', " Ring (wear)",
269 ')', " Weapon (wield)",
270 ']', " Armor (wear)",
271 '/', " Wand or staff (zap)",
272 ';', " Magic item (use)",
273 ',', " Artifact (quest item)",
274 '*', " Gold or zapped missile",
275 ' ', "",
276 '$', " Magical item in room",
277 '>', " Blessed magical item",
278 '<', " Cursed magical item",
279 ' ', " ",
280 '`', " Dart trap",
281 '{', " Arrow trap",
282 '}', " Bear trap",
283 '~', " Teleport trap",
284 '$', " Sleeping gas trap",
285 '>', " Trap door",
286 '<', " Outer region entrance",
287 '\'', " Maze entrance",
288 '^', " Trading post entrance",
289 '"', " Magic pool or lake",
290 ' ', " Solid rock or mountain",
291 '.', " Floor of a room or meadow",
292 '%', " Stairs (up or down)",
293 '+', " Doorway",
294 '&', " Secret doorway",
295 '#', " Passage between rooms",
296 '\\', " Forest",
297 HORZWALL, " Horizontal wall of a room",
298 VERTWALL, " Vertical wall of a room",
299 0, 0
300 };
301
302 ident_hero()
303 {
304 bool doit = TRUE;
305
306 wclear(hw);
307 wprintw(hw, "Characters, Items, and Game Descriptions:\n");
308 wprintw(hw, "-----------------------------------------\n");
309 wprintw(hw, "a) Fighter m) Scrolls\n");
310 wprintw(hw, "b) Thief n) Rings\n");
311 wprintw(hw, "c) Assassin o) Wands and Staffs\n");
312 wprintw(hw, "d) Ranger p) Weapons\n");
313 wprintw(hw, "e) Paladin q) Armors\n");
314 wprintw(hw, "f) Monk r) Miscellaneous Magic Items\n");
315 wprintw(hw, "g) Magician s) Quest Items (Artifacts and Relics)\n");
316 wprintw(hw, "h) Cleric t) The Dungeon\n");
317 wprintw(hw, "i) Druid u) Traps\n");
318 wprintw(hw, "j) Monsters v) Mazes and Outer Regions\n");
319 wprintw(hw, "k) Foods w) Setting game options\n");
320 wprintw(hw, "l) Potions x) Starting out\n");
321 wprintw(hw, "\nEnter a letter: ");
322 draw(hw);
323 while (doit) {
324 switch (wgetch(cw)) {
325 case EOF:
326 case ESC:
327 doit = FALSE;
328 when 'a':
329 wclear(hw);
330 wprintw(hw, "Fighter Characteristics:");
331 mvwaddstr(hw, 2, 0, game_fighter);
332 draw(hw);
333 doit = FALSE;
334 when 'b':
335 wclear(hw);
336 wprintw(hw, "Thief Characteristics:");
337 mvwaddstr(hw, 2, 0, game_thief);
338 draw(hw);
339 doit = FALSE;
340 when 'c':
341 wclear(hw);
342 wprintw(hw, "Assassin Characteristics:");
343 mvwaddstr(hw, 2, 0, game_assassin);
344 draw(hw);
345 doit = FALSE;
346 when 'd':
347 wclear(hw);
348 wprintw(hw, "Ranger Characteristics:");
349 mvwaddstr(hw, 2, 0, game_ranger);
350 draw(hw);
351 doit = FALSE;
352 when 'e':
353 wclear(hw);
354 wprintw(hw, "Paladin Characteristics:");
355 mvwaddstr(hw, 2, 0, game_paladin);
356 draw(hw);
357 doit = FALSE;
358 when 'f':
359 wclear(hw);
360 wprintw(hw, "Monk Characteristics:");
361 mvwaddstr(hw, 2, 0, game_monk);
362 draw(hw);
363 doit = FALSE;
364 when 'g':
365 wclear(hw);
366 wprintw(hw, "Magician Characteristics:");
367 mvwaddstr(hw, 2, 0, game_magician);
368 draw(hw);
369 doit = FALSE;
370 when 'h':
371 wclear(hw);
372 wprintw(hw, "Cleric Characteristics:");
373 mvwaddstr(hw, 2, 0, game_cleric);
374 draw(hw);
375 doit = FALSE;
376 when 'i':
377 wclear(hw);
378 wprintw(hw, "Druid Characteristics:");
379 mvwaddstr(hw, 2, 0, game_druid);
380 draw(hw);
381 doit = FALSE;
382 when 'j':
383 wclear(hw);
384 wprintw(hw, "Monster Characteristics:");
385 draw(hw);
386 doit = FALSE;
387 when 'k':
388 wclear(hw);
389 wprintw(hw, "Foods:");
390 mvwaddstr(hw, 2, 0, game_food);
391 draw(hw);
392 doit = FALSE;
393 when 'l':
394 wclear(hw);
395 wprintw(hw, "Potions:");
396 draw(hw);
397 doit = FALSE;
398 when 'm':
399 wclear(hw);
400 wprintw(hw, "Scrolls:");
401 draw(hw);
402 doit = FALSE;
403 when 'n':
404 wclear(hw);
405 wprintw(hw, "Rings:");
406 draw(hw);
407 doit = FALSE;
408 when 'o':
409 wclear(hw);
410 wprintw(hw, "Wands and Staffs:");
411 draw(hw);
412 doit = FALSE;
413 when 'p':
414 wclear(hw);
415 wprintw(hw, "Weapons:");
416 draw(hw);
417 doit = FALSE;
418 when 'q':
419 wclear(hw);
420 wprintw(hw, "Armors:");
421 draw(hw);
422 doit = FALSE;
423 when 'r':
424 wclear(hw);
425 wprintw(hw, "Miscellaneous Magic Items:");
426 draw(hw);
427 doit = FALSE;
428 when 's':
429 wclear(hw);
430 wprintw(hw, "Quest Items (Artifacts and Relics):");
431 draw(hw);
432 doit = FALSE;
433 when 't':
434 wclear(hw);
435 wprintw(hw, "The Dungeon:");
436 draw(hw);
437 doit = FALSE;
438 when 'u':
439 wclear(hw);
440 wprintw(hw, "Traps:");
441 draw(hw);
442 doit = FALSE;
443 when 'v':
444 wclear(hw);
445 wprintw(hw, "Mazes and Outer Regions:");
446 draw(hw);
447 doit = FALSE;
448 when 'w':
449 wclear(hw);
450 wprintw(hw, "Setting game options:");
451 draw(hw);
452 doit = FALSE;
453 when 'x':
454 wclear(hw);
455 wprintw(hw, "Starting out:");
456 draw(hw);
457 doit = FALSE;
458 otherwise:
459 doit = TRUE;
460 }
461 }
462 wmove(hw, lines-1, 0);
463 wprintw(hw, spacemsg);
464 draw(hw);
465 wait_for(' ');
466 wclear(hw);
467 draw(hw);
468 wmove(cw, 0, 0);
469 wclrtoeol(cw);
470 status(FALSE);
471 touchwin(cw);
472 }
473
474 /*
475 * Real Help
476 */
477
478 help()
479 {
480 register struct h_list *strp = helpstr;
481 register struct item_list *itemp = item_help;
482 struct h_list *wizp = wiz_help;
483 register char helpch;
484 register int cnt;
485
486 msg("Character you want help for (* for commands, @ for items): ");
487 helpch = wgetch(cw);
488 mpos = 0;
489 /*
490 * If it's not a *, @, or +, then just print help string
491 * for the character entered.
492 */
493 if (helpch != '*' && helpch != '@' && helpch != '+') {
494 wmove(msgw, 0, 0);
495 while (strp->h_ch) {
496 if (strp->h_ch == helpch) {
497 msg("%s%s", unctrl(strp->h_ch), strp->h_desc);
498 return;
499 }
500 strp++;
501 }
502 if (wizard) {
503 while (wizp->h_ch) {
504 if (wizp->h_ch == helpch) {
505 msg("%s%s", unctrl(wizp->h_ch), wizp->h_desc);
506 return;
507 }
508 wizp++;
509 }
510 }
511 msg("Unknown command '%s'", unctrl(helpch));
512 return;
513 }
514
515 /* fortunes - but let's not say so - explicitly */
516 if (helpch == '+') {
517 msg("Meaningless command '+'");
518 return;
519 }
520
521 /*
522 * Print help for everything else
523 */
524 if (helpch == '*') {
525 wclear(hw);
526 cnt = 0;
527 while (strp->h_ch) {
528 mvwaddstr(hw, cnt % 23, cnt > 22 ? 40 : 0, unctrl(strp->h_ch));
529 waddstr(hw, strp->h_desc);
530 strp++;
531 if (++cnt >= 46 && strp->h_ch) {
532 wmove(hw, lines-1, 0);
533 wprintw(hw, morestr);
534 draw(hw);
535 wait_for(' ');
536 wclear(hw);
537 cnt = 0;
538 }
539 }
540 if (wizard) {
541 while (wizp->h_ch) {
542 mvwaddstr(hw, cnt % 23, cnt > 22 ? 40 : 0, unctrl(wizp->h_ch));
543 waddstr(hw, wizp->h_desc);
544 wizp++;
545 if (++cnt >= 46 && wizp->h_ch) {
546 wmove(hw, lines-1, 0);
547 wprintw(hw, morestr);
548 draw(hw);
549 wait_for(' ');
550 wclear(hw);
551 cnt = 0;
552 }
553 }
554 }
555 }
556 if (helpch == '@') {
557 wclear(hw);
558 cnt = 0;
559 while (itemp->item_ch) {
560 mvwaddstr(hw, cnt % 23, cnt > 22 ? 40 : 0, unctrl(itemp->item_ch));
561 waddstr(hw, itemp->item_desc);
562 itemp++;
563 if (++cnt >= 46 && itemp->item_ch) {
564 wmove(hw, lines-1, 0);
565 wprintw(hw, morestr);
566 draw(hw);
567 wait_for(' ');
568 wclear(hw);
569 cnt = 0;
570 }
571 }
572 }
573 wmove(hw, lines-1, 0);
574 wprintw(hw, spacemsg);
575 draw(hw);
576 wait_for(' ');
577 wclear(hw);
578 draw(hw);
579 wmove(cw, 0, 0);
580 wclrtoeol(cw);
581 status(FALSE);
582 touchwin(cw);
583 }
584
585 /*
586 * identify:
587 * Tell the player what a certain thing is.
588 */
589
590 identify(ch)
591 register unsigned char ch;
592 {
593 register char *str = NULL;
594
595 if (ch == 0) {
596 msg("What do you want identified? ");
597 ch = wgetch(cw);
598 mpos = 0;
599 if (ch == ESC)
600 {
601 msg("");
602 return;
603 }
604 }
605 if (isalpha(ch))
606 msg("Use the \"=\" command to identify monsters. ");
607 else switch(ch)
608 {
609 case VPLAYER: str = "You (visibly)";
610 when IPLAYER: str = "You (invisibly)";
611 when GOLD: str = "Gold";
612 when STAIRS: str = (levtype == OUTSIDE) ? "Entrance to the dungeon"
613 : "Stairway";
614 when DOOR: str = "Doorway";
615 when SECRETDOOR:str = "Secret door";
616 when FLOOR: str = (levtype == OUTSIDE) ? "Meadow" : "Room floor";
617 when PASSAGE: str = "Passage";
618 when VERTWALL:
619 case HORZWALL:
620 str = (levtype == OUTSIDE) ? "Boundary of sector"
621 : "Wall of a room";
622 when POST: str = "Trading post";
623 when POOL: str = (levtype == OUTSIDE) ? "Lake"
624 : "A shimmering pool";
625 when TRAPDOOR: str = "Trap door";
626 when ARROWTRAP: str = "Arrow trap";
627 when SLEEPTRAP: str = "Sleeping gas trap";
628 when BEARTRAP: str = "Bear trap";
629 when TELTRAP: str = "Teleport trap";
630 when DARTTRAP: str = "Dart trap";
631 when MAZETRAP: str = "Entrance to a maze";
632 when WORMHOLE: str = "Entrance to a worm hole";
633 when FOREST: str = "Forest";
634 when ' ' : str = (levtype == OUTSIDE) ? "Mountain"
635 : "Solid rock";
636 when FOOD: str = "Food";
637 when POTION: str = "Potion";
638 when SCROLL: str = "Scroll";
639 when RING: str = "Ring";
640 when WEAPON: str = "Weapon";
641 when ARMOR: str = "Armor";
642 when MM: str = "Miscellaneous magic";
643 when STICK: str = "Wand or staff";
644 when RELIC: str = "Artifact";
645 otherwise: str = "Unknown character";
646 }
647 if (!isalpha(ch))
648 msg("%s %s", unctrl(ch), str);
649 }
650
651