Upgrade libarchive, bsdcat(1), bsdcpio(1) and bsdtar(1). 1/2
[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. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  * @(#)globals.c        8.1 (Berkeley) 5/31/93
30  * $FreeBSD: src/games/battlestar/globals.c,v 1.5.2.1 2001/03/05 11:45:36 kris Exp $
31  */
32
33 #include "externs.h"
34
35 int WEIGHT = MAXWEIGHT;
36 int CUMBER = MAXCUMBER;
37
38 const char *const objdes[NUMOFOBJECTS] = {
39         "There is a knife here",
40         "There is an exquisitely crafted sword and scabbard here.",
41         NULL,                   /* Can land from here. */
42         "There is a fierce woodsman here brandishing a heavy mallet.",
43         "There is an unwieldy two-handed sword here.",
44         "There is a bloody meat cleaver here.",
45         "A rusty broadsword is lying here.",
46         "There is an ancient coat of finely woven mail here.",
47         "There is an old dented helmet with an ostrich plume here.",
48         "There is a shield of some native tribe here.",
49         "The maid's body is lying here. She was murdered!",
50         "There is a Viper ready for launch here.",
51         "A kerosene lantern is burning luridly here.",
52         "An old pair of shoes has been discarded here.",
53         NULL,                   /* Cylon. */
54         "There is a pair of pajamas here.",
55         "A kingly robe of royal purple and spun gold is draped here.",
56         "There is a strange golden amulet on the floor here.",
57         "A medallion of solid gold shimmers on the ground nearby.",
58         "A talisman of gold is lying here.",
59         "A dead woodsman has fallen here. He was savagely murdered.",
60         "A heavy wooden mallet lies nearby.",
61         "There is a laser pistol here.",
62         "A flower-like young goddess is bathing in the hot mineral pools. She is \nwatching you, but continues to steep and sing softly.",
63         "The goddess is reclining on a bed of ferns and studying you intently.",
64         "There is a grenade here",
65         "There is a length of heavy chain here.",
66         "There is a stout rope here.",
67         "There is a pair of Levi's here.",
68         "A bloody mace is lying on the ground here.",
69         "There is a shovel here.",
70         "A long, sharp halberd is propped up here.",
71         "There is a compass here",
72         "Wreckage and smoldering debris from a crash litter the ground here.",
73         "A woodland Elf armed with a shield and deadly halberd lunges toward you!",
74         "I think I hear footsteps behind us.",
75         "There are a few coins here.",
76         "There are some matches here.",
77         "An unctuous man in a white suit and a dwarf are standing here.",
78         "There are some ripe papayas here.",
79         "There is a ripe pineapple here.",
80         "There are some kiwi fruit here.",
81         "There are some coconuts here.",
82         "There is a ripe mango here.",
83         "There is a sparkling diamond ring here.",
84         "There is a colorful pink potion in a small crystal vial here.",
85         "A gold bracelet is on the ground here.",
86         "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.'",
87         "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.'",
88         "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!'",
89         "An old timer with one eye missing and no money for a drink sits at the bar.",
90         "You are flying through an asteroid field!",
91         "A planet is nearby.",
92         "The ground is charred here.",
93         "There is a thermonuclear warhead here.",
94         "The fragile, beautiful young goddess lies here.  You murdered her horribly.",
95         "The old timer is lying here.  He is dead.",
96         "The native girl's body is lying here.",
97         "A native girl is sitting here.",
98         "A gorgeous white stallion is standing here.",
99         "The keys are in the ignition.",
100         "A pot of pearls and jewels is sitting here.",
101         "A bar of solid gold is here.",
102         "There is a 10 kilogram diamond block here."
103
104 };
105
106 const char *const objsht[NUMOFOBJECTS] = {
107         "knife",
108         "fine sword",
109         NULL,                   /* Can land from here. */
110         "Woodsman",
111         "two-handed sword",
112         "meat cleaver",
113         "broadsword",
114         "coat of mail",
115         "plumed helmet",
116         "shield",
117         "maid's body",
118         "viper",
119         "lantern",
120         "shoes",
121         NULL,                   /* Cylon. */
122         "pajamas",
123         "robe",
124         "amulet",
125         "medallion",
126         "talisman",
127         "woodsman's body",
128         "wooden mallet",
129         "laser",
130         NULL,                   /* Bathing goddess. */
131         NULL,                   /* Goddess. */
132         "grenade",
133         "chain",
134         "rope",
135         "levis",
136         "mace",
137         "shovel",
138         "halberd",
139         "compass",
140         NULL,                   /* Crash debris. */
141         "Elf",
142         NULL,                   /* Footsteps. */
143         "coins",
144         "match book",
145         NULL,                   /* Man and dwarf. */
146         "papayas",
147         "pineapple",
148         "kiwi",
149         "coconuts",
150         "mango",
151         "ring",
152         "potion",
153         "bracelet",
154         NULL,                   /* Swarthy woman. */
155         NULL,                   /* Swarthy woman (with message). */
156         "Dark Lord",
157         NULL,                   /* Old-timer. */
158         NULL,                   /* Asteroid field. */
159         NULL,                   /* Planet nearby. */
160         NULL,                   /* Charred ground. */
161         "warhead",
162         "goddess's body",
163         "old timer's body",
164         "girl's body",
165         NULL,                   /* Native girl. */
166         "stallion",
167         "car",
168         "pot of jewels",
169         "bar of gold",
170         "diamond block"
171 };
172
173 const char *const ouch[NUMOFINJURIES] = {
174         "some minor abrasions",
175         "some minor lacerations",
176         "a minor puncture wound",
177         "a minor amputation",
178         "a sprained wrist",
179         "a fractured ankle and shattered kneecap",
180         "a broken arm and dislocated shoulder",
181         "a few broken ribs",
182         "a broken leg and torn ligaments",
183         "a broken back and ruptured spleen",
184         "some deep incisions and a loss of blood",
185         "a fractured skull and mashed face",
186         "a broken neck"
187 };
188
189 const int objwt[NUMOFOBJECTS] = {
190         1,      5,      0,      10,     15,     2,      10,     10,
191         3,      5,      50,     2500,   2,      1,      100,    1,
192         2,      1,      1,      1,      60,     10,     5,      0,
193         50,     5,      15,     5,      1,      20,     10,     10,
194         0,      0,      0,      0,      1,      0,      0,      1,
195         1,      1,      2,      1,      0,      0,      0,      0,
196         0,      0,      100,    0,      0,      0,      55,     47,
197         50,     45,     45,     100,    2000,   30,     20,     10
198 };
199
200 const int objcumber[NUMOFOBJECTS] = {
201         1,      5,      0,      150,    10,     1,      5,      2,
202         2,      1,      5,      10,     1,      1,      10,     1,
203         1,      1,      1,      1,      7,      5,      4,      0,
204         0,      1,      1,      1,      1,      5,      4,      4,
205         1,      0,      0,      0,      1,      0,      0,      1,
206         1,      1,      3,      1,      0,      0,      1,      0,
207         0,      0,      10,     0,      0,      0,      7,      8,
208         10,     8,      8,      10,     10,     3,      1,      2
209 };
210
211 int bs_win = 1;
212 int matchcount = 20;
213 int followgod = -1;
214 int followfight = -1;