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