xref: /original-bsd/games/larn/fortune.c (revision 93152bbe)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)fortune.c	5.5 (Berkeley) 06/10/91";
10 #endif /* not lint */
11 
12 /* fortune.c		 Larn is copyrighted 1986 by Noah Morgan. */
13 
14 /*
15  * function to return a random fortune from the fortune file
16  */
17 
18 char *flines[] = {
19 	"gem value = gem * 2 ^ perfection",
20 	"sitting down can have unexpected results",
21 	"don't pry into the affairs of others",
22 	"drinking can be hazardous to your health",
23 	"beware of the gusher!",
24 	"some monsters are greedy",
25 	"nymphs have light fingers",
26 	"try kissing a disenchantress!",
27 	"hammers and brains don't mix",
28 	"what does a potion of cure dianthroritis taste like?",
29 	"hit point gain/loss when raising a level depends on constitution",
30 	"healing a mighty wizard can be exhilarating",
31 	"be sure to pay your taxes",
32 	"are Vampires afraid of something?",
33 	"some dragons can fly",
34 	"dos thou strive for perfection?",
35 	"patience is a virtue, unless your daughter dies",
36 	"what does the Eye of Larn see in its guardian?",
37 	"a level 25 player casts like crazy!",
38 	"energy rings affect spell regeneration",
39 	"difficulty affects regeneration",
40 	"control of the pesty spirits is most helpful",
41 	"don't fall into a bottomless pit",
42 	"dexterity allows you to carry more",
43 	"you can get 2 points of WC for the price of one",
44 	"never enter the dungeon naked!  the monsters will laugh at you!",
45 	"did someone put itching powder in your armor?",
46 	"you klutz!",
47 	"avoid opening doors.  you never know whats on the other side.",
48 	"infinite regeneration ---> temptation",
49 	"the greatest weapon in the game has not the highest Weapon Class",
50 	"you can't buy the most powerful scroll",
51 	"identify things before you use them",
52 	"there's more than one way through a wall"
53 };
54 
55 #define NFORTUNES	34
56 
57 char *
58 fortune()
59 {
60 	return (flines[random() % NFORTUNES]);
61 }
62