Fix two typos
[dragonfly.git] / games / larn / fortune.c
blobbb7cb80d029a36faab05413f3b8947a8f25c81c4
1 /*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
33 * @(#)fortune.c 5.5 (Berkeley) 6/10/91
34 * $FreeBSD: src/games/larn/fortune.c,v 1.2 1999/11/30 03:48:59 billf Exp $
35 * $DragonFly: src/games/larn/fortune.c,v 1.3 2006/08/26 17:05:05 pavalos Exp $
38 /* fortune.c Larn is copyrighted 1986 by Noah Morgan. */
39 #include "header.h"
42 * function to return a random fortune from the fortune file
45 const char *flines[] = {
46 "gem value = gem * 2 ^ perfection",
47 "sitting down can have unexpected results",
48 "don't pry into the affairs of others",
49 "drinking can be hazardous to your health",
50 "beware of the gusher!",
51 "some monsters are greedy",
52 "nymphs have light fingers",
53 "try kissing a disenchantress!",
54 "hammers and brains don't mix",
55 "what does a potion of cure dianthroritis taste like?",
56 "hit point gain/loss when raising a level depends on constitution",
57 "healing a mighty wizard can be exhilarating",
58 "be sure to pay your taxes",
59 "are Vampires afraid of something?",
60 "some dragons can fly",
61 "dos thou strive for perfection?",
62 "patience is a virtue, unless your daughter dies",
63 "what does the Eye of Larn see in its guardian?",
64 "a level 25 player casts like crazy!",
65 "energy rings affect spell regeneration",
66 "difficulty affects regeneration",
67 "control of the pesty spirits is most helpful",
68 "don't fall into a bottomless pit",
69 "dexterity allows you to carry more",
70 "you can get 2 points of WC for the price of one",
71 "never enter the dungeon naked! the monsters will laugh at you!",
72 "did someone put itching powder in your armor?",
73 "you klutz!",
74 "avoid opening doors. you never know whats on the other side.",
75 "infinite regeneration ---> temptation",
76 "the greatest weapon in the game has not the highest Weapon Class",
77 "you can't buy the most powerful scroll",
78 "identify things before you use them",
79 "there's more than one way through a wall"
82 #define NFORTUNES 34
84 const char *
85 fortune(void)
87 return (flines[random() % NFORTUNES]);