Mercurial > hg > early-roguelike
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 |