note other reasons for pclose to return -1; wait(2) -> wait4(2)
[unix-history] / usr / src / games / battlestar / globals.c
CommitLineData
fdc7d56f 1/*
e95fc82a
KB
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
28c5bacc
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
fdc7d56f
EW
16 */
17
82371ee2 18#ifndef lint
28c5bacc 19static char sccsid[] = "@(#)globals.c 5.2 (Berkeley) %G%";
e95fc82a 20#endif /* not lint */
82371ee2
EW
21
22#include "externs.h"
23
24int WEIGHT = MAXWEIGHT;
25int CUMBER = MAXCUMBER;
26
27char *objdes[NUMOFOBJECTS] = {
28 "There is a knife here",
29 "There is an exquisitely crafted sword and scabbard here.",
30 0, /* can land from here */
31 "There is a fierce woodsman here brandishing a heavy mallet.",
32 "There is an unweildly two-handed sword here.",
33 "There is a bloody meat cleaver here.",
34 "A rusty broadsword is lying here.",
35 "There is an ancient coat of finely woven mail here.",
36 "There is a old dented helmet with an ostrich plume here.",
37 "There is a shield of some native tribe here.",
38 "The maid's body is lying here. She was murdered!",
39 "There is a Viper ready for launch here.",
40 "A kerosene lantern is burning luridly here.",
41 "An old pair of shoes has been discarded here.",
42 0, /* cylon */
43 "There is a pair of pajamas here.",
44 "A kingly robe of royal purple and spun gold is draped here.",
45 "There is a strange golden amulet on the floor here.",
46 "A medallion of solid gold shimmers on the ground nearby.",
47 "A talisman of gold is lying here.",
48 "A dead woodsman has fallen here. He was savagely murdered.",
49 "A heavy wooden mallet lies nearby.",
50 "There is a laser pistol here.",
51 "A flower-like young goddess is bathing in the hot mineral pools. She is \nwatching you, but continues to steep and sing softly.",
52 "The goddess is reclining on a bed of ferns and studying you intently.",
53 "There is a grenade here",
54 "There is a length of heavy chain here.",
55 "There is a stout rope here.",
56 "There is a pair of Levi's here.",
57 "A bloody mace is lying on the ground here.",
58 "There is a shovel here.",
59 "A long, sharp halberd is propped up here.",
60 "There is a compass here",
61 "Wreckage and smoldering debris from a crash litter the ground here.",
62 "A woodland Elf armed with a shield and deadly halberd lunges toward you!",
63 "I think I hear footsteps behind us.",
64 "There are a few coins here.",
65 "There are some matches here.",
66 "An unctuous man in a white suit and a dwarf are standing here.",
67 "There are some ripe papayas here.",
68 "There is a ripe pineapple here.",
69 "There are some kiwi fruit here.",
70 "There are some coconuts here.",
71 "There is a ripe mango here.",
72 "There is a sparkling diamond ring here.",
73 "There is a colorful pink potion in a small crystal vial here.",
74 "A gold bracelet is on the ground here.",
75 "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.'",
a7c71d1e
EW
76 "The swarthy woman has been awaiting you anxiousy. '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.'",
77 "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!'",
82371ee2
EW
78 "An old timer with one eye missing and no money for a drink sits at the bar.",
79 "You are flying through an asteroid field!",
80 "A planet is nearby.",
81 "The ground is charred here.",
82 "There is a thermonuclear warhead here.",
83 "The fragile, beautiful young goddess lies here. You murdered her horribly.",
84 "The old timer is lying here. He is dead.",
85 "The native girl's body is lying here.",
86 "A native girl is sitting here.",
87 "A gorgeous white stallion is standing here.",
88 "The keys are in the ignition.",
89 "A pot of pearls and jewels is sitting here.",
90 "A bar of solid gold is here.",
91 "There is a 10 kilogram diamond block here."
92
93};
94
95char *objsht[NUMOFOBJECTS] = {
96 "knife",
97 "fine sword",
98 0,
99 "Woodsman",
100 "two-handed sword",
101 "meat cleaver",
102 "broadsword",
103 "coat of mail",
104 "plumed helmet",
105 "shield",
106 "maid's body",
107 "viper",
108 "lantern",
109 "shoes",
110 0,
111 "pajamas",
112 "robe",
113 "amulet",
114 "medallion",
115 "talisman",
116 "woodsman's body",
117 "wooden mallet",
118 "laser",
119 0,
120 0,
121 "grenade",
122 "chain",
123 "rope",
124 "levis",
125 "mace",
126 "shovel",
127 "halberd",
128 "compass",
129 0,
130 "Elf",
131 0,
132 "coins",
133 "match book",
134 0,
135 "papayas",
136 "pineapple",
137 "kiwi",
138 "coconuts",
139 "mango",
140 "ring",
141 "potion",
142 "bracelet",
143 0,
144 0,
145 "Dark Lord",
146 0,
147 0,
148 0,
149 0,
150 "warhead",
151 "goddess's body",
152 "old timer's body",
153 "girl's body",
154 0,
155 "stallion",
156 "car",
157 "pot of jewels",
158 "bar of gold",
159 "diamond block"
160};
161
162char *ouch[NUMOFINJURIES] = {
163 "some minor abrasions",
164 "some minor lacerations",
165 "a minor puncture wound",
166 "a minor amputation",
167 "a sprained wrist",
168 "a fractured ankle and shattered kneecap",
169 "a broken arm and dislocated shoulder",
170 "a few broken ribs",
171 "a broken leg and torn ligaments",
172 "a broken back and ruptured spleen",
173 "some deep incisions and a loss of blood",
174 "a fractured skull and mashed face",
175 "a broken neck"
176};
177
178int objwt[NUMOFOBJECTS] = {
179 1, 5, 0, 10, 15, 2, 10, 10,
180 3, 5, 50, 2500, 2, 1, 100, 1,
181 2, 1, 1, 1, 60, 10, 5, 0,
182 50, 5, 15, 5, 1, 20, 10, 10,
183 0, 0, 0, 0, 1, 0, 0, 1,
184 1, 1, 2, 1, 0, 0, 0, 0,
185 0, 0, 100, 0, 0, 0, 55, 47,
186 50, 45, 45, 100, 2000, 30, 20, 10
187};
188
189int objcumber[NUMOFOBJECTS] = {
190 1, 5, 0, 150, 10, 1, 5, 2,
191 2, 1, 5, 10, 1, 1, 10, 1,
192 1, 1, 1, 1, 7, 5, 4, 0,
193 0, 1, 1, 1, 1, 5, 4, 4,
194 1, 0, 0, 0, 1, 0, 0, 1,
195 1, 1, 3, 1, 0, 0, 1, 0,
196 0, 0, 10, 0, 0, 0, 7, 8,
197 10, 8, 8, 10, 10, 3, 1, 2
198};
199
200int win = 1;
201int matchcount = 20;
a7c71d1e
EW
202int followgod = -1;
203int followfight = -1;