Merge from vendor branch OPENSSH:
[dragonfly.git] / games / battlestar / globals.c
1 /*
2  * Copyright (c) 1983, 1993
3  *      The Regents of the University of California.  All rights reserved.
4  *
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.
20  *
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.
32  *
33  * @(#)globals.c        8.1 (Berkeley) 5/31/93
34  * $FreeBSD: src/games/battlestar/globals.c,v 1.5.2.1 2001/03/05 11:45:36 kris Exp $
35  * $DragonFly: src/games/battlestar/globals.c,v 1.2 2003/06/17 04:25:22 dillon Exp $
36  */
37
38 #include "externs.h"
39
40 int WEIGHT = MAXWEIGHT;
41 int CUMBER = MAXCUMBER;
42
43 const char *const objdes[NUMOFOBJECTS] = {
44         "There is a knife here",
45         "There is an exquisitely crafted sword and scabbard here.",
46         0,                              /* can land from here */
47         "There is a fierce woodsman here brandishing a heavy mallet.",
48         "There is an unwieldy two-handed sword here.",
49         "There is a bloody meat cleaver here.",
50         "A rusty broadsword is lying here.",
51         "There is an ancient coat of finely woven mail here.",
52         "There is a old dented helmet with an ostrich plume here.",
53         "There is a shield of some native tribe here.",
54         "The maid's body is lying here. She was murdered!",
55         "There is a Viper ready for launch here.",
56         "A kerosene lantern is burning luridly here.",
57         "An old pair of shoes has been discarded here.",
58         0,                              /* cylon */
59         "There is a pair of pajamas here.",
60         "A kingly robe of royal purple and spun gold is draped here.",
61         "There is a strange golden amulet on the floor here.",
62         "A medallion of solid gold shimmers on the ground nearby.",
63         "A talisman of gold is lying here.",
64         "A dead woodsman has fallen here. He was savagely murdered.",
65         "A heavy wooden mallet lies nearby.",
66         "There is a laser pistol here.",
67        "A flower-like young goddess is bathing in the hot mineral pools. She is \nwatching you, but continues to steep and sing softly.",
68         "The goddess is reclining on a bed of ferns and studying you intently.",
69         "There is a grenade here",
70         "There is a length of heavy chain here.",
71         "There is a stout rope here.",
72         "There is a pair of Levi's here.",
73         "A bloody mace is lying on the ground here.",
74         "There is a shovel here.",
75         "A long, sharp halberd is propped up here.",
76         "There is a compass here",
77         "Wreckage and smoldering debris from a crash litter the ground here.",
78         "A woodland Elf armed with a shield and deadly halberd lunges toward you!",
79         "I think I hear footsteps behind us.",
80         "There are a few coins here.",
81         "There are some matches here.",
82        "An unctuous man in a white suit and a dwarf are standing here.",
83        "There are some ripe papayas here.",
84        "There is a ripe pineapple here.",
85        "There are some kiwi fruit here.",
86        "There are some coconuts here.",
87        "There is a ripe mango here.",
88        "There is a sparkling diamond ring here.",
89        "There is a colorful pink potion in a small crystal vial here.",
90        "A gold bracelet is on the ground here.",
91        "A swarthy woman with stern features pulls you aside from the crowd,\n'I must talk to you -- but not here.  Meet me at midnight in the gardens.'",
92        "The swarthy woman has been awaiting you anxiously. 'I must warn you that the\nIsland has anticipated your Quest.  You will not be welcomed. The Darkness is\nstrong where you must search.  Seek not the shadows save only at night, for\nthen are they the weakest.  In the mountains far from here a canyon winds\nwith ferns and streams and forgotten vines.  There you must go. Take this\nrope.'",
93        "Out from the shadows a figure leaps!  His black cape swirls around, and he\nholds a laser sword at your chest.  'So, you have come to fulfill the Quest.\nHa! Your weapons are no match for me!'",
94        "An old timer with one eye missing and no money for a drink sits at the bar.",
95        "You are flying through an asteroid field!",
96        "A planet is nearby.",
97        "The ground is charred here.",
98        "There is a thermonuclear warhead here.",
99        "The fragile, beautiful young goddess lies here.  You murdered her horribly.",
100        "The old timer is lying here.  He is dead.",
101        "The native girl's body is lying here.",
102        "A native girl is sitting here.",
103        "A gorgeous white stallion is standing here.",
104        "The keys are in the ignition.",
105        "A pot of pearls and jewels is sitting here.",
106        "A bar of solid gold is here.",
107        "There is a 10 kilogram diamond block here."
108
109 };
110
111 const char *const objsht[NUMOFOBJECTS] = {
112         "knife",
113         "fine sword",
114         0,
115         "Woodsman",
116         "two-handed sword",
117         "meat cleaver",
118         "broadsword",
119         "coat of mail",
120         "plumed helmet",
121         "shield",
122         "maid's body",
123         "viper",
124         "lantern",
125         "shoes",
126         0,
127         "pajamas",
128         "robe",
129         "amulet",
130         "medallion",
131         "talisman",
132         "woodsman's body",
133         "wooden mallet",
134         "laser",
135         0,
136         0,
137         "grenade",
138         "chain",
139         "rope",
140         "levis",
141         "mace",
142         "shovel",
143         "halberd",
144         "compass",
145         0,
146         "Elf",
147         0,
148         "coins",
149         "match book",
150         0,
151         "papayas",
152         "pineapple",
153         "kiwi",
154         "coconuts",
155         "mango",
156         "ring",
157         "potion",
158         "bracelet",
159         0,
160         0,
161         "Dark Lord",
162         0,
163         0,
164         0,
165         0,
166         "warhead",
167         "goddess's body",
168         "old timer's body",
169         "girl's body",
170         0,
171         "stallion",
172         "car",
173         "pot of jewels",
174         "bar of gold",
175         "diamond block"
176 };
177
178 const char *const ouch[NUMOFINJURIES] = {
179         "some minor abrasions",
180         "some minor lacerations",
181         "a minor puncture wound",
182         "a minor amputation",
183         "a sprained wrist",
184         "a fractured ankle and shattered kneecap",
185         "a broken arm and dislocated shoulder",
186         "a few broken ribs",
187         "a broken leg and torn ligaments",
188         "a broken back and ruptured spleen",
189         "some deep incisions and a loss of blood",
190         "a fractured skull and mashed face",
191         "a broken neck"
192 };
193
194 const int objwt[NUMOFOBJECTS] = {
195         1,      5,      0,      10,     15,     2,      10,     10,
196         3,      5,      50,     2500,   2,      1,      100,    1,
197         2,      1,      1,      1,      60,     10,     5,      0,
198         50,     5,      15,     5,      1,      20,     10,     10,
199         0,      0,      0,      0,      1,      0,      0,      1,
200         1,      1,      2,      1,      0,      0,      0,      0,
201         0,      0,      100,    0,      0,      0,      55,     47,
202         50,     45,     45,     100,    2000,   30,     20,     10
203 };
204
205 const int objcumber[NUMOFOBJECTS] = {
206         1,      5,      0,      150,    10,     1,      5,      2,
207         2,      1,      5,      10,     1,      1,      10,     1,
208         1,      1,      1,      1,      7,      5,      4,      0,
209         0,      1,      1,      1,      1,      5,      4,      4,
210         1,      0,      0,      0,      1,      0,      0,      1,
211         1,      1,      3,      1,      0,      0,      1,      0,
212         0,      0,      10,     0,      0,      0,      7,      8,
213         10,     8,      8,      10,     10,     3,      1,      2
214 };
215
216 int bs_win = 1;
217 int matchcount = 20;
218 int followgod = -1;
219 int followfight = -1;