xref: /netbsd-src/games/battlestar/command5.c (revision 1182a44c59cae4d586117d55eca24b4b8b173211)
1*1182a44cSrillig /*	$NetBSD: command5.c,v 1.6 2021/05/02 12:50:43 rillig Exp $	*/
2cd5f83cbStv 
3cd5f83cbStv /*
4cd5f83cbStv  * Copyright (c) 1983, 1993
5cd5f83cbStv  *	The Regents of the University of California.  All rights reserved.
6cd5f83cbStv  *
7cd5f83cbStv  * Redistribution and use in source and binary forms, with or without
8cd5f83cbStv  * modification, are permitted provided that the following conditions
9cd5f83cbStv  * are met:
10cd5f83cbStv  * 1. Redistributions of source code must retain the above copyright
11cd5f83cbStv  *    notice, this list of conditions and the following disclaimer.
12cd5f83cbStv  * 2. Redistributions in binary form must reproduce the above copyright
13cd5f83cbStv  *    notice, this list of conditions and the following disclaimer in the
14cd5f83cbStv  *    documentation and/or other materials provided with the distribution.
15e5aeb4eaSagc  * 3. Neither the name of the University nor the names of its contributors
16cd5f83cbStv  *    may be used to endorse or promote products derived from this software
17cd5f83cbStv  *    without specific prior written permission.
18cd5f83cbStv  *
19cd5f83cbStv  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20cd5f83cbStv  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21cd5f83cbStv  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22cd5f83cbStv  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23cd5f83cbStv  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24cd5f83cbStv  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25cd5f83cbStv  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26cd5f83cbStv  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27cd5f83cbStv  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28cd5f83cbStv  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29cd5f83cbStv  * SUCH DAMAGE.
30cd5f83cbStv  */
31cd5f83cbStv 
32cd5f83cbStv #include <sys/cdefs.h>
33cd5f83cbStv #ifndef lint
34cd5f83cbStv #if 0
35cd5f83cbStv static char sccsid[] = "@(#)com5.c	8.2 (Berkeley) 4/28/95";
36cd5f83cbStv #else
37*1182a44cSrillig __RCSID("$NetBSD: command5.c,v 1.6 2021/05/02 12:50:43 rillig Exp $");
38cd5f83cbStv #endif
39cd5f83cbStv #endif				/* not lint */
40cd5f83cbStv 
41cd5f83cbStv #include "extern.h"
42cd5f83cbStv 
43cd5f83cbStv void
kiss(void)44277bd075Sdholland kiss(void)
45cd5f83cbStv {
46cd5f83cbStv 	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount)
47cd5f83cbStv 		continue;
48cd5f83cbStv 	/* The goddess must be "taken" first if bathing. */
49cd5f83cbStv 	if (wordtype[wordnumber] == NOUNS && wordvalue[wordnumber] == NORMGOD
50cd5f83cbStv 	    && testbit(location[position].objects, BATHGOD)) {
51cd5f83cbStv 		wordvalue[--wordnumber] = TAKE;
52cd5f83cbStv 		cypher();
53cd5f83cbStv 		return;
54cd5f83cbStv 	}
55cd5f83cbStv 	if (wordtype[wordnumber] == NOUNS) {
56bd6068f4Sjmc 		if (testbit(location[position].objects,
57bd6068f4Sjmc 		    wordvalue[wordnumber])) {
58cd5f83cbStv 			pleasure++;
59cd5f83cbStv 			printf("Kissed.\n");
60cd5f83cbStv 			switch (wordvalue[wordnumber]) {
61cd5f83cbStv 			case NORMGOD:
62cd5f83cbStv 				switch (godready++) {
63cd5f83cbStv 				case 0:
64bd6068f4Sjmc 					printf("She squirms and avoids your ");
65bd6068f4Sjmc 					puts("advances.");
66cd5f83cbStv 					break;
67cd5f83cbStv 				case 1:
68bd6068f4Sjmc 					puts("She is coming around; she ");
69bd6068f4Sjmc 					puts("didn't fight it as much.");
70cd5f83cbStv 					break;
71cd5f83cbStv 				case 2:
72cd5f83cbStv 					puts("She's beginning to like it.");
73cd5f83cbStv 					break;
74cd5f83cbStv 				default:
75cd5f83cbStv 					puts("She's gone limp.");
76cd5f83cbStv 
77cd5f83cbStv 				}
78cd5f83cbStv 				break;
79cd5f83cbStv 			case NATIVE:
80bd6068f4Sjmc 				printf("Her lips are warm and her body ");
81bd6068f4Sjmc 				printf("robust.  She pulls you down to ");
82bd6068f4Sjmc 				puts("the ground.");
83cd5f83cbStv 				break;
84cd5f83cbStv 			case TIMER:
85cd5f83cbStv 				puts("The old man blushes.");
86cd5f83cbStv 				break;
87cd5f83cbStv 			case MAN:
88cd5f83cbStv 				puts("The dwarf punches you in the kneecap.");
89cd5f83cbStv 				break;
90cd5f83cbStv 			default:
91cd5f83cbStv 				pleasure--;
92cd5f83cbStv 			}
93cd5f83cbStv 		} else
94cd5f83cbStv 			puts("I see nothing like that here.");
95cd5f83cbStv 	} else
96cd5f83cbStv 		puts("I'd prefer not to.");
97cd5f83cbStv }
98cd5f83cbStv 
99cd5f83cbStv void
love(void)100bd6068f4Sjmc love(void)
101cd5f83cbStv {
102cd5f83cbStv 	int     n;
103cd5f83cbStv 
104cd5f83cbStv 	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount)
105cd5f83cbStv 		continue;
106cd5f83cbStv 	if (wordtype[wordnumber] == NOUNS) {
107cd5f83cbStv 		if ((testbit(location[position].objects, BATHGOD) ||
108cd5f83cbStv 		    testbit(location[position].objects, NORMGOD)) &&
109cd5f83cbStv 		    wordvalue[wordnumber] == NORMGOD) {
110cd5f83cbStv 			if (loved) {
111cd5f83cbStv 				printf("Loved.\n");
112cd5f83cbStv 				return;
113cd5f83cbStv 			}
114cd5f83cbStv 			if (godready >= 2) {
115bd6068f4Sjmc 				printf("She cuddles up to you, and her mouth ");
116bd6068f4Sjmc 				printf("starts to work:\n'That was my ");
117bd6068f4Sjmc 				printf("sister's amulet.  The lovely ");
118bd6068f4Sjmc 				printf("goddess, Purl, was she.  The Empire\n");
119bd6068f4Sjmc 				printf("captured her just after the Darkness ");
120bd6068f4Sjmc 				printf("came.  My other sister, Vert, was ");
121bd6068f4Sjmc 				printf("killed\nby the Dark Lord himself.  ");
122bd6068f4Sjmc 				printf("He took her amulet and warped its ");
123bd6068f4Sjmc 				printf("power.\nYour quest was foretold by ");
124bd6068f4Sjmc 				printf("my father before he died, but to get ");
125bd6068f4Sjmc 				printf("the Dark Lord's\namulet you must use ");
126bd6068f4Sjmc 				printf("cunning and skill.  I will leave you ");
127bd6068f4Sjmc 				puts("my amulet,");
128bd6068f4Sjmc 				printf("which you may use as you wish.  As ");
129bd6068f4Sjmc 				printf("for me, I am the last goddess of ");
130bd6068f4Sjmc 				printf("the\nwaters.  My father was the ");
131bd6068f4Sjmc 				printf("Island King, and the rule is ");
132bd6068f4Sjmc 				printf("rightfully mine.'\n\nShe pulls the ");
133bd6068f4Sjmc 				puts("throne out into a large bed.");
134cd5f83cbStv 				power++;
135cd5f83cbStv 				pleasure += 15;
136cd5f83cbStv 				ego++;
137cd5f83cbStv 				if (card(injuries, NUMOFINJURIES)) {
138bd6068f4Sjmc 					printf("Her kisses revive you; your ");
139bd6068f4Sjmc 					printf("wounds are healed.\n");
140cd5f83cbStv 					for (n = 0; n < NUMOFINJURIES; n++)
141cd5f83cbStv 						injuries[n] = 0;
142cd5f83cbStv 					WEIGHT = MAXWEIGHT;
143cd5f83cbStv 					CUMBER = MAXCUMBER;
144cd5f83cbStv 				}
145cd5f83cbStv 				printf("Goddess:\n");
146cd5f83cbStv 				if (!loved)
147bd6068f4Sjmc 					setbit(location[position].objects,
148bd6068f4Sjmc 					    MEDALION);
149cd5f83cbStv 				loved = 1;
150cd5f83cbStv 				ourtime += 10;
151cd5f83cbStv 				printf("Loved.\n");
152cd5f83cbStv 				zzz();
153cd5f83cbStv 				return;
154cd5f83cbStv 			} else {
155cd5f83cbStv 				puts("You wish!");
156cd5f83cbStv 				return;
157cd5f83cbStv 			}
158cd5f83cbStv 		}
159bd6068f4Sjmc 		if (testbit(location[position].objects,
160bd6068f4Sjmc 		    wordvalue[wordnumber])) {
161cd5f83cbStv 			if (wordvalue[wordnumber] == NATIVE) {
162bd6068f4Sjmc 				printf("The girl is easy prey.  She peels ");
163bd6068f4Sjmc 				puts("off her sarong and indulges you.");
164cd5f83cbStv 				power++;
165cd5f83cbStv 				pleasure += 5;
166cd5f83cbStv 				printf("Girl:\n");
167cd5f83cbStv 				ourtime += 10;
168cd5f83cbStv 				printf("Loved.\n");
169cd5f83cbStv 				zzz();
170cd5f83cbStv 			}
171cd5f83cbStv 			if (wordvalue[wordnumber] == MAN ||
172cd5f83cbStv 			    wordvalue[wordnumber] == BODY ||
173cd5f83cbStv 			    wordvalue[wordnumber] == ELF ||
174cd5f83cbStv 			    wordvalue[wordnumber] == TIMER)
175cd5f83cbStv 				puts("Kinky!");
176cd5f83cbStv 			else
177cd5f83cbStv 				puts("It doesn't seem to work.");
178cd5f83cbStv 		} else
179cd5f83cbStv 			puts("Where's your lover?");
180cd5f83cbStv 	} else
181cd5f83cbStv 		puts("It doesn't seem to work.");
182cd5f83cbStv }
183cd5f83cbStv 
184cd5f83cbStv int
zzz(void)185bd6068f4Sjmc zzz(void)
186cd5f83cbStv {
187cd5f83cbStv 	int     oldtime;
188cd5f83cbStv 	int     n;
189ffe2e1f5Sdholland 	int zzztime;
190ffe2e1f5Sdholland 
191ffe2e1f5Sdholland 	zzztime = (3 * CYCLE) / 4;
192cd5f83cbStv 
193cd5f83cbStv 	oldtime = ourtime;
194ffe2e1f5Sdholland 	if ((snooze - ourtime) < zzztime) {
195ffe2e1f5Sdholland 		ourtime += zzztime - (snooze - ourtime);
196cd5f83cbStv 		printf("<zzz>");
197cd5f83cbStv 		for (n = 0; n < ourtime - oldtime; n++)
198cd5f83cbStv 			printf(".");
199cd5f83cbStv 		printf("\n");
200cd5f83cbStv 		snooze += 3 * (ourtime - oldtime);
201cd5f83cbStv 		if (notes[LAUNCHED]) {
202cd5f83cbStv 			fuel -= (ourtime - oldtime);
203cd5f83cbStv 			if (location[position].down) {
204cd5f83cbStv 				position = location[position].down;
205cd5f83cbStv 				crash();
206cd5f83cbStv 			} else
207cd5f83cbStv 				notes[LAUNCHED] = 0;
208cd5f83cbStv 		}
209cd5f83cbStv 		if (OUTSIDE && rnd(100) < 50) {
210bd6068f4Sjmc 			printf("You are awakened abruptly by the sound ");
211bd6068f4Sjmc 			puts("of someone nearby.");
212cd5f83cbStv 			switch (rnd(4)) {
213cd5f83cbStv 			case 0:
214cd5f83cbStv 				if (ucard(inven)) {
215cd5f83cbStv 					n = rnd(NUMOFOBJECTS);
216cd5f83cbStv 					while (!testbit(inven, n))
217cd5f83cbStv 						n = rnd(NUMOFOBJECTS);
218cd5f83cbStv 					clearbit(inven, n);
219bd6068f4Sjmc 					if (n != AMULET && n != MEDALION &&
220bd6068f4Sjmc 					    n != TALISMAN)
221bd6068f4Sjmc 						setbit(
222bd6068f4Sjmc 						    location[position].objects,
223bd6068f4Sjmc 						    n);
224cd5f83cbStv 					carrying -= objwt[n];
225cd5f83cbStv 					encumber -= objcumber[n];
226cd5f83cbStv 				}
227bd6068f4Sjmc 				printf("A fiendish little Elf is stealing ");
228bd6068f4Sjmc 				puts("your treasures!");
229cd5f83cbStv 				fight(ELF, 10);
230cd5f83cbStv 				break;
231cd5f83cbStv 			case 1:
232cd5f83cbStv 				setbit(location[position].objects, DEADWOOD);
233cd5f83cbStv 				break;
234cd5f83cbStv 			case 2:
235cd5f83cbStv 				setbit(location[position].objects, HALBERD);
236cd5f83cbStv 				break;
237cd5f83cbStv 			default:
238cd5f83cbStv 				break;
239cd5f83cbStv 			}
240cd5f83cbStv 		}
241cd5f83cbStv 	} else
242cd5f83cbStv 		return (0);
243cd5f83cbStv 	return (1);
244cd5f83cbStv }
245cd5f83cbStv 
246cd5f83cbStv void
chime(void)247bd6068f4Sjmc chime(void)
248cd5f83cbStv {
249cd5f83cbStv 	if ((ourtime / CYCLE + 1) % 2 && OUTSIDE)
250cd5f83cbStv 		switch ((ourtime % CYCLE) / (CYCLE / 7)) {
251cd5f83cbStv 		case 0:
252cd5f83cbStv 			puts("It is just after sunrise.");
253cd5f83cbStv 			break;
254cd5f83cbStv 		case 1:
255cd5f83cbStv 			puts("It is early morning.");
256cd5f83cbStv 			break;
257cd5f83cbStv 		case 2:
258cd5f83cbStv 			puts("It is late morning.");
259cd5f83cbStv 			break;
260cd5f83cbStv 		case 3:
261cd5f83cbStv 			puts("It is near noon.");
262cd5f83cbStv 			break;
263cd5f83cbStv 		case 4:
264cd5f83cbStv 			puts("It is early afternoon.");
265cd5f83cbStv 			break;
266cd5f83cbStv 		case 5:
267cd5f83cbStv 			puts("It is late afternoon.");
268cd5f83cbStv 			break;
269cd5f83cbStv 		case 6:
270cd5f83cbStv 			puts("It is near sunset.");
271cd5f83cbStv 			break;
272cd5f83cbStv 		}
273cd5f83cbStv 	else if (OUTSIDE)
274cd5f83cbStv 		switch ((ourtime % CYCLE) / (CYCLE / 7)) {
275cd5f83cbStv 		case 0:
276cd5f83cbStv 			puts("It is just after sunset.");
277cd5f83cbStv 			break;
278cd5f83cbStv 		case 1:
279cd5f83cbStv 			puts("It is early evening.");
280cd5f83cbStv 			break;
281cd5f83cbStv 		case 2:
282cd5f83cbStv 			puts("The evening is getting old.");
283cd5f83cbStv 			break;
284cd5f83cbStv 		case 3:
285cd5f83cbStv 			puts("It is near midnight.");
286cd5f83cbStv 			break;
287cd5f83cbStv 		case 4:
288cd5f83cbStv 			puts("These are the wee hours of the morning.");
289cd5f83cbStv 			break;
290cd5f83cbStv 		case 5:
291cd5f83cbStv 			puts("The night is waning.");
292cd5f83cbStv 			break;
293cd5f83cbStv 		case 6:
294cd5f83cbStv 			puts("It is almost morning.");
295cd5f83cbStv 			break;
296cd5f83cbStv 		}
297cd5f83cbStv 	else
298cd5f83cbStv 		puts("I can't tell the time in here.");
299cd5f83cbStv }
300cd5f83cbStv 
301cd5f83cbStv int
give(void)302bd6068f4Sjmc give(void)
303cd5f83cbStv {
304cd5f83cbStv 	int     obj = -1, result = -1, person = 0, firstnumber, last1, last2;
305cd5f83cbStv 
306cd5f83cbStv 	last1 = last2 = 0;
307cd5f83cbStv 	firstnumber = wordnumber;
308bd6068f4Sjmc 	while (wordtype[++wordnumber] != OBJECT &&
309bd6068f4Sjmc 	    wordvalue[wordnumber] != AMULET &&
310bd6068f4Sjmc 	    wordvalue[wordnumber] != MEDALION &&
311bd6068f4Sjmc 	    wordvalue[wordnumber] != TALISMAN && wordnumber <= wordcount)
312cd5f83cbStv 		continue;
313cd5f83cbStv 	if (wordnumber <= wordcount) {
314cd5f83cbStv 		obj = wordvalue[wordnumber];
315cd5f83cbStv 		if (obj == EVERYTHING)
316cd5f83cbStv 			wordtype[wordnumber] = -1;
317cd5f83cbStv 		last1 = wordnumber;
318cd5f83cbStv 	}
319cd5f83cbStv 	wordnumber = firstnumber;
320bd6068f4Sjmc 	while ((wordtype[++wordnumber] != NOUNS ||
321bd6068f4Sjmc 	    wordvalue[wordnumber] == obj) && wordnumber <= wordcount);
322cd5f83cbStv 	if (wordtype[wordnumber] == NOUNS) {
323cd5f83cbStv 		person = wordvalue[wordnumber];
324cd5f83cbStv 		last2 = wordnumber;
325cd5f83cbStv 	}
326cd5f83cbStv 	/* Setting wordnumber to last1 - 1 looks wrong if last1 is 0, e.g.,
327cd5f83cbStv 	 * plain `give'.  However, detecting this case is liable to detect
328cd5f83cbStv 	 * `give foo' as well, which would give a confusing error.  We
329cd5f83cbStv 	 * need to make sure the -1 value can cause no problems if it arises.
330cd5f83cbStv 	 * If in the below we get to the drop("Given") then drop will look
331cd5f83cbStv 	 * at word 0 for an object to give, and fail, which is OK; then
332cd5f83cbStv 	 * result will be -1 and we get to the end, where wordnumber gets
333cd5f83cbStv 	 * set to something more sensible.  If we get to "I don't think
334cd5f83cbStv 	 * that is possible" then again wordnumber is set to something
335cd5f83cbStv 	 * sensible.  The wordnumber we leave with still isn't right if
336cd5f83cbStv 	 * you include words the game doesn't know in your command, but
337cd5f83cbStv 	 * that's no worse than what other commands than give do in
338cd5f83cbStv 	 * the same place.  */
339cd5f83cbStv 	wordnumber = last1 - 1;
340cd5f83cbStv 	if (person && testbit(location[position].objects, person)) {
341bd6068f4Sjmc 		if (person == NORMGOD && godready < 2 &&
342bd6068f4Sjmc 		    !(obj == RING || obj == BRACELET))
343cd5f83cbStv 			puts("The goddess won't look at you.");
344cd5f83cbStv 		else
345cd5f83cbStv 			result = drop("Given");
346cd5f83cbStv 	} else {
347cd5f83cbStv 		puts("I don't think that is possible.");
348cd5f83cbStv 		wordnumber = max(last1, last2) + 1;
349cd5f83cbStv 		return (0);
350cd5f83cbStv 	}
351bd6068f4Sjmc 	if (result != -1 && (testbit(location[position].objects, obj) ||
352bd6068f4Sjmc 	    obj == AMULET || obj == MEDALION || obj == TALISMAN)) {
353cd5f83cbStv 		clearbit(location[position].objects, obj);
354cd5f83cbStv 		ourtime++;
355cd5f83cbStv 		ego++;
356cd5f83cbStv 		switch (person) {
357cd5f83cbStv 		case NATIVE:
358cd5f83cbStv 			puts("She accepts it shyly.");
359cd5f83cbStv 			ego += 2;
360cd5f83cbStv 			break;
361cd5f83cbStv 		case NORMGOD:
362cd5f83cbStv 			if (obj == RING || obj == BRACELET) {
363bd6068f4Sjmc 				printf("She takes the charm and puts it on.");
364bd6068f4Sjmc 				puts("  A little kiss on the cheek is");
365cd5f83cbStv 				puts("your reward.");
366cd5f83cbStv 				ego += 5;
367cd5f83cbStv 				godready += 3;
368cd5f83cbStv 			}
369bd6068f4Sjmc 			if (obj == AMULET || obj == MEDALION ||
370bd6068f4Sjmc 			    obj == TALISMAN) {
371cd5f83cbStv 				win++;
372cd5f83cbStv 				ego += 5;
373cd5f83cbStv 				power -= 5;
374cd5f83cbStv 				if (win >= 3) {
375bd6068f4Sjmc 					printf("The powers of the earth are ");
376bd6068f4Sjmc 					printf("now legitimate.  You have ");
377bd6068f4Sjmc 					puts("destroyed the Darkness");
378bd6068f4Sjmc 					printf("and restored the goddess to ");
379bd6068f4Sjmc 					printf("her throne.  The entire ");
380bd6068f4Sjmc 					puts("island celebrates with");
381bd6068f4Sjmc 					printf("dancing and spring feasts.  ");
382bd6068f4Sjmc 					printf("As a measure of her ");
383bd6068f4Sjmc 					puts("gratitude, the goddess weds you");
384bd6068f4Sjmc 					printf("in the late summer and ");
385bd6068f4Sjmc 					printf("crowns you Prince Liverwort, ");
386bd6068f4Sjmc 					puts("Lord of Fungus.");
387bd6068f4Sjmc 					printf("\nBut, as the year wears on ");
388bd6068f4Sjmc 					printf("and autumn comes along, you ");
389bd6068f4Sjmc 					puts("become restless and");
390bd6068f4Sjmc 					printf("yearn for adventure.  The ");
391bd6068f4Sjmc 					printf("goddess, too, realizes that ");
392bd6068f4Sjmc 					puts("the marriage can't last.");
393bd6068f4Sjmc 					printf("She becomes bored and takes ");
394bd6068f4Sjmc 					printf("several more natives as ");
395bd6068f4Sjmc 					puts("husbands.  One evening,");
396bd6068f4Sjmc 					printf("after having been out ");
397bd6068f4Sjmc 					printf("drinking with the girls, she ");
398bd6068f4Sjmc 					puts("kicks the throne particularly");
399bd6068f4Sjmc 					printf("hard and wakes you up.  (If ");
400bd6068f4Sjmc 					printf("you want to win this game, ");
401bd6068f4Sjmc 					printf("you're going to have to\n");
402bd6068f4Sjmc 					puts("shoot her!)");
403bd6068f4Sjmc 					clearbit(location[position].objects,
404bd6068f4Sjmc 					    MEDALION);
405cd5f83cbStv 					wintime = ourtime;
406cd5f83cbStv 				}
407cd5f83cbStv 			}
408cd5f83cbStv 			break;
409cd5f83cbStv 		case TIMER:
410cd5f83cbStv 			if (obj == COINS) {
411bd6068f4Sjmc 				printf("He fingers the coins for a moment ");
412bd6068f4Sjmc 				printf("and then looks up agape.  `Kind you ");
413bd6068f4Sjmc 				puts("are and");
414bd6068f4Sjmc 				printf("I mean to repay you as best I can.'  ");
415bd6068f4Sjmc 				printf("Grabbing a pencil and cocktail ");
416bd6068f4Sjmc 				puts("napkin...\n");
417bd6068f4Sjmc 				printf("+-----------------------------------");
418bd6068f4Sjmc 				printf("------------------------------------");
419bd6068f4Sjmc 				printf("------+\n");
420cd5f83cbStv 				printf("|				   xxxxxxxx\\				      |\n");
421cd5f83cbStv 				printf("|				       xxxxx\\	CLIFFS			      |\n");
422cd5f83cbStv 				printf("|		FOREST			  xxx\\				      |\n");
423cd5f83cbStv 				printf("|				\\\\	     x\\        	OCEAN		      |\n");
424cd5f83cbStv 				printf("|				||	       x\\			      |\n");
425cd5f83cbStv 				printf("|				||  ROAD	x\\			      |\n");
426cd5f83cbStv 				printf("|				||		x\\			      |\n");
427cd5f83cbStv 				printf("|		SECRET		||	  .........			      |\n");
428cd5f83cbStv 				printf("|		 - + -		||	   ........			      |\n");
429cd5f83cbStv 				printf("|		ENTRANCE	||		...      BEACH		      |\n");
430cd5f83cbStv 				printf("|				||		...		  E	      |\n");
431cd5f83cbStv 				printf("|				||		...		  |	      |\n");
432cd5f83cbStv 				printf("|				//		...	    N <-- + --- S     |\n");
433cd5f83cbStv 				printf("|		PALM GROVE     //		...		  |	      |\n");
434cd5f83cbStv 				printf("|			      //		...		  W	      |\n");
435bd6068f4Sjmc 				printf("+");
436bd6068f4Sjmc 				printf("---------------------------------");
437bd6068f4Sjmc 				printf("---------------------------------");
438bd6068f4Sjmc 				printf("-----------+\n");
439bd6068f4Sjmc 				printf("\n`This map shows a secret entrance ");
440bd6068f4Sjmc 				puts("to the catacombs.");
441bd6068f4Sjmc 				printf("You will know when you arrive ");
442bd6068f4Sjmc 				printf("because I left an old pair of shoes ");
443bd6068f4Sjmc 				puts("there.'");
444cd5f83cbStv 			}
445cd5f83cbStv 			break;
446cd5f83cbStv 		}
447cd5f83cbStv 	}
448cd5f83cbStv 	wordnumber = max(last1, last2) + 1;
449cd5f83cbStv 	return (firstnumber);
450cd5f83cbStv }
451