[net.sources] battlestar

yee@ucbvax.ARPA (Peter E. Yee) (01/24/85)

This is the distribution of BATTLESTAR, and adventure game written by
David (The Admiral) Riggle.  Permission is granted for personal use and
pleasure so long as it is not done for profit.  Send bug reports to
ucbvax!yee.

#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
-----cut here-----cut here-----cut here-----cut here-----
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	battlestar/dayfile
# This archive created: Wed Jan 23 19:52:42 1985
cat << \SHAR_EOF > battlestar/dayfile
@(#)dayfile	1.2 11/28/84
1: You are in the main hangar.
5 2 9 3 3 1 0 0
This is a huge bay where many fighters and cargo craft lie.  Alarms are 
sounding and fighter pilots are running to their ships.  Above is a gallery
overlooking the bay. The scream of turbo engines is coming from +. The rest
of the hangar is +. There is an exit +.*

2: This is the landing bay.
1 0 10 0 0 0 0 0
Ships are landing here, some heavily damaged. Enemy fighters continually
strafe this vulnerable port. The main hangar is +, *
There is an exit +.*

3: You are in the gallery.
4 0 0 0 0 0 1 0
From here a view of the entire landing bay reveals that our battlestar
is near destruction. Fires are spreading out of control and laser blasts
lick at the shadows. The control room is +. ***

4: You are in the control room.
0 3 0 0 0 0 5 0
Several frantic technicians are flipping switches wildly but otherwise
this room seems fairly deserted.  A weapons locker has been left open.
A staircase leads down. * There is a way -. **        

5: This is the launch room.
6 1 7 0 4 1 0 0
From the launch tubes here fighters blast off into space. Only one is left,
and it is guarded by two fierce men. A staircase leads up from here.
There is a cluttered workbench +. From the main hangar come sounds of great
explosions.  The main hangar is +. The viper launch tubes are to the -.*

6: You are at the workbench.
0 5 7 0 0 0 0 0
Strange and unwieldy tools are arranged here including a lunch box 
and pneumatic wrenches and turbo sprocket rockets.*
The launch room is +. The remaining viper is +.*

7: You are in the viper launch tube.
0 5 0 5 32 0 0 0
The two guards are eyeing you warily! ****

8: This is a walk in closet.
22 0 0 0 0 0 0 0
A wardrobe of immense magnitude greets the eye.  Furs and robes of kings
hang on rack after rack.  Silken gowns, capes woven with spun gold, and 
delicate synthetic fabrics are stowed here.  The bedroom is +.***

9: You are in a wide hallway leading to the main hangar.
0 0 11 1 0 0 0 0
The walls and ceiling here have been blasted through in several places.
It looks as if quite a battle has been fought for possession of the landing bay
Gaping corpses litter the floor.**  The hallway continues +.
The main hangar is +.

10: You are in a wide hallway leading to the landing bay.
0 0 12 2 0 0 0 0
Most of the men and supplies needed in the main hangar come through this
corridor, but the wounded are forced to use it too. It very dank and
crowded here, and the floor is slippery with blood.**
The hallway continues -. The landing bay is +.

11: The hallway is very congested with rubble here.
0 0 0 9 13 1 0 0
It is too choked with broken steel girders and other debris to continue
on much farther. Above, the ceiling has caved in and it is possible to 
climb up. There is not much chance to go -, -, or -.
But the hallway seems clearer +.

12: A wide hallway and a more narrow walkway meet here.
14 15 0 10 0 0 0 0
The intersection is crowded with the many wounded who have come up
the wide hallway and continued +. The walkway is less crowded +.
The wide hallway goes *-.

13: You are in what was once an elegant stateroom.
16 0 0 0 0 0 11 0
Whoever lived in this stateroom, he and his female companion
were mercilessly slain in their sleep. Clothes, trinkets and personal
belongings are scattered all across the floor. Through a hole in the
collapsed floor I can see a hallway below.  A door is +.***

14: You're at the entrance to the sick bay.
17 12 18 0 0 0 0 0
The wounded are entering the sick bay in loudly moaning files.
The walkway continues - and +. A doctor is motioning for you to 
come to the -. *

15: You're in the walkway.
12 19 0 0 0 0 0 0
Most of the men and supplies were coming from the armory. The walkway
continues -. The armory is +.**

16: These are the executive suites of the battlestar.
20 13 21 22 23 1 24 0
Luxurious staterooms carpeted with crushed velvet and adorned with beaten
gold open onto this parlor. A wide staircase with ivory banisters leads
up or down. This parlor leads into a hallway +. The bridal suite is +.
Other rooms lie - and +.

17: You're in a long dimly lit hallway.
0 14 25 0 0 0 0 0
This part of the walkway is deserted. There is a dead end +. The
entrance to the sickbay is +. The walkway turns sharply -.*

18: This is the sick bay.
0 0 0 14 0 0 0 0
Sinister nurses with long needles and pitiful aim probe the depths of suffering
here. Only the mortally wounded receive medical attention on a battlestar,
but afterwards they are thrown into the incinerators along with the rest.**
Nothing but death and suffering +.  The walkway is +.

19: You're in the armory.
15 26 0 0 0 0 0 0
An armed guard is stationed here 365 sectars a yarn to protect the magazine.
The walkway is +. The magazine is +.**

20: The hallway ends here at the presidential suite.
27 16 0 0 0 0 0 0
The door to this suite is made from solid magnesium, and the entryway is
inlaid with diamonds and fire opals. The door is ajar +. The hallway
goes -.**

21: This is the maid's utility room.
0 0 0 16 0 0 0 0
What a gruesome sight! The maid has been brutally drowned in a bucket of
Pine Sol and repeatedly stabbed in the back with a knife.***
The hallway is +.

22: This is a luxurious stateroom.
0 8 16 0 0 0 0 0
The floor is carpeted with a soft animal fur and the great wooden furniture
is inlaid with strips of platinum and gold.  Electronic equipment built
into the walls and ceiling is flashing wildly.  The floor shudders and
the sounds of dull explosions rumble though the room.  From a window in
the wall + comes a view of darkest space.  There is a small adjoining
room +, and a doorway +.*

23: You are at the entrance to the dining hall.
0 0 28 0 0 0 16 0
A wide staircase with ebony banisters leads down here.**
The dining hall is to the -.*

24: This was once the first class lounge.
0 0 29 0 16 1 0 0
There is much rubble and destruction here that was not apparent elsewhere.
The walls and ceilings have broken in in some places. A staircase with
red coral banisters leads up. It is impossible to go - or -.
It seems a little clearer +.*

25: You are in a narrow stairwell.
0 17 0 0 30 1 0 0
These dusty and decrepit stairs lead up.  There is no way -.  The
hallway turns sharply -.**

26: You are in the magazine.
19 0 0 0 0 0 0 0
Rows and rows of neatly stacked ammunition for laser pistols and grenade
launchers are here. The armory is +.***

27: You're in the presidential suite.
0 20 0 0 0 0 0 0
Apparently the president has been assassinated. A scorched figure lies
face downward on the carpet clutching his chest.*
The hallway leads -.**

28: You are in the dining hall.
0 30 31 23 0 0 0 0
This was the seen of a mass suicide. Hundreds of ambassadors and assorted
dignitaries sit slumped over their breakfast cereal. I suppose the news
of the cylon attack killed them. There is a strange chill in this room.  I
would not linger here. * The kitchen is +. Entrances + and +.

29: The debris is very thick here.
0 11 0 24 0 0 0 0
Broken furniture, fallen girders, and other rubble block the way.
There is not much chance to continue -, -, or -.
It would be best to go -.

30: You are in the kitchen.
28 0 0 0 0 0 0 0
This room is full of shining stainless steel and burnished bronze cookware. An 
assortment of tropical fruits and vegetables as well as fine meats and cheeses 
lies on a sterling platter. The chef, unfortunately, has been skewered like a 
side of beef. The dining room is +. ** There is a locked door +.

31: You are in an arched entry leading to the dining room.
0 0 0 28 0 0 0 0
The door leading out is bolted shut from the outside and is very strong.***
The dining room is +.

32: You are in space.
33 34 35 36 37 1 33 1
****

33: You are in space.
38 32 39 40 41 1 42 1
****

34: You are in space.
32 44 45 46 47 1 48 1
****

35: You are in space.
40 45 49 32 50 1 51 1
****

36: You are in space.
41 46 32 52 53 1 54 1
****

37: You are in space.
42 47 50 53 55 1 32 1
****

38: You are in space.
43 48 51 54 32 1 56 1
****

39: You are in space.
57 33 40 41 42 1 43 1
****

40: You are in space.
39 35 57 33 58 1 59 1
****

41: You are in space.
39 36 33 59 60 1 61 1
****

42: You are in space.
39 37 58 60 62 1 33 1
****

43: You are in space.
39 38 59 61 33 1 63 1
****

44: You are in space.
34 64 45 46 47 1 48 1
****

45: You are in space.
35 44 49 34 50 1 51 1
****

46: You are in space.
36 44 34 52 53 1 54 1
****

47: You are in space.
37 44 50 53 55 1 34 1
****

48: You are in space.
38 44 51 54 34 1 56 1
****

49: You are in space.
49 49 52 35 49 1 49 1
****

50: You are in space.
58 47 49 37 55 1 35 1
****

51: You are in space.
59 48 49 38 35 1 56 1
****

52: You are in space.
52 52 36 49 52 1 52 1
****

53: You are in space.
60 46 37 52 55 1 36 1
****

54: You are in space.
61 48 38 52 36 1 56 1
****

55: You are in space.
62 55 55 55 56 1 37 1
****

56: You are in space.
56 56 56 56 38 1 55 1
****

57: You are in space.
65 39 57 57 57 1 57 1
****

58: You are in space.
39 50 49 42 62 1 40 1
****

59: You are in space.
39 51 49 43 40 1 63 1
****

60: You are in space.
39 53 43 59 62 1 41 1
****

61: You are in space.
39 54 43 59 41 1 56 1
****

62: You are in space.
39 55 62 62 56 1 42 1
****

63: You are in space.
39 56 35 36 43 1 55 1
****

64: You are in space.
44 66 66 66 66 1 66 1
****

65: You are in space.
67 57 67 67 67 1 67 1
****

66: You are in space.
64 68 68 68 68 1 68 1
****

67:You are orbiting a small blue planet.
67 67 67 67 65 1 69 1
****

68: You are orbiting a tropical planet.
68 68 68 68 66 1 70 1
****

69: You are flying through a dense fog.
69 69 69 69 69 1 69 1
A cold grey sea of mist is swirling around the windshield and water droplets
are spewing from the wingtips. Ominous shadows loom in the darkness and it
feels as if a trap is closing around us. I have lost all sense of direction.
****

70: You are approaching an island.
71 72 73 74 68 1 0 1
Coconut palms, sword ferns, orchids, and other lush vegetation drape this
jagged island carved seemingly from pure emerald and set in a turquoise
sea. The land rises sharply +. There is a nice beach* +.*

71: You are flying over a mountainous region.
75 73 76 77 68 1 0 1
Below is a magnificent canyon with deep gorges, high pinnacles and
waterfalls plummeting hundreds of feet into mist. Everything in sight
is carpeted with a tropical green.* The ocean is +.**

72: You are flying over the ocean.
74 78 78 78 68 1 0 1
You bank over the water and your wingtips dip low to the green waves.  The
sea is very shallow here and the white coral beds beneath us teem with 
colorful fish.****

73: You are flying over the beach.
71 72 79 74 68 1 80 1
A warm gentle surf caresses the white coral beach here. The land rises
sharply +.* The beach is lost in low cliffs and rocks +.*

74: You are flying over a large lagoon.
81 72 73 82 68 1 0 1
Encircled by a coral reef, the palms and ferns in this sheltered spot
have grown down to the water's very brink which winds tortuously inland.
There looks like a small village +.***

75: You are flying over a gently sloping plane.
83 71 84 85 68 1 0 1
This is where several alluvial fans and ancient lava flows have run
together forming a fertile plane choked with vegetation. It would be
impossible to land safely here.* The terrain is more rugged +.**

76: You are flying through a gorge.
0 0 86 71 68 1 102 1
This narrow, steep sided canyon is lined with waving ferns. The floor is of
light gravel with many freshets pouring from the walls and running along it.
The gorge leads to the sea** +, and to a tumultuous origin +.

77: You are flying over a plantation.
85 81 71 88 68 1 89 1
Rows of palms, papayas, mangoes, kiwi, as well as smaller fields of sugar
cane and pineapple are growing here. It might be possible to land here, but
I wouldn't advise it.* There looks like two small settlements +     
and *+.

78: You are over the ocean.
72 78 79 74 68 1 0 1
The deep green swells foam and roll into the shore **+*.

79: You are flying along the coast.
86 72 90 73 68 1 91 1
The coastline here is very rocky with little or no sand. The surf in some
places is violent and explodes in a shower of sparkling spray.
There is a winding road below which closely follows the shore. ****

80: This is a beautiful coral beach.
106 0 107 108 73 0 0 0
Fine silver sand kissed lightly by warm tropical waters stretches at least
30 meters here from the ocean to under gently swaying palms +.***

81: You are flying over a small fishing village.
77 74 71 82 68 1 92 1
A few thatched huts a short distance from the water and row of more modern
bungalows on either side of a dirt road are all that is here. The road
continues on ***+.

82: You are flying over a clearing.
88 72 74 87 68 1 93 1
There is a dock here (big enough for a seaplane) leading to a grassy
meadow and a road. Some people are having a party down there.  Below is
a good landing site. ****

83: You are flying over the shore.
94 75 95 96 68 1 0 1
Rocky lava flows or coarse sandy beaches are all that is here except for
sparse herbs and weeds.****

84: You are flying in a wide valley.
95 97 86 75 68 1 98 1
This is a shallow valley yet the floor is obscured by a thick mist.
The valley opens to the sea +. The mist grows thicker +.**

85: You are flying near the shore.
96 77 75 99 68 1 0 1
Very tall palm trees growing in neatly planted rows march off from the 
water here towards the hills and down to the flat lands *+.*
There is a nice beach +.

86: You are flying around the very tip of the island.
95 79 90 84 68 1 0 1
There is no beach here for sheer cliffs rise several hundred feet
to a tree covered summit. Far below, the blue sea gnaws voraciously at
the roots of these cliffs. The island bends around +** and +.

87: You are flying along the coastline.
99 82 88 100 68 1 101 1
There is a narrow strip of sand here lined with ferns and shrubs, but very
few trees. The beach is barley wide enough to land on. The beach continues
on -.* There are some buildings +.*

88: You are flying over several cottages and buildings
99 82 77 87 68 1 103 1
The grounds here are landscaped with palm trees, ferns, orchids, and beds of
flowering plumeria and antheriums. Directly below is a small ornate white
house with a belltower, a lush green lawn, and a spurting fountain.
Small dirt roads go + and +.**

89: You are in a field of sugar cane.
109 110 111 112 77 0 0 0
These strong, thick canes give little shelter but many cuts and scrapes.
There are some large trees ***+.

90: You are flying over the ocean.
95 78 90 86 68 1 0 1
The water is a placid turquoise and so clear that fish and sharks
many fathoms below are clearly visible.****

91: You are on the coast road.
113 114 115 116 79 0 0 0
The road winds close to the shore here and the sound of crashing surf is
deafening.* The water is +. The road continues - and -.

92: You are on the main street of the village.
117 118 119 120 81 0 0 0
Thatched roofs and outrigger canoes, palm trees and vacation bungalows, and
comely natives in a tropical paradise all make this a fantasy come true.
There is an open bungalow +.*  The road continues - and -.

93: You are at the sea plane dock.
121 122 123 124 82 0 0 0
Native girls with skin of gold, clad only in fragrant leis and lavalavas,
line the dockside to greet you. A couple of ukulele plucking islanders and a
keyboard player are adding appropriate music. A road crosses the clearing 
+*.  There are some tables set up +.*

94: You are flying over the ocean.
94 83 95 96 68 1 0 1
Sea weeds and kelp surge in the waves off shore here.  The ocean becomes 
much deeper +.***

95: You are flying along the coast.
94 84 86 83 68 1 0 1
The land is very low here with a river running into the sea +. There
is a wide valley opening up +. The very tip of the island is +.*

96: You are flying along the coast.
94 85 83 99 68 1 0 1
There are some secluded sandy stretches of beach here, but too many rocky
outcroppings of lava to land. There is a nicer beach ***+.

97: You are lost in a sea of fog.
97 104 97 97 97 1 0 1
What have you gotten us into?
I cant see a thing! ****

98: You are on a gravel wash.
125 126 127 128 84 0 0 0
The sound of cascading water is the background for a diluted chorus of 
gurgling, splashing, and enchantingly delicate singing. Great billows
of steam are rising *+.**

99: You are flying over a wide beach.
96 88 85 87 68 1 105 1
Unlike the leeward beaches, few coconut palms grow here but a well groomed
lawn and garden with traipsing stone walks leads down to the sand.*
There are some buildings +. Some trees are growing +.*

100: You are flying over the ocean.
100 100 87 100 68 1 0 1
The sea is a perfectly clear blue with a white sandy bottom.  No coral
grows underwater here, but the force of the waves is broken by the steep
incline.****

101: You are on a narrow strip of sand.
129 130 131 0 87 0 0 0
Rather coarse sand makes this beach very steep and only a few meters wide.
A fresh ocean breeze is rustling the ferns **+.*

102: This is Fern Canyon.
0 0 132 133 76 0 0 0
Delicate waving ferns flourish here, suckled by warm water dripping from 
every fissure and crevice in the solid rock walls.
The canyon winds **-, and -.

103: This is the front lawn.
134 135 136 137 88 0 0 0
There is a small fountain here where the driveway meets the lawn.
Across the driveway, +, is an ornate white house with and elegant 
woodworking.  The bargeboards are carved with fylfots, the ancient 
symbols of luck.  Even a bell tower has been built here.*  There is a 
road + which turns into the driveway.*

104: You have just crossed the crest of a mountain.
97 79 86 71 68 1 0 1
The fog vanished mysteriously as we flew over the crest.*
Far + I can see the ocean.**

105: You are on a sandy beach.
138 139 140 0 99 0 0 0
This is the only good beach on the weather side of the island. Fine coral
sand, a fresh sea breeze, and dramatic surf add to its appeal.**
Stone steps lead to the gardens +.*

106: You are among palm trees near the shore.
141 80 142 143 73 0 0 0
Arching coconut palms laden with fruit provide a canopy for the glistening
white sand and sparse grasses growing here. The forest grows denser +.
The ocean is +.**

107: You are walking along the beach.
144 0 145 80 73 0 0 0
The warm tropical waters nuzzle your ankles as you walk. Above is a fiercely
blue sky. The slope of the sand is so gentle that two hundred meters
offshore the water is only knee deep.** There are some rocks +.*

108: You are walking along the beach.
146 0 80 147 73 0 0 0
Many beautiful shells have been washed up here including bright yellow 
cowries, chocolate colored murex, orange conchs, striped tritons and the
deadly cone shells.****

109: You are in a papaya grove.
148 89 149 150 77 0 0 0
Green slender trees no taller than three meters bulge with their
orange succulent fruit. There are some tall trees +.***

110: You are in a field of pineapple.
89 151 152 153 77 0 0 0
The sharp dagger like pineapple leaves can pierce the flesh and hold fast
a skewered victim with tiny barbs.* The field ends +.**

111: You are in a field of kiwi plants.
149 154 155 89 77 0 0 0
Round hairy fruit hang from staked vines here. There are some trees +
and +. The field ends in a dirt road +.*

112: You are in a large grove of coconuts.
150 153 89 156 77 0 0 0
These trees are much taller than any growing near the shore plus the fat,
juicy coconuts have been selectively cultivated. The grove continues
+, +, *and +.

113: You are in the woods.
157 91 158 116 79 0 0 0
Tropical undergrowth makes the going rough here. Sword ferns give no strong
foot hold and the dangling vines would gladly throttle one. Strange cackling
noises are coming from somewhere +.***

114: You are at the shore.
91 0 159 145 79 0 0 0
Explosions of surf jetting out of underwater tunnels here make it
impossible to climb down to a small cave entrance below.  Only at rare
minus tides would it be possible to enter.***  The beach is better +.

115: You are on the coast road.
158 161 162 91 79 0 0 0
The road is beginning to turn inland.* I can here the surf +. The road
continues +.*

116: The road winds deeper into the trees.
163 142 91 164 79 0 0 0
Only narrow sunbeams filter through the foliage above. The moist rich earth
has nurtured a myriad of trees, shrubs, and flowers to grow here. The
road continues - and *- from here.*

117: This is the front porch of the bungalow.
165 92 0 0 81 0 0 0
These wooden steps and porch are very bucolic. A little woven mat on the 
doorstep reads "Don't Tread on Me". The open front door is +.
A stone walk leads to the main street +.**

118: You are on a path leading to the lagoon.
92 166 167 168 81 0 0 0
This path trampled fern, grass, sapling, and anything else that got in its
way.* The water is +.**

119: This is a dirt road.
169 118 170 92 81 0 0 0
**The road continues on - here for some distance. A village is +.

120: You are on a dirt road.
171 118 92 172 81 0 0 0
**There is a small village +. The road continues +.

121: You are on a dirt road.
173 93 174 175 82 0 0 0
The light tan soil of the road contrasts artistically with the lush green
vegetation and seering blue sky.*  There is a clearing and many people +.
The road continues - and -.

122: You are at the seaplane dock.
93 0 176 177 82 0 0 0
Several muscular, bronze skinned men greet you warmly as you pass under
a thatched shelter above the dock here. Polynesian hospitality.
There is a clearing +.* A trail runs around the lagoon + and +.

123: There are some tables on the lawn here.
121 122 123 93 82 0 0 0
Hors d'oeuvres, canapes, mixed drinks, and various narcotic drugs along with
cartons of Di Gel fill the tables to overflowing. Several other guests are
conversing and talking excitedly****.

124: You are nosing around in the bushes.
124 124 93 124 82 0 0 0
There is little here but some old beer cans. You are making fools out of
us in front of the other guests.** It would be best to go -.*

125: You are walking in a dry stream bed.
178 98 179 0 84 0 0 0
The large cobblestones are difficult to walk on. No sunlight reaches
below a white canopy of fog seemingly generated from *+.  A dirt path 
along the wash is +. A high bank is impossible to climb +.

126: You are at the thermal pools.
98 0 180 181 84 0 0 0
Several steaming fumaroles and spluttering geysers drenched by icy mountain
waters from a nearby waterfall heat half a dozen natural pools to a
delicious 42 degrees. Enchantingly beautiful singing seems to flow from the
water itself as it tumbles down the falls.*** There is a mossy entrance
to a cave +.

127: You are in the woods.
127 180 182 98 84 0 0 0
Coniferous trees girded by wild huckleberries, elderberries, salmonberries
and thimbleberries enjoy a less tropical climate here in the high mountains.
*The sound of rushing water is coming from +.**

128: You are on a dirt trail.
179 181 98 0 84 0 0 0
The trail seems to start here and head -.** High cliffs border the 
trail +.

129: You are  walking along the beach.
183 101 184 0 87 0 0 0
A rather unnerving surf explodes onto the beach here and dashes itself into
spray on the steep incline. The beach continues + and +.**

130: You are walking along the beach.
101 185 186 0 87 0 0 0
This is not a very nice beach. The coarse sand hurts my feet.****

131:You are walking through some ferns.
184 186 187 101 87 0 0 0
This is a wide field growing only ferns and small shrubs.** The 
ocean is *+.

132: You are in a narrow canyon.
0 0 188 102 76 0 0 0
The steep sides here squeeze a little freshet through a gauntlet like
series of riffles and pools.****

133: The canyon is much wider here.
0 0 102 189 76 0 0 0
The sheer rock walls rise 10 meters to the forest above. A slender 
waterfall careens away from the face of the rock high above and showers
the gravel floor with sparkling raindrops.** The canyon continues -
and -.

134: You are on the front porch of the cottage.
190 103 0 0 0 0 0 0
Several giggling native girls came running down the steps as you approached
and headed on down the road.  On the fern rimmed porch is a small table with
matching white wrought iron chairs cushioned with red velvet.  The front
door leads -.  The lawn and fountain are +.**

135: You are in a palm grove.
103 191 192 105 88 0 0 0
****

136: You are on a dirt road.
193 192 245 103 88 0 0 0
There is a large village +. The road cleaves a coconut plantation +.
A small dirt road goes -, and a drive way peals off +.

137: You are in a field of small shrubs.
184 186 103 187 88 0 0 0
**Pine and other coniferous saplings have been planted here.  The rich brown
soil is well tilled and watered.  Across a large lawn, there is a small
cottage +. I can feel a delicious sea breeze blowing from +.

138: The beach is pretty rocky here.
194 105 195 0 96 0 0 0
Dangerous surf and lava outcroppings make this a treacherous strand.
The beach is nicer* +.**

139: The beach is almost 10 meters wide here.
105 183 196 0 99 0 0 0
The sand has become more coarse and the beach steeper.* It gets 
worse +.**

140: You are in the gardens.
195 196 197 105 99 0 0 0
Lush green lawns studded with palms and benches stretch as far as the eye
can see.** A path leads -. Stone steps lead down to the beach +.

141: You are on the coast road.
198 106 163 199 73 0 0 0
The forest is dense on either side and conceals the road from anyone
approaching it.**  The road continues - and -.

142: You are in the forest.
116 107 91 106 73 0 0 0
There are trees and ferns all around.****

143: You are in the forest.
199 108 106 146 73 0 0 0
There are trees and ferns all around.****

144: You are in a copse.
142 107 145 80 0 0 0 0
This is a secret hidden thicket only noticeable from the beach. Someone
has been digging here recently.****

145: You are at the tide pools.
91 0 114 107 79 0 0 0
These rocks and pools are the home for many sea anemones and crustaceans.
**The surf is very rough +. There is a nice beach +.

146: You are in the forest.
199 108 143 0 73 0 0 0
This is a shallow depression sheltered from the wind by a thick growth of 
thorny shrubs. It looks like someone has camped here. There is a fire pit
with some dry sticks and grass nearby.* The beach is +.* The thorny
shrubs block the way -.

147: You are at the mouth of the lagoon.
200 0 108 201 74 0 0 0
The beach ends here where the coral reef rises to form a wide lagoon
bending inland. A path winds around the lagoon to the -.*
The beach continues on -. Only water lies +.

148: You are in a breadfruit grove.
202 109 203 204 77 0 0 0
The tall trees bend leisurely in the breeze, holding many round breadfruits
close to their large serrated leaves.  There are coconut palms +,
*+, and +.

149: You are in a grove of mango trees.
203 111 205 109 77 0 0 0
The juicy yellow red fruits are nearly ripe on the trees here. There are
some coconut palms +. There are some vines +. There is a road +.*

150: You are in a grove of coconut palms.
204 112 109 206 77 0 0 0
All I can see around us are palm trees.****

151: You are in a coconut grove.
110 207 208 209 77 0 0 0
There are countless trees here.****

152: You are in a field of pineapple.
154 208 210 110 77 0 0 0
The sharp leaves are cutting me to ribbons. There is a road **+.
More pineapple +.

153: You are in a coconut grove.
112 209 110 211 77 0 0 0
There is a field of pineapple **+.*

154: You are on the edge of a kiwi and pineapple field.
111 152 155 110 77 0 0 0
An irrigation ditch separates the two fields here. There is a road **+.*

155: This is a dirt road.
205 210 212 111 77 0 0 0
The road runs - and - here.**

156: You are in a palm grove.
206 211 112 213 77 0 0 0
There are palm trees all around us.****

157: You are on the edge of a small clearing.
157 113 157 157 79 0 0 0
The ground is rather marshy here and darting in and out of the many tussocks
is a flock of wild chicken like fowl.****

158: You are in the woods.
158 115 215 113 79 0 0 0
You have walked a long way and found only trees. ****

159: You are walking along the shore.
115 0 214 114 86 0 0 0
You are now about 10 meters above the surf on a gently rising cliffside.**
The land rises +. There is a beach far +.

160: You are just inside the entrance to the sea cave.
246 114 0 0 114 1 0 0
The sound of water dripping in darkness and the roar of the ocean just outside
create a very unwelcoming atmosphere inside this cave. Only on rare occasions
such as this is it possible to enter the forbidden catacombs... The cave
continues -.***

161: You are in a secret nook beside the road.
115 159 162 91 79 0 0 0
Hidden from all but the most stalwart snoopers are some old clothes, empty
beer cans and a trash baggie full of used Huggies and ordure. Lets get
back to the road +.***

162: You are on the coast road.
215 214 0 115 86 0 0 0
The road turns abruptly - here, avoiding the cliffs near the shore
+ and +.*

163: You are on a dirt road.
216 116 113 141 79 0 0 0
The roadside is choked with broad leaved plants fighting for every breath of
sunshine. The palm trees are taller than at the shore yet bend over the road 
forming a canopy. The road continues *- and *-.

164: You have discovered a hidden thicket near the road.
163 142 116 106 73 0 0 0
Stuffed into a little bundle here is a bloody silken robe and many beer cans.
*Some droplets of blood and a major spill sparkle farther +.
The road is +.*

165: You are in the living room.
0 117 217 218 0 0 0 0
A decorative entry with fresh flowers and wall to wall carpeting leads into
the living room here where a couch and two chairs converse with an end table.
*The exit is +.* The bedroom is +.

166: You are at the lagoon.
118 0 167 168 81 0 0 0
There are several outrigger canoes pulled up on a small beach here and a
catch of colorful fish is drying in the sun. There are paths leading 
off -*, -, and -.

167: You are at the lagoon.
118 0 170 166 81 0 0 0
This is a grassy little spot near the water. A sightly native girl is frolicing
in the water close to shore here.** The path continues - and -. 

168:You are at the lagoon.
118 0 166 172 81 0 0 0
The path meanders through tussocks of grass, ferns, and thorny bushes here
and continues on **- and -.

169: You are in the woods.
219 119 220 92 81 0 0 0
There are plenty of ferns and thorny bushes here! ****

170: You are on a dirt road.
220 167 199 119 74 0 0 0
The road winds rather close to a large lagoon here and many sedges and tall
grasses line the shoulder *+. The road continues - and -.

171: You are in the woods beside the road.
221 120 92 222 81 0 0 0
The forest grows darker +. The road is +.**

172: The road crosses the lagoon here.
222 0 120 174 81 0 0 0
Coursing through the trees, the road at this point bridges a watery finger
of the lagoon.* The water is +. The road continues - and -.

173: You are in a coconut palm grove.
223 121 224 225 82 0 0 0
The tall palms are planted about 30 feet apart with a hardy deep green grass
filling the spaces in between.  There are tire tracks through the grass. The
grove continues -. There is a road +.**

174: You are walking along a dirt road.
224 176 172 121 82 0 0 0
You are nearing the lagoon.** The road continues - and -.

175: You are on a dirt road.
225 177 121 226 82 0 0 0
The road turns abruptly - here, entering a grove of palm trees.* The road
also continues - toward the lagoon.*

176: You are on a trail running around the lagoon.
172 0 0 122 82 0 0 0
The dark waters brush the trail here and the path crosses a bridge +.
There is deep water + and +. The trail continues -.

177: This is the mouth of the lagoon.
175 0 122 227 82 0 0 0
The coral reef wraps around a natural bay here to create a wide lagoon which
winds tortuously inland.** A trail goes around the lagoon +. The beach
is +.

178: You are in a dry stream bed.
0 125 0 0 84 0 0 0
The dry wash drains over a tall precipice here into a turbid morass below. The
most noisome stench imaginable is wafting up to defile our nostrils. Above,
the lurid sun glows brown through a strange mist.* The only direction 
I'm going is -.**

179: You are on a dirt path along the wash.
0 128 125 228 84 0 0 0
This path looks more like a deer trail. It scampers away ***+.

180: The thermal pools flow into a stream here.
127 0 229 126 84 0 0 0
The gurgling hot waters pour over boulders into a swiftly flowing
stream **+. The pools are +.

181: You are at the entrance to a cave.
128 230 126 0 84 0 0 0
A tall narrow fissure in the rock cliffs here has become a well traveled
passage way. A hoof beaten dirt path leads directly into it. A curl of
steam is trailing from a corner of the fissure's gaping mouth. The path
leads - and -. The pools are +.*

182: You are in the woods.
182 229 182 127 84 0 0 0
Wild berry bushes plump with fruit and thorns tangle your every effort to
proceed.* The sound of rushing water is +.**

183: You are walking along the beach.
139 129 184 0 99 0 0 0
Some dunes here progress inland and make it impossible to get very far in that
direction. The beach continues - and -.* The ocean is +.

184: You are in the dunes.
183 101 184 129 87 0 0 0
The endless rolling and pitching sand dunes are enough to make one very queasy!
The only way I'm going is ***+.

185: This is a lousy beach.
130 0 0 0 87 0 0 0
Volcanic and viciously sharp bitted grains of sand here bite like cold steel
into my tender feet. I refuse to continue on. Let's get out of here. The
beach is better +.***

186: You are in a field of sparse ferns.
131 185 187 130 87 0 0 0
The lava rock outcroppings here will support few plants. There is more 
vegetation +. There is a nice beach +.* The ocean is +.

187: You are in the woods.
131 131 137 131 87 0 0 0
Young trees and tall shrubs grow densely together at this distance from the 
shore.** The trees grow thicker +.*

188: The canyon is no wider than a foot here.
0 0 0 132 0 0 0 0
The freshet is gushing through the narrow trough, but the canyon has grown
too narrow to follow it any farther.*** I guess we'll have to go -.

189: You are in a narrow part of the canyon.
0 0 133 232 76 0 0 0
The two sheer sides are no more than a few meters apart here. There is a stone
door in the wall +. The gravelly floor runs with tiny rivulets seeping 
from the ground itself.* The canyon continues - and -.

190: You are in the drawing room.
0 134 0 0 0 0 0 0
Exquisitely decorated with plants and antique furniture of superb
craftsmanship, the parlor reflects its owners impeccable taste.  The tropical
sun is streaming in through open shutters *+.  There doesn't seem 
to be anybody around.  A large immaculate oaken desk is visible in the
study and it even has a old fashioned telephone to complete the decor.**

191: You are in a palm grove.
135 191 233 191 88 0 0 0
Grassy rows of palms stretch as far as I can see.** There is a road +.*

192: You are on a dirt road.
136 233 234 135 88 0 0 0
The road winds through a coconut palm grove here. It continues on - 
and -.**

193: The road leads to several large buildings here.
235 136 236 237 88 0 0 0
There is a clubhouse +,* a large barn and stable +, and a garage of 
similar construct to the barn +.

194: This part of the beach is impassable.
0 138 0 0 96 0 0 0
The huge rocks and thunderous surf here would pound our frail bodies to pulp
in an instant.* The only direction I'm going is -.**

195: You are in the gardens.
195 140 197 138 96 0 0 0
So much green grass is a pleasure to the eyes.****

196: You are in the gardens.
140 183 197 139 99 0 0 0
Beautiful flowers and shrubs surround a little goldfish pond.****

197: You are on a stone walk in the garden.
195 196 238 140 99 0 0 0
The walk leads to a road **+.*

198: You are in the forest near the road.
198 141 216 198 73 0 0 0
There are many thorny bushes here!****

199: You are at a fork in the road.
239 146 141 170 73 0 0 0
Two roads come together in the forest here. One runs -,* the other 
runs - and -.

200: You are on a dirt path around the lagoon.
170 147 146 0 74 0 0 0
The still waters reflect bending palms and a cloudless sky. It looks like
the path runs into a clearing +. The path continues -.**

201: You are drowning in the lagoon.
201 201 147 201 74 0 0 0
I suggest you get out before you become waterlogged.****

202: You are in a coconut palm grove.
202 148 203 204 77 0 0 0
****

203: You are in a palm grove.
202 149 205 148 77 0 0 0
****

204: You are in a palm grove.
202 150 148 206 77 0 0 0
****

205: You are on a dirt road.
203 155 212 149 77 0 0 0
*This road ends here at a palm grove but continues on - for quite
some way.**

206: You are in a coconut palm grove.
204 156 150 213 77 0 0 0
****

207: You are in a coconut grove.
151 219 208 209 77 0 0 0
*The grove ends +.**

208: You are in a coconut grove.
152 207 239 151 77 0 0 0
**There is a dirt road +.*

209: You are in a coconut grove.
153 207 151 211 77 0 0 0
****

210: This is a dirt road.
205 239 212 154 77 0 0 0
The road continues - and -.**

211: You are in a coconut grove.
153 209 153 213 77 0 0 0
****

212: You are in the woods near the road.
205 210 212 155 77 0 0 0
There are many thorny bushes here!****

213: You are in a coconut grove.
213 213 156 234 88 0 0 0
***The grove ends in a clearing +.

214: You are walking along some high cliffs.
162 0 0 159 86 0 0 0
The island bends sharply + here with high cliffs -
and -. The cliffs are lower +.

215: You are at the coast road turn around.
0 162 0 158 90 0 0 0
The coast road ends here in a lookout with a view of 100 kilometers of blue
sea and 100 meters of rugged cliff. Far below the waves crash against rocks.
****

216: You are in the woods near the road.
216 163 216 198 79 0 257 0
These thorny bushes are killing me.****

217: You are in the kitchen.
0 0 0 165 0 0 0 0
A small gas stove and a refrigerator are all the only appliances here. The
gas oven has been left on and the whole room is reeking with natural gas.
One spark from a match and.... The door out is ***+.

218: You are in the bedroom.
0 0 165 0 0 0 0 0
A soft feather comforter on top of layers of Answer blankets make this a very
luxurious place to sleep indeed. There are also some end tables and a dresser
here.** The living room is +.*

219: You are in the woods.
207 169 220 221 81 0 0 0
There seems to be a clearing +.***

220: You are in the woods near the road.
219 170 239 169 81 0 0 0
*As far as I can tell, there are two roads + and +.*

221: You are in the woods.
207 171 219 222 81 0 0 0
The forest is clearer +.***

222: You are on the lagoon's inland finger.
0 172 171 172 81 0 0 0
It is impossible to follow the lagoon any farther inland because of sharp
and very painful sedges.* The road is +.**

223: You are in a grassy coconut grove.
240 173 224 241 82 0 0 0
The tall palms provide a perfect canopy for the lush green grass.***
There is a road +.

224: You are near the lagoon's inland finger.
0 174 0 173 82 0 0 0
Very sharp sedges make it impossible to follow the lagoon any farther inland.
*There is a road +.**

225: You are on a dirt road.
241 175 173 226 82 0 0 0
The road winds through a coconut grove here and continues - and -.**

226: You are in the woods near the road.
226 226 175 226 82 0 0 0
**The road is +.*

227: This is a beach?
227 227 177 0 82 0 0 0
Hard jagged rocks that pierce with every footstep hardly comprise a beach.**
Let's go -.*

228: The trail is lost in the woods here.
241 241 179 241 84 0 0 0
I suppose the animals that use this trail all depart in different directions
when they get this far into the woods.** The trail goes -.*

229: You are on the bank of a stream.
182 0 242 180 84 0 0 0
The stream falls over several small boulders here and continues on **-.*

230: You are just inside the cave.
181 267 0 0 0 0 0 0
A steamy hot breath is belching from the depths of the earth within.* The
cave  continues -.**

231: You are just inside the cave entrance.
274 0 0 0 0 0 0 0
The air is hot and sticky inside. The cave continues -. There is a 
stone door in the wall +.  A wooden sign in the dust reads in old elven
runes, "GSRF KDIRE NLVEMP!".**

232: You are at the edge of a huge chasm.
0 0 189 0 76 0 0 0
Several hundred feet down I can see the glimmer of placid water. The
rivulets drain over the edge and trickle down into the depths. It is 
impossible to climb down without a rope.** The canyon continues -.*

233: You are on a dirt road.
192 241 240 191 88 0 0 0
The road winds through a coconut grove here. The road continues on -
and -.**

234: You are in a coconut palm grove near the road.
193 233 213 192 88 0 0 0
***The road is +.

235: You are at the clubhouse.
0 193 0 0 0 0 0 0
The clubhouse is built over the most inland part of the lagoon.  Tropical
bananas and fragrant frangipani grow along the grassy shore.  Walking across
the short wooden bridge, we enter.  Along one wall is a bar with only a few
people seated at it.  The restaurant and dance floor are closed off with
a 2 inch nylon rope. ****

236: You are in the stables.
0 0 0 193 0 0 0 0
Neighing horses snacking on hay and oats fill the stalls on both sides of
the barn.  It is rather warm in here but that is not the most offensive
part.  The old boards of the barn part just enough to let in dust laden
shafts of light.  Flies swarm overhead and strafe the ground for dung.
My nose is beginning to itch. ****

237: You are in the old garage.
0 0 193 0 0 0 0 0
This is an old wooden building of the same vintage as the stables.  Beneath
a sagging roof stand gardening tools and greasy rags.  Parked in the center
is an underpowered Plymouth Volare' with a red and white striped golf cart
roof. ****

238: You are on a dirt road.
197 197 243 197 85 0 0 0
The road leads to a beautiful formal garden laced with stone walks and tropical
flowers and trees.** The road continues -. A walk leads -.

239: You are on a dirt road.
210 199 198 220 73 0 0 0
The road runs - and -.**

240: You are in a coconut grove near the road.
234 223 234 233 88 0 0 0
***The road is +.

241: You are on a dirt road.
233 225 223 226 82 0 0 0
The road continues - and -.**

242: The stream plummets over a cliff here.
182 0 0 229 84 0 0 0
Falling 10 agonizing meters into spray, only droplets of the stream are
left to dance off the floor below.  I thought I saw a sparkle of gold
at the bottom of the falls, but now it is gone.  There is no way down,
even with a strong rope. ****

243: You are on a dirt road.
0 0 244 238 85 0 0 0
**The road continues - and -.

244: You are on a dirt road.
0 245 0 243 88 0 0 0
*The road continues -* and -.

245: You are on a dirt road.
244 234 213 136 88 0 0 0
The road goes -* and *-.

246: You are in a low passage.
247 160 0 0 0 0 0 0
The passage is partially flooded here and it may be hazardous to proceed.
Water is surging from the tunnel and heading out to sea. Strange moaning
noises rise above the rushing of the water.  They are as thin as a whispering
wind yet penetrate to my very soul.  I think we have come too far...
The passage continues -.***

247: The walls are very close together here.
248 0 0 0 0 0 0 0
I can barely squeeze through the jagged opening. Slimy sea weeds provide
no footing at all. This tunnel seems to be an ancient lava tube. There is
a large room -.***

248: You are in the cathedral room.
249 251 249 251 0 0 0 0
Your light casts ghostly shadows on the walls but cannot pierce the 
engulfing darkness overhead. The sound of water dripping echoes in the void.
*I can see no passages leading out of this room.  We have definitely
come too far.*** 

249: You are walking through a very round tunnel.
252 0 0 0 252 1 0 0
The round walls of this tunnel are amazingly smooth to the touch. A little
trickle of water flows down the center. The tunnel climbs steadily +.
The cave is beginning to flood again!  Let's get out of here! ***

250: You are in the cathedral anteroom.
0 0 0 248 253 1 0 0
This small chamber with a flat stone floor is to one side of the cathedral 
room. We appear to be at the bottom of a tall narrow shaft. There are many 
puddles of water here. A staircase hewn from solid rock and black lava 
leads up.*** The cathedral room is +.

251: You are in a wide chamber.
0 0 248 254 0 0 0 0
Water is sprinkling from the ceiling here. A shallow pool populated by a 
myriad of blind white creatures sparkles in your light. Tiny shrimp and
crabs scurry away, frightened by the blinding rays.** The cave 
continues - and -.

252: You are at the top of a sloping passage.
0 0 255 256 257 1 0 0
There is much algae growing here, both green and brown specimens. 
Water from an underground sea surges and splashes against the slope of
the rock. The walls glisten with shiny minerals.  High above, light
filters in through a narrow shaft.**  A hallway here runs -
and -.

253: You are in an elaborately tiled room.
0 0 258 0 0 0 250 0
Large colorful tiles plate the floor and walls.  The ceiling is a mosaic
of gems set in gold.  Hopefully it is only our footsteps that are echoing in
this hollow chamber.** The room continues -.  A stone staircase
leads down.*

254: You are at a dead end.
0 0 251 0 0 0 0 0
The walls here are alive with dark mussels.  They click their shells menacingly
if we disturb them. ** The only exit is +.*

255: The tunnel is very low here.
0 0 259 252 0 0 0 0
I practically have to crawl on my knees to pass through this opening. The
air is stiflingly damp, but I can't hear any sounds of water dripping.**
The crawlspace continues -. The tunnel seems wider +.

256: This is the supply room.
0 0 252 0 0 0 0 0
Picks and shovels line the walls here, as well as hard hats, boxes of
dynamite, and a cartload of very high grade gold and silver ore.** 
A tunnel leads off +.*

257: You have found a secret entrance to the catacombs.
0 0 0 0 216 1 252 0
I have a sickening feeling that we should not have entered the catacombs.
Below is a wet, seaweed covered floor. Above is a way out. ****

258: You are in the catacombs.
0 0 260 253 0 0 0 0
Ornate tombs and piles of treasure line the walls.  Long spears with many
blades, fine swords and coats of mail, heaps of coins, jewelry, pottery, 
and golden statues are tribute of past kings and queens.** The catacombs
continue - and -.

259: You are crawling on your stomach.
0 0 261 255 0 0 0 0
The passage is quite narrow and jagged, but the rock is no longer lava.
It appears to be a form of granite.** The crawlspace continues -, 
but I would just as soon go -.

260: You are in the Sepulcher.
0 0 0 258 0 0 0 0
A single tomb is here.  Encrusted with diamonds and opals, and secured with 
straps of a very hard, untarnished silver, this tomb must be of a great king.
Vases overflowing with gold coins stand nearby.  A line of verse on the wall
reads, "Three he made and gave them to his daughters."****

261: The passage is wider here.
0 0 0 259 0 0 0 0
You are at the top of a flooded shaft.  About a meter below the edge,
dark water rises and falls to the rhythm of the sea.  A ladder goes
down into water here.***  A small crawlspace goes -.

262: You are at the bottom of a ladder.
0 0 0 0 261 1 263 0
This is a narrow platform to rest on before we continue either up or down this
rickety wooden ladder.****

263: You are standing in several inches of water.
264 0 265 266 262 1 0 0
This seems to be a working mine. Many different tunnels wander off following
glowing veins of precious metal.  The floor is flooded here since we must
be nearly at sea level.  A ladder leads up. ****

264: The tunnel here is blocked by broken rocks.
0 263 0 0 0 0 0 0
The way is blocked, but if you had some dynamite, we might be able to blast our
way through.*  The passage goes -.**

265: The tunnel is too flooded to proceed.
0 0 0 263 0 0 0 0
Hidden shafts could swallow us if we tried to continue on down this tunnel.
The flooding is already up to my waist.  Large crystals overhead shimmer
rainbows of reflected light.***  Let's go -.

266: The mine is less flooded here.
0 0 263 0 0 0 0 0
A meandering gold laden vein of quartz and blooming crystals of diamonds
and topaz burst from the walls of the cave.  A passage goes -.***

267: You are inside the cave.
230 268 0 0 0 0 0 0
A hot steam swirls around our heads, and the walls are warm to the touch.
The trail winds + and +.**

268: You are in a rather large chamber.
267 0 0 269 0 0 269 0
Beds of ferns and palm leaves make several cozy nests along the walls. In the
center of the room is a throne of gold and silver which pulls out into a bed
of enormous size.***  A passageway leads down to the -.

269: You are walking along the edge of a huge abyss.
0 0 268 0 268 1 270 0
Steam is rising in great clouds from the immeasurable depths.  A very narrow
trail winds down.**  There is a tunnel +.*

270: You are on the edge of a huge abyss.
0 0 0 0 269 1 271 0
The trail winds farther down.****

271: You are winding your way along the abyss.
0 0 0 0 270 1 272 0
The trail continues up and down.****

272: You are on a wide shelf near the steamy abyss.
0 273 0 0 271 1 0 0
The stifling hot cave seems even hotter to me, staring down into this misty 
abyss.  A trail winds up.*  A passageway leads -.**

273: You are in a wide tunnel leading to a fuming abyss.
272 274 0 0 0 0 0 0
The passageway winds through many beautiful formations of crystals and
sparkling minerals.  The tunnel continues - and -.**

274: You are in a tunnel.
273 231 0 0 0 0 0 0
It is very warm in here.  The smell of steam and hot rocks permeates the place.
The cave continues - and -.**

275: You are at the bottom of a pit.
0 0 0 0 232 0 0 0
I can see daylight far up at the mouth of the pit.   A cool draft wafts down.
There doesn't seem to be any way out, and I don't remember how we came in.
If you had a rope it might be possible to climb out. ****

SHAR_EOF
if test 49543 -ne "`wc -c battlestar/dayfile`"
then
echo shar: error transmitting battlestar/dayfile '(should have been 49543 characters)'
fi
#	End of shell archive
exit 0

yee@ucbvax.ARPA (Peter E. Yee) (01/24/85)

This is part 2 of the BATTLESTAR distribution.

#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
-----cut here-----cut here-----cut here-----cut here-----
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	battlestar/nightfile
# This archive created: Wed Jan 23 19:53:04 1985
cat << \SHAR_EOF > battlestar/nightfile
@(#)nightfile	1.2 11/28/84
1: You are in the main hangar.
5 2 9 3 3 1 0 0
This is a huge bay where many fighters and cargo craft lie.  Alarms are 
sounding and fighter pilots are running to their ships.  Above is a gallery
overlooking the bay. The scream of turbo engines is coming from +. The rest
of the hangar is +. There is an exit +.*

2: This is the landing bay.
1 0 10 0 0 0 0 0
Ships are landing here, some heavily damaged. Enemy fighters continually
strafe this vulnerable port. The main hangar is +, *
There is an exit +.*

3: You are in the gallery.
4 0 0 0 0 0 1 0
From here a view of the entire landing bay reveals that our battlestar
is near destruction. Fires are spreading out of control and laser blasts
lick at the shadows. The control room is +. ***

4: You are in the control room.
0 3 0 0 0 0 5 0
Several frantic technicians are flipping switches wildly but otherwise
this room seems fairly deserted.  A weapons locker has been left open.
A staircase leads down. * There is a way -. **        

5: This is the launch room.
6 1 7 0 4 1 0 0
From the launch tubes here fighters blast off into space. Only one is left,
and it is guarded by two fierce men. A staircase leads up from here.
There is a cluttered workbench +. From the main hangar come sounds of great
explosions.  The main hangar is +. The viper launch tubes are to the -.*

6: You are at the workbench.
0 5 7 0 0 0 0 0
Strange and unwieldy tools are arranged here including a lunch box 
and pneumatic wrenches and turbo sprocket rockets.*
The launch room is +. The remaining viper is +.*

7: You are in the viper launch tube.
0 5 0 5 32 0 0 0
The two guards are eyeing you warily! ****

8: This is a walk in closet.
22 0 0 0 0 0 0 0
A wardrobe of immense magnitude greets the eye.  Furs and robes of kings
hang on rack after rack.  Silken gowns, capes woven with spun gold, and 
delicate synthetic fabrics are stowed here.  The bedroom is +.***

9: You are in a wide hallway leading to the main hangar.
0 0 11 1 0 0 0 0
The walls and ceiling here have been blasted through in several places.
It looks as if quite a battle has been fought for possession of the landing bay
Gaping corpses litter the floor.**  The hallway continues +.
The main hangar is +.

10: You are in a wide hallway leading to the landing bay.
0 0 12 2 0 0 0 0
Most of the men and supplies needed in the main hangar come through this
corridor, but the wounded are forced to use it too. It very dank and
crowded here, and the floor is slippery with blood.**
The hallway continues -. The landing bay is +.

11: The hallway is very congested with rubble here.
0 0 0 9 13 1 0 0
It is too choked with broken steel girders and other debris to continue
on much farther. Above, the ceiling has caved in and it is possible to 
climb up. There is not much chance to go -, -, or -.
But the hallway seems clearer +.

12: A wide hallway and a more narrow walkway meet here.
14 15 0 10 0 0 0 0
The intersection is crowded with the many wounded who have come up
the wide hallway and continued +. The walkway is less crowded +.
The wide hallway goes *-.

13: You are in what was once an elegant stateroom.
16 0 0 0 0 0 11 0
Whoever lived in this stateroom, he and his female companion
were mercilessly slain in their sleep. Clothes, trinkets and personal
belongings are scattered all across the floor. Through a hole in the
collapsed floor I can see a hallway below.  A door is +.***

14: You're at the entrance to the sick bay.
17 12 18 0 0 0 0 0
The wounded are entering the sick bay in loudly moaning files.
The walkway continues - and +. A doctor is motioning for you to 
come to the -. *

15: You're in the walkway.
12 19 0 0 0 0 0 0
Most of the men and supplies were coming from the armory. The walkway
continues -. The armory is +.**

16: These are the executive suites of the battlestar.
20 13 21 22 23 1 24 0
Luxurious staterooms carpeted with crushed velvet and adorned with beaten
gold open onto this parlor. A wide staircase with ivory banisters leads
up or down. This parlor leads into a hallway +. The bridal suite is +.
Other rooms lie - and +.

17: You're in a long dimly lit hallway.
0 14 25 0 0 0 0 0
This part of the walkway is deserted. There is a dead end +. The
entrance to the sickbay is +. The walkway turns sharply -.*

18: This is the sick bay.
0 0 0 14 0 0 0 0
Sinister nurses with long needles and pitiful aim probe the depths of suffering
here. Only the mortally wounded receive medical attention on a battlestar,
but afterwards they are thrown into the incinerators along with the rest.**
Nothing but death and suffering +.  The walkway is +.

19: You're in the armory.
15 26 0 0 0 0 0 0
An armed guard is stationed here 365 sectars a yarn to protect the magazine.
The walkway is +. The magazine is +.**

20: The hallway ends here at the presidential suite.
27 16 0 0 0 0 0 0
The door to this suite is made from solid magnesium, and the entryway is
inlaid with diamonds and fire opals. The door is ajar +. The hallway
goes -.**

21: This is the maid's utility room.
0 0 0 16 0 0 0 0
What a gruesome sight! The maid has been brutally drowned in a bucket of
Pine Sol and repeatedly stabbed in the back with a knife.***
The hallway is +.

22: This is a luxurious stateroom.
0 8 16 0 0 0 0 0
The floor is carpeted with a soft animal fur and the great wooden furniture
is inlaid with strips of platinum and gold.  Electronic equipment built
into the walls and ceiling is flashing wildly.  The floor shudders and
the sounds of dull explosions rumble though the room.  From a window in
the wall + comes a view of darkest space.  There is a small adjoining
room +, and a doorway +.*

23: You are at the entrance to the dining hall.
0 0 28 0 0 0 16 0
A wide staircase with ebony banisters leads down here.**
The dining hall is to the -.*

24: This was once the first class lounge.
0 0 29 0 16 1 0 0
There is much rubble and destruction here that was not apparent elsewhere.
The walls and ceilings have broken in in some places. A staircase with
red coral banisters leads up. It is impossible to go - or -.
It seems a little clearer +.*

25: You are in a narrow stairwell.
0 17 0 0 30 1 0 0
These dusty and decrepit stairs lead up.  There is no way -.  The
hallway turns sharply -.**

26: You are in the magazine.
19 0 0 0 0 0 0 0
Rows and rows of neatly stacked ammunition for laser pistols and grenade
launchers are here. The armory is +.***

27: You're in the presidential suite.
0 20 0 0 0 0 0 0
Apparently the president has been assassinated. A scorched figure lies
face downward on the carpet clutching his chest.*
The hallway leads -.**

28: You are in the dining hall.
0 30 31 23 0 0 0 0
This was the seen of a mass suicide. Hundreds of ambassadors and assorted
dignitaries sit slumped over their breakfast cereal. I suppose the news
of the cylon attack killed them. There is a strange chill in this room.  I
would not linger here. * The kitchen is +. Entrances + and +.

29: The debris is very thick here.
0 11 0 24 0 0 0 0
Broken furniture, fallen girders, and other rubble block the way.
There is not much chance to continue -, -, or -.
It would be best to go -.

30: You are in the kitchen.
28 0 0 0 0 0 0 0
This room is full of shining stainless steel and burnished bronze cookware. An 
assortment of tropical fruits and vegetables as well as fine meats and cheeses 
lies on a sterling platter. The chef, unfortunately, has been skewered like a 
side of beef. The dining room is +. ** There is a locked door +.

31: You are in an arched entry leading to the dining room.
0 0 0 28 0 0 0 0
The door leading out is bolted shut from the outside and is very strong.***
The dining room is +.

32: You are in space.
33 34 35 36 37 1 33 1
****

33: You are in space.
38 32 39 40 41 1 42 1
****

34: You are in space.
32 44 45 46 47 1 48 1
****

35: You are in space.
40 45 49 32 50 1 51 1
****

36: You are in space.
41 46 32 52 53 1 54 1
****

37: You are in space.
42 47 50 53 55 1 32 1
****

38: You are in space.
43 48 51 54 32 1 56 1
****

39: You are in space.
57 33 40 41 42 1 43 1
****

40: You are in space.
39 35 57 33 58 1 59 1
****

41: You are in space.
39 36 33 59 60 1 61 1
****

42: You are in space.
39 37 58 60 62 1 33 1
****

43: You are in space.
39 38 59 61 33 1 63 1
****

44: You are in space.
34 64 45 46 47 1 48 1
****

45: You are in space.
35 44 49 34 50 1 51 1
****

46: You are in space.
36 44 34 52 53 1 54 1
****

47: You are in space.
37 44 50 53 55 1 34 1
****

48: You are in space.
38 44 51 54 34 1 56 1
****

49: You are in space.
49 49 52 35 49 1 49 1
****

50: You are in space.
58 47 49 37 55 1 35 1
****

51: You are in space.
59 48 49 38 35 1 56 1
****

52: You are in space.
52 52 36 49 52 1 52 1
****

53: You are in space.
60 46 37 52 55 1 36 1
****

54: You are in space.
61 48 38 52 36 1 56 1
****

55: You are in space.
62 55 55 55 56 1 37 1
****

56: You are in space.
56 56 56 56 38 1 55 1
****

57: You are in space.
65 39 57 57 57 1 57 1
****

58: You are in space.
39 50 49 42 62 1 40 1
****

59: You are in space.
39 51 49 43 40 1 63 1
****

60: You are in space.
39 53 43 59 62 1 41 1
****

61: You are in space.
39 54 43 59 41 1 56 1
****

62: You are in space.
39 55 62 62 56 1 42 1
****

63: You are in space.
39 56 35 36 43 1 55 1
****

64: You are in space.
44 66 66 66 66 1 66 1
****

65: You are in space.
67 57 67 67 67 1 67 1
****

66: You are in space.
64 68 68 68 68 1 68 1
****

67:You are orbiting a small blue planet.
67 67 67 67 65 1 69 1
****

68: You are orbiting a tropical planet.
68 68 68 68 66 1 70 1
****

69: You are flying through a dense fog.
69 69 69 69 69 1 69 1
A cold grey sea of mist is swirling around the windshield and water droplets
are spewing from the wingtips. Ominous shadows loom in the darkness and it
feels as if a trap is closing around us. I have lost all sense of direction.
****

70: You are approaching an island.
71 72 73 74 68 1 0 1
Feather palms outlined by mellow moonlight and a silvery black ocean line
the perimeter of the island.  Mighty mountains of emerald and amethyst rise
like jagged teeth from black gums.  The land rises sharply +.  The shore
line stretches on *+.*

71: You are flying over a mountainous region.
75 73 76 77 68 1 0 1
Below is a shadow filled canyon with luminous waterfalls plummeting down beyond sight and looming spires and pinnacles.  **The ocean is +.*

72: You are flying over the ocean.
74 78 78 78 68 1 0 1
You bank over the water and your wingtips dip low to the green waves.  The
sea is very shallow here and the white coral beds beneath us teem with 
shadowy fish.****

73: You are flying over the beach.
71 72 79 74 68 1 80 1
A warm gentle surf caresses the beach here. The land rises
sharply +.* The beach is lost in low cliffs +.*

74: You are flying over a large lagoon.
81 72 73 82 68 1 0 1
The water's brink winds tortuously inland.  There are some lights +.***

75: You are flying over a gently sloping plane.
83 71 84 85 68 1 0 1
The ground appears to be choked with vegetation.*  The terrain is more
rugged +.**

76: You are flying through a gorge.
0 0 86 71 68 1 102 1
This is a narrow, steep sided canyon lined with plants.  The stars above
glisten through the over hanging trees.  The gorge leads to the
sea** +, and to a tumultuous origin +.

77: You are flying over a plantation.
85 81 71 88 68 1 89 1
It might be possible to land here, but not in the dark.*  There are some lights
+ and *+.

78: You are over the ocean.
72 78 79 74 68 1 0 1
The deep green swells foam and roll into the shore **+*.

79: You are flying along the coast.
86 72 90 73 68 1 91 1
The coastline here is very rocky. The surf in some places is violent
and explodes in a shower of sparkling, moonlit spray. ****

80: This is a beautiful coral beach.
106 0 107 108 73 0 0 0
Fine silver sand kissed lightly by warm tropical waters and illuminated
by a huge tropical moon stretches at least 30 meters inland.
Gently swaying palm trees are +.***

81: You are flying over a small fishing village.
77 74 71 82 68 1 92 1
A few thatched huts lit with torches and bonfires line a road below.
The road continues on ***+.

82: You are flying over a clearing.
88 72 74 87 68 1 93 1
There is a dock here (big enough for a seaplane) leading to a clearing.
The still waters of the lagoon reflects our orange turbo thrusters.****

83: You are flying over the shore.
94 75 95 96 68 1 0 1
Rocky lava flows have overtaken the beach here.****

84: You are flying in a wide valley.
95 97 86 75 68 1 98 1
This is a shallow valley yet the floor is obscured by a thick mist.
The valley opens into blackness +. The mist grows thicker +.**

85: You are flying near the shore.
96 77 75 99 68 1 0 1
Very tall trees growing in neatly planted rows march off from the 
water here towards the hills and down to the flat lands *+.**

86: You are flying around the very tip of the island.
95 79 90 84 68 1 0 1
Sheer cliffs rise several hundred feet to a tree covered summit. Far below,
the grey sea gnaws voraciously at the roots of these cliffs. The island bends
around +** and +.

87: You are flying along the coastline.
99 82 88 100 68 1 101 1
This is a narrow strip of sand lined with very few trees. The stars above
flicker through wisps of clouds.  The beach continues on -.* There
are some lights +.*

88: You are flying over several cottages and buildings
99 82 77 87 68 1 103 1
Directly below is small ornate house lit up with spot lights and decorative
bulbs.  A bell tower and a spurting fountain are nearby.  Small dirt roads go
+ and +.**

89: You are in a field of sugar cane.
109 110 111 112 77 0 0 0
These strong, thick canes give little shelter but many cuts and scrapes.
There are some large trees ***+.

90: You are flying over the ocean.
95 78 90 86 68 1 0 1
The water is a placid ebony.****

91: You are on the coast road.
113 114 115 116 79 0 0 0
The road winds close to the shore here.  The trees on either side press close
in the darkness and seem to be watching us.**  The road continues -
and -.

92: You are on the main street of the village.
117 118 119 120 81 0 0 0
The natives are having a festive luau here.  Beautiful dancers gyrate in the
torchlight to the rhythm of wooden drums.  A suckling pig is sizzling in a
bed of coals and ti leaves are spread with poi and tropical fruits.  Several
natives have come over to you and want you to join in the festivities.
There is a light burning in a bungalow +.***

93: You are at the sea plane dock.
121 122 123 124 82 0 0 0
The clearing is deserted.  The grass is wet with the evening dew +.*
There is something set up +.*

94: You are flying over the ocean.
94 83 95 96 68 1 0 1
The black waves surge off shore here.  The ocean becomes much calmer +.***

95: You are flying along the coast.
94 84 86 83 68 1 0 1
The land is very low here with a river running into the sea +. There
is a wide valley opening up +, but a strange mist is flowing out of it.
The very tip of the island is +.*

96: You are flying along the coast.
94 85 83 99 68 1 0 1
The coast here is cluttered with rocky outcroppings.****

97: You are lost in a sea of fog.
97 104 97 97 97 1 0 1
What have you gotten us into?
I cant see a thing! ****

98: You are on a gravel wash.
125 126 127 128 84 0 0 0
It is very dark here.  A cool breeze is blowing from +.  No moonlight can
reach below a thick canopy of fog above.  The sound of cascading water is
coming from +.**

99: You are flying over a wide beach.
96 88 85 87 68 1 105 1
There are some lighted buildings *+.  Some trees are growing +.*

100: You are flying over the ocean.
100 100 87 100 68 1 0 1
The black waves surge and splash against the rocky shore.****

101: You are on a narrow strip of sand.
129 130 131 0 87 0 0 0
Rather coarse sand makes this beach very steep and only a few meters wide.
A fresh ocean breeze is rustling the ferns **+.*

102: This is Fern Canyon.
0 0 132 133 76 0 0 0
Delicate waving ferns flourish here, suckled by warm water dripping from 
every fissure and crevice in the solid rock walls.  The stars above sparkle
through a thin mist.  The canyon winds **-, and -.

103: This is the front lawn.
134 135 136 137 88 0 0 0
There is a small fountain lighted with green and yellow bulbs here where
the driveway meets the lawn.  Across the driveway, +, is an ornate white
house lit with gas lamps.  A bell tower here is awash in pale blue.*  There
is a road + which turns into the driveway.*

104: You have just crossed the crest of a mountain.
97 79 86 71 68 1 0 1
The fog vanished mysteriously as we flew over the crest.*
Far + I can see the ocean sparkling in the moonlight.**

105: You are on a sandy beach.
138 139 140 0 99 0 0 0
Fine coral sand, a fresh sea breeze, and dramatic surf add to this beach's
appeal.**  Stone steps lead to a lighted path in the gardens +.*

106: You are among palm trees near the shore.
141 80 142 143 73 0 0 0
Arching coconut palms laden with fruit provide a canopy for the glistening
white sand and sparse, dew covered grasses growing here. The forest grows
denser +.  Crickets are chirping loudly here.  The ocean is +.**

107: You are walking along the beach.
144 0 145 80 73 0 0 0
The warm tropical waters nuzzle your ankles as you walk. Above is a gorgeous
starscape.  The battlestar must be up there somewhere.  The slope of the sand
is so gentle that the surf only slides up the sand.** There are some rocks
+.*

108: You are walking along the beach.
146 0 80 147 73 0 0 0
The tide is out very far tonight, and it is possible to explore hidden rocks
and caves not ordinarily accessible.  Rich beds of seaweed have been exposed
to the cool night air.****

109: You are in a papaya grove.
148 89 149 150 77 0 0 0
Slender trees with their large seven lobed leaves bulge with succulent fruit.
There are some tall trees +.***

110: You are in a field of pineapple.
89 151 152 153 77 0 0 0
The sharp dagger like pineapple leaves can pierce the flesh and hold fast
a skewered victim with tiny barbs.* The field ends +.**

111: You are in a field of kiwi plants.
149 154 155 89 77 0 0 0
Round hairy fruit hang from staked vines here. There are some trees +
and +. The field ends in a road +.*

112: You are in a large grove of coconuts.
150 153 89 156 77 0 0 0
These trees are much taller than any growing near the shore and the shadows
are also deeper.  It's hard to keep my sense of direction.****

113: You are in the woods.
157 91 158 116 79 0 0 0
Tropical undergrowth makes the going rough here. Sword ferns give no strong
foot hold and the dangling vines would gladly throttle one. The darkness is
so intense here that we stand in utter blackness.****

114: You are at the shore.
91 0 159 145 79 0 160 0
The low minus tide tonight might make it possible to climb down to a
small cave entrance below.  Large rocks would usually churn the waves
asunder.***  The beach goes -.

115: You are on the coast road.
158 161 162 91 79 0 0 0
The road is beginning to turn slightly -.  I can here the surf +.  The road
continues into the dark forest +.*

116: The road winds deeper into the trees.
163 142 91 164 79 0 0 0
Only narrow moonbeams filter through the dense foliage above. The moist rich
earth has nurtured a myriad of slugs, snakes, and spiders to grow here. The
road continues - and *- into the shadows.*

117: This is the front porch of the bungalow.
165 92 0 0 81 0 0 0
The veranda is lit by a small yellow bug light.  The door leads -.
The stone walk down to the luau is lined with burning torches +.  That
roast pig smells good.**

118: You are on a path leading to the lagoon.
92 166 167 168 81 0 0 0
This path winds through the underbrush and towards the lagoon *+.  The
broad faced moon peeps though the branches above.  The sound of drums echos
in the woods.**

119: This is a dirt road.
169 118 170 92 81 0 0 0
**The road continues on - here for some distance. A bonfire and party light
up the night sky +.

120: You are on a dirt road.
171 118 92 172 81 0 0 0
**There is a village +. A huge bonfire licks at the trees, and a celebration
of some sort is going on there.  The smell of luscious cooking is tantalizing
my flared nostrils.  The road continues +.

121: You are on a dirt road.
173 93 174 175 82 0 0 0
This is a wide grassy clearing bedewed with droplets of evening mist.  The
trees alongside the road moan and whisper as we pass.  They seem annoyed at
our presence.  **The road continues - and -.

122: You are at the seaplane dock.
93 0 176 177 82 0 0 0
Not a living thing stirs the calm surface of the lagoon.  The wooden planks
creak unnaturally as we tread on them.  The dock reaches a clearing +.
A dark trail leads around the lagoon **+.

123: There are some tables on the lawn here.
121 122 123 93 82 0 0 0
Some tables are strewn on the wet lawn.****

124: You are nosing around in the bushes.
124 124 93 124 82 0 0 0
There is little here but some old beer cans. It is damp and dirty in here.
I think I stepped in something unpleasant. It would be best to go **-.*

125: You are walking in a dry stream bed.
178 98 179 0 84 0 0 0
The large cobblestones are difficult to walk on.  No starlight reaches
below a black canopy of fog seemingly engulfing the whole island.  A dirt
path along the wash is **+.  The high bank is impossible to climb +.

126: You are at the thermal pools.
98 0 180 181 84 0 0 0
Odd spluttering and belching water splashes up around the rocks here.
A spectacular waterfall nearby tumbles down as a river of effervescent
bubbles.  The air is quite warm and a cave entrance ***+ spews steam.

127: You are in the woods.
127 180 182 98 84 0 0 0
It is pitch black in the forest here and my pant leg is caught on something.
There may be poison oak here.  What was that?  A lantern just flickered by in
the dark!  The sound of rushing water is coming from *+.**

128: You are on a dirt trail.
179 181 98 0 84 0 0 0
The trail seems to start here and head towards the forest +.**  High, dark
cliffs border the trail +.  Some crickets are chirping noisily.

129: You are  walking along the beach.
183 101 184 0 87 0 0 0
The surf is rather tame tonight.  The beach continues + and +.**

130: You are walking along the beach.
101 185 186 0 87 0 0 0
This is not a very nice beach. The coarse sand hurts my feet.****

131:You are walking through some ferns.
184 186 187 101 87 0 0 0
This is a wide field growing only ferns and small shrubs.**  In the dark
it would be all to easy to stumble into a venomous snake.  The ocean is
*+.

132: You are in a narrow canyon.
0 0 188 102 76 0 0 0
The steep sides here squeeze a little freshet through a gauntlet like
series of riffles and pools.  The cool mountain air is refreshing.****

133: The canyon is much wider here.
0 0 102 189 76 0 0 0
The sheer rock walls rise 10 meters into darkness. A slender waterfall
careens away from the face of the rock high above and showers the gravel
floor with sparkling raindrops.**  The canyon continues -
and -.

134: You are on the front porch of the cottage.
190 103 0 0 0 0 0 0
The veranda is deserted.  A table and chair are the only things on the porch.
Inside the house is a parlor lighted with an elegant chandelier.  The door
leads -.  The lawn and fountain are +.**

135: You are in a palm grove.
103 191 192 105 88 0 0 0
Crickets are chirping in the cool night air.****

136: You are on a dirt road.
193 192 245 103 88 0 0 0
There are many bright lights +.  The road cleaves the darkness +.
A small dirt road goes -, and a drive way peals off +.

137: You are in a field of small shrubs.
184 186 103 187 88 0 0 0
**Pine and other coniferous saplings are growing here.  The rich brown
soil is well watered.  Across a large lawn +, there is a small cottage lighted
with spot lights and gas lamps.  A cool land breeze is blowing.*

138: The beach is pretty rocky here.
194 105 195 0 96 0 0 0
The tide is very low tonight.  The beach is nicer *+.**

139: The beach is almost 10 meters wide here.
105 183 196 0 99 0 0 0
The sand has become more coarse and the beach steeper.****

140: You are in the gardens.
195 196 197 105 99 0 0 0
Shadowy expanses of lawn and leaf have been groomed and manicured here.
The night sky is glowing with a full moon.**  A lighted path leads -.
Stone steps lead down to the beach +.

141: You are on the coast road.
198 106 163 199 73 0 0 0
The forest is dense on either side.  The trees seem to be actually squeezing
together to keep us from passing.  A feeling of emnity is in the air.**
The road continues - and -.

142: You are in the forest.
116 107 91 106 73 0 0 0
I suppose there are trees and ferns all around, but it is too dark to see.****

143: You are in the forest.
199 108 106 146 73 0 0 0
There are shadowy trees and ferns all around.****

144: You are in a copse.
142 107 145 80 0 0 0 0
This is a secret hidden thicket only noticeable from the beach.  In the
moonlight, I can tell that someone has been digging here recently.****

145: You are at the tide pools.
91 0 114 107 79 0 0 0
These rocks and pools are the home for many sea anemones and crustaceans.
They are exposed because of the low tide.  There is a beach ***+.

146: You are in the forest.
199 108 143 0 73 0 0 0
This is a shallow depression sheltered from the wind by a thick growth of 
thorny shrubs.  It looks like someone is camping here.  There is a fire pit
with warm, crackling flames and coals here.*  The beach is +.*  The thorny
shrubs block the way -.

147: You are at the mouth of the lagoon.
200 0 108 201 74 0 0 0
The beach ends here where the coral reef rises to form a wide lagoon.
A path winds around the lagoon to the -.* The beach continues
on -. Only water lies +.

148: You are in a breadfruit grove.
202 109 203 204 77 0 0 0
The tall trees bend leisurely in the breeze, holding many round breadfruits
close to their large serrated leaves.  There are coconut palms +,
*+, and +.

149: You are in a grove of mango trees.
203 111 205 109 77 0 0 0
The trees are not tall enough to obscure the view and the bright moonlight
makes it fairly easy to see.****

150: You are in a grove of coconut palms.
204 112 109 206 77 0 0 0
All I can see around us are trees and ominous shapes darting in and out of the
shadows.****

151: You are in a coconut grove.
110 207 208 209 77 0 0 0
There are countless trees here.****

152: You are in a field of pineapple.
154 208 210 110 77 0 0 0
The sharp leaves are cutting me to ribbons. There is a road **+.*

153: You are in a coconut grove.
112 209 110 211 77 0 0 0
There is a field of something **+.*

154: You are on the edge of a kiwi and pineapple field.
111 152 155 110 77 0 0 0
An irrigation ditch separates the two fields here. There is a road **+.*

155: This is a dirt road.
205 210 212 111 77 0 0 0
The road runs - and - here.  It is very dark in the forest.**

156: You are in a palm grove.
206 211 112 213 77 0 0 0
There are trees all around us.****

157: You are on the edge of a small clearing.
157 113 157 157 79 0 0 0
The ground is rather marshy here and the darkness is intense.  A swarm of
ravenous mosquitoes has descended upon you and has sent you quaking to your
knees.****

158: You are in the woods.
158 115 215 113 79 0 0 0
You have walked a long way and found only spider webs. ****

159: You are walking along the shore.
115 0 214 114 86 0 0 0
You are now about 10 meters above the surf on a gently rising cliffside.**
The land rises +. There is a beach far +.

160: You are just inside the entrance to the sea cave.
246 114 0 0 114 1 0 0
The sound of water dripping in darkness and the roar of the ocean just outside
create a very unwelcoming atmosphere inside this cave. Only on rare occasions
such as this is it possible to enter the forbidden catacombs... The cave
continues -.***

161: You are in a secret nook beside the road.
115 159 162 91 79 0 0 0
This little thicket is hidden from the road in the shadows of the forest.
From here we have a clear view of any traffic along the road. A great hollow
tree stuffed with something is nearby.  The road is +.***

162: You are on the coast road.
215 214 0 115 86 0 0 0
The road turns abruptly - here, wandering deeper into the black forest.***

163: You are on a dirt road.
216 116 113 141 79 0 0 0
We are walking through a tunnel of unfriendly trees and shrubs.  The tall
ones bend over the roadway and reach down with their branches to grab us.
Broad leafed plants at the roadside whisper in the darkness.  Something
just darted across the road and into the bushes *+.  Let's go *-.

164: You have discovered a hidden thicket near the road.
163 142 116 106 73 0 0 0
I would think it best to stay n the road.  The forest seems very unfriendly
at night.  The road is **+.*

165: You are in the living room.
0 117 217 218 0 0 0 0
A decorative entry with fresh flowers and wall to wall carpeting leads into
the living room here where a couch and two chairs converse with an end table.
*The exit is +.* The bedroom is +.

166: You are at the lagoon.
118 0 167 168 81 0 0 0
A small beach here is deserted except for some fishing nets.  It is very
peaceful at the lagoon at night.  The sound of native drums is carried on
the night breeze.  There are paths leading off into darkness +,
*+, and +.

167: You are at the lagoon.
118 0 170 166 81 0 0 0
The grass near the water is moist with the refreshing evening dew.  Far away,
drums reverberate in the forest.**  The path continues + and +.

168:You are at the lagoon.
118 0 166 172 81 0 0 0
The path meanders through shadows of tussocks of grass, ferns, and thorny
bushes here and continues on **- and -.

169: You are in the woods.
219 119 220 92 81 0 0 0
There are plenty of ferns and thorny bushes here! Spider webs and probing
branches snare us as we stumble along in the pitch black night.****

170: You are on a dirt road.
220 167 199 119 74 0 0 0
The road winds rather close to a large lagoon here and many sedges and tall
loom in the darkness *+. The road continues - and -.

171: You are in the woods beside the road.
221 120 92 222 81 0 0 0
The forest grows darker +. The road is +.**

172: The road crosses the lagoon here.
222 0 120 174 81 0 0 0
Strange mists rising from the water engulf a rickety old enclosed bridge here.
Spider webs catch our hair as we pass through its rotting timbers.  I felt
something drop on my neck.  The road delves into the accursed forest
**+ and +.

173: You are in a coconut palm grove.
223 121 224 225 82 0 0 0
The tall palms are planted about 30 feet apart and the stary sky is clearly
visible above.  A low growing grass carpets the ground all around.  The grove
continues +.***

174: You are walking along a dirt road.
224 176 172 121 82 0 0 0
You are near misty patch of the roadway **+.  The road continues -.

175: You are on a dirt road.
225 177 121 226 82 0 0 0
The road turns abruptly - here, splitting a grove of palm trees.* In the
starlight I can also discern that the road continues - toward the lagoon.*

176: You are on a trail running around the lagoon.
172 0 0 122 82 0 0 0
The dark waters brush the trail here and the path crosses an old  bridge
+.  There is deep water + and +. The trail continues -.

177: This is the mouth of the lagoon.
175 0 122 227 82 0 0 0
The coral reef wraps around a natural bay here to create a wide lagoon which
winds tortuously inland.**  A trail goes around the lagoon +.
The beach is -.

178: You are in a dry stream bed.
0 125 0 0 84 0 0 0
The dry wash drains over a tall precipice here into a turbid morass below. The
most noisome stench imaginable is wafting up to defile our nostrils. Above,
the blackness is intense and a strange mist engulfs the island.*  Let's go
-.**

179: You are on a dirt path along the wash.
0 128 125 228 84 0 0 0
The trail winds along the gravel wash and delves into the forest ***+.

180: The thermal pools flow into a stream here.
127 0 229 126 84 0 0 0
The gurgling hot waters pour over boulders into a swiftly flowing
stream **+. The pools are +.

181: You are at the entrance to a cave.
128 230 126 0 84 0 0 0
A torch lights the entrance to the cave.  Deep inside I can see shadows moving.
A path goes + from here.  The entrance is +.**

182: You are in the woods.
182 229 182 127 84 0 0 0
Thorns tangle your every effort to proceed.*  The sound of rushing water is
+.**

183: You are walking along the beach.
139 129 184 0 99 0 0 0
Some dunes here progress inland and make it impossible to get very far in that
direction.  The beach continues - and -.*  The ocean is +.

184: You are in the dunes.
183 101 184 129 87 0 0 0
The endless rolling and pitching sand dunes are enough to make one very queasy!
The sand is cool and the stars are bright at the ocean.  The only way I'm going
is ***+.

185: This is a lousy beach.
130 0 0 0 87 0 0 0
Volcanic and viciously sharp bitted grains of sand here bite like cold steel
into my tender feet. I refuse to continue on. Let's get out of here. The
beach is better +.***

186: You are in a field of sparse ferns.
131 185 187 130 87 0 0 0
The lava rock outcroppings here will support few plants. There is more 
vegetation +.**  The ocean is +.

187: You are in the woods.
131 131 137 131 87 0 0 0
Young trees and tall shrubs grow densely together here.
They grow thicker **+.*

188: The canyon is no wider than a foot here.
0 0 0 132 0 0 0 0
The freshet is gushing through the narrow trough, but the canyon has grown
too narrow to follow it any farther.***  I guess we'll have to go -.

189: You are in a narrow part of the canyon.
0 0 133 232 76 0 0 0
The two sheer sides are no more than a few meters apart here. There is a stone
door in the wall +. The gravelly floor runs with tiny rivulets seeping 
from the ground itself.* The canyon continues - and -.

190: You are in the drawing room.
0 134 0 0 0 0 0 0
Exquisitely decorated with plants and antique furniture of superb
craftsmanship, the parlor reflects its owners impeccable taste.  The tropical
night air pours in through open shutters *+.  There doesn't seem 
to be anybody around.  A large immaculate oaken desk is visible in the
study and it even has a old fashioned telephone to complete the decor.**

191: You are in a palm grove.
135 191 233 191 88 0 0 0
Grassy rows of dew covered palms stretch as far as I can see.**
There is a road +.*

192: You are on a dirt road.
136 233 234 135 88 0 0 0
The road winds through a coconut palm grove here. It continues on - 
and -.**

193: The road leads to several large buildings here.
235 136 236 237 88 0 0 0
There is a lighted clubhouse +,* a large barn and stable +, and a
garage of similar construct to the barn +.

194: This part of the beach is impassable.
0 138 0 0 96 0 0 0
The see is calm tonight.  The beach goes *-.**

195: You are in the gardens.
195 140 197 138 96 0 0 0
Dew beaded grass sparkles in the moonlight.  Tiny lamps beside the path light
the way to the ocean ***+.

196: You are in the gardens.
140 183 197 139 99 0 0 0
Beautiful flowers and shrubs surround a lighted goldfish pond.****

197: You are on a stone walk in the garden.
195 196 238 140 99 0 0 0
The walk leads to a road **+.*

198: You are in the forest near the road.
198 141 216 198 73 0 0 0
There are many thorny bushes here!****

199: You are at a fork in the road.
239 146 141 170 73 0 0 0
Two roads come together in the darkness here. One runs -,* the other 
runs - and -.

200: You are on a dirt path around the lagoon.
170 147 146 0 74 0 0 0
The still waters reflect bending palms and a stary sky. It looks like
the path runs into a clearing +. The path continues -.**

201: You are drowning in the lagoon.
201 201 147 201 74 0 0 0
I suggest you get out before you become waterlogged.****

202: You are in a coconut palm grove.
202 148 203 204 77 0 0 0
****

203: You are in a palm grove.
202 149 205 148 77 0 0 0
****

204: You are in a palm grove.
202 150 148 206 77 0 0 0
****

205: You are on a dirt road.
203 155 212 149 77 0 0 0
*This road ends here at a palm grove but continues on - for quite
some way.**

206: You are in a coconut palm grove.
204 156 150 213 77 0 0 0
****

207: You are in a coconut grove.
151 219 208 209 77 0 0 0
*The grove ends +.**

208: You are in a coconut grove.
152 207 239 151 77 0 0 0
**There is a dirt road +.*

209: You are in a coconut grove.
153 207 151 211 77 0 0 0
****

210: This is a dirt road.
205 239 212 154 77 0 0 0
The road continues - and -.**

211: You are in a coconut grove.
153 209 153 213 77 0 0 0
****

212: You are in the woods near the road.
205 210 212 155 77 0 0 0
There are many thorny bushes here!****

213: You are in a coconut grove.
213 213 156 234 88 0 0 0
***The grove ends in a clearing +.

214: You are walking along some high cliffs.
162 0 0 159 86 0 0 0
The island bends sharply + here with high cliffs -
and -. The cliffs are lower +.

215: You are at the coast road turn around.
0 162 0 158 90 0 0 0
The coast road ends here in a lookout with a view of the ocean.
Far below, the waves crash against the rocks.
****

216: You are in the woods near the road.
216 163 216 198 79 0 257 0
These thorny bushes are killing me.****

217: You are in the kitchen.
0 0 0 165 0 0 0 0
A small gas stove and a refrigerator are all the only appliances here. The
gas oven has been left on and the whole room is reeking with natural gas.
One spark from a match and.... The door out is ***+.

218: You are in the bedroom.
0 0 165 0 0 0 0 0
A soft feather comforter on top of layers of Answer blankets make this a very
luxurious place to sleep indeed. There are also some end tables and a dresser
here.** The living room is +.*

219: You are in the woods.
207 169 220 221 81 0 0 0
The darkness is intense, but there seems to be a clearing +.***

220: You are in the woods near the road.
219 170 239 169 81 0 0 0
*As far as I can tell, there are two roads + and +.*

221: You are in the woods.
207 171 219 222 81 0 0 0
The spider webs thin out and the forest is clearer +.***

222: You are on the lagoon's inland finger.
0 172 171 172 81 0 0 0
It is impossible to follow the lagoon any farther inland because of sharp
and very painful sedges.* The road is +.**

223: You are in a grassy coconut grove.
240 173 224 241 82 0 0 0
The tall palms provide a ghostly canopy for the sandy ground covering.****

224: You are near the lagoon's inland finger.
0 174 0 173 82 0 0 0
Very sharp sedges make it impossible to follow the lagoon any farther inland.
*There is a road +.**

225: You are on a dirt road.
241 175 173 226 82 0 0 0
The road winds through a coconut grove here and continues - and -.**

226: You are in the woods near the road.
226 226 175 226 82 0 0 0
**The road is +.*

227: This is a beach?
227 227 177 0 82 0 0 0
Hard jagged rocks that pierce with every footstep hardly comprise a beach.**
Let's go -.*

228: The trail is lost in the woods here.
241 241 179 241 84 0 0 0
The trail goes **-.*

229: You are on the bank of a stream.
182 0 242 180 84 0 0 0
The stream falls over several small boulders here and continues on **-.*

230: You are just inside the cave.
181 267 0 0 0 0 0 0
A steamy hot breath is belching from the depths of the earth within.* The
cave  continues -.**

231: You are just inside the cave entrance.
274 0 0 0 0 0 0 0
The air is hot and sticky inside. The cave continues -. There is a 
stone door in the wall +.  A wooden sign in the dust warns in old elven
runes, "GSRF KDIRE NLVEMP!".**

232: You are at the edge of a huge chasm.
0 0 189 0 76 0 0 0
Several hundred feet down I can see the glimmer of placid water. The
rivulets drain over the edge and trickle down into the depths. It is 
impossible to climb down.**  The canyon continues -.*

233: You are on a dirt road.
192 241 240 191 88 0 0 0
The road winds through a coconut grove here. The road continues on into the
shadows - and -.**

234: You are in a coconut palm grove near the road.
193 233 213 192 88 0 0 0
***The road is +.

235: You are at the clubhouse.
0 193 0 0 0 0 0 0
The clubhouse is built over the most inland part of the lagoon.  Tropical
bananas and fragrant frangipani grow along the grassy shore.  Walking across
the short wooden bridge, we enter. Along one wall is a bar crowded with people.
The restaurant and disco dance floor are filled to capacity.  A rock group
electrocutes itself to the satisfaction of the audience.****

236: You are in the stables.
0 0 0 193 0 0 0 0
Neighing horses snacking on hay and oats fill the stalls on both sides of
the barn.  It is rather warm in here but that is not the most offensive
part.****

237: You are in the old garage.
0 0 193 0 0 0 0 0
This is an old wooden building of the same vintage as the stables.  Beneath
a sagging roof stand gardening tools and greasy rags.  Parked in the center
is an underpowered Plymouth Volare' with a red and white striped golf cart
roof. ****

238: You are on a dirt road.
197 197 243 197 85 0 0 0
The road leads to a formal garden laced with lighted stone walks and tropical
flowers and trees.** The road continues -. A walk leads -.

239: You are on a dirt road.
210 199 198 220 73 0 0 0
The road runs - and -.**

240: You are in a coconut grove near the road.
234 223 234 233 88 0 0 0
***The road is +.

241: You are on a dirt road.
233 225 223 226 82 0 0 0
The road continues - and -.**

242: The stream plummets over a cliff here.
182 0 0 229 84 0 0 0
Falling 10 agonizing meters into darkness, only droplets of the stream must
be left to dance off the floor below.  There is no way down, even with a
strong rope. ****

243: You are on a dirt road.
0 0 244 238 85 0 0 0
**The road continues - and -.

244: You are on a dirt road.
0 245 0 243 88 0 0 0
*The road continues -* and -.

245: You are on a dirt road.
244 234 213 136 88 0 0 0
The road goes -* and *-.

246: You are in a low passage.
247 160 0 0 0 0 0 0
The ceiling here sparkles with iridiscent gems and minerals. Colorful starfish
and sea anemones cling to the slippery walls and floor.  The passage continues
+.***

247: The walls are very close together here.
248 246 0 0 0 0 0 0
I can barely squeeze through the jagged opening. Slimy sea weeds provide
no footing at all. This tunnel seems to be an ancient lava tube.  There is
a large room +.***

248: You are in the cathedral room.
249 247 250 251 0 0 0 0
Your light casts ghostly shadows on the walls but cannot pierce the 
engulfing darkness overhead. The sound of water dripping echoes in the void.
*I can see no passages leading out of this room.*** 

249: You are walking through a very round tunnel.
252 248 0 0 252 1 0 0
The round walls of this tunnel are amazingly smooth to the touch. A little
trickle of water flows down the center.  The tunnel climbs steadily +.
There is a large room +.**

250: You are in the cathedral anteroom.
0 0 0 248 253 1 0 0
This small chamber with a flat stone floor is to one side of the cathedral 
room. We appear to be at the bottom of a tall narrow shaft. There are many 
puddles of water here. A staircase hewn from solid rock and black lava 
leads up.***  The cathedral room is -.

251: You are in a wide chamber.
0 0 248 254 0 0 0 0
Water is sprinkling from the ceiling here. A shallow pool populated by a 
myriad of blind white creatures sparkles in your light. Tiny shrimp and
crabs scurry away, frightened by the blinding rays.**  The cave 
continues + and +.

252: You are at the top of a sloping passage.
0 249 255 256 257 1 249 0
There is much algae growing here, both green and brown specimens. I suspect
that we are near the high tide zone, but no light can get in here. The walls
glisten with shiny minerals.**  A hallway here runs + and -.

253: You are in an elaborately tiled room.
0 0 258 0 0 0 250 0
Large colorful tiles plate the floor and walls.  The ceiling is a mosaic
of gems set in gold.  Hopefully it is only our footsteps that are echoing in
this hollow chamber.**  The room continues -.  A stone staircase leads
down.*

254: You are at a dead end.
0 0 251 0 0 0 0 0
The walls here are alive with dark mussels.  They click their shells menacingly
if we disturb them.**  The only exit is +.*

255: The tunnel is very low here.
0 0 259 252 0 0 0 0
You practically have to crawl on your knees to pass through this opening.  The
air is stiflingly damp, but you can't hear any sounds of water dripping.**
The crawlspace continues -.  The tunnel seems wider +.

256: This is the supply room.
0 0 252 0 0 0 0 0
Picks and shovels line the walls here, as well as hard hats, boxes of
dynamite, and a cartload of very high grade gold and silver ore.** 
A tunnel leads off +.*

257: You have found a secret entrance to the catacombs
0 0 0 0 216 1 252 0
Below is a wet, seaweed covered floor.  Above is a way out.****

258: You are in the catacombs.
0 0 260 253 0 0 0 0
Ornate tombs and piles of treasure line the walls.  Long spears with many
blades, fine swords and coats of mail, heaps of coins, jewelry, pottery, 
and golden statues are tribute past kings and queens.** The catacombs
continue - and -.

259: You are crawling on your stomach.
0 0 261 255 0 0 0 0
The passage is quite narrow and jagged, but the rock is no longer lava.
It appears to be a form of granite.**  The crawlspace continues -, 
but I would just as soon go -.

260: You are in the Sepulcher.
0 0 0 258 0 0 0 0
A single tomb is here.  Encrusted with diamonds and opals, and secured with 
straps of a very hard, untarnished silver, this tomb must be of a great king.
Vases overflowing with gold coins stand nearby.  A line of verse on the wall
reads, "Three he made and gave them to his daughters."****

261: The passage is wider here.
0 0 0 259 0 0 262 0
A ladder goes down into darkness here.***  A small crawlspace goes -.

262: You are at the bottom of a ladder.
0 0 0 0 261 1 263 0
This is a narrow platform to rest on before we continue either up or down this
rickety wooden ladder.****

263: You are standing in several inches of water.
264 0 265 266 262 1 0 0
This seems to be a working mine. Many different tunnels wander off following
glowing veins of precious metal.  The floor is flooded here since we must
be nearly at sea level.  A ladder leads up.****

264: The tunnel here is blocked by broken rocks.
0 263 0 0 0 0 0 0
The way is blocked, but if you had some dynamite, we might be able to blast our
way through.*  The passage goes -.**

265: The tunnel is too flooded to proceed.
0 0 0 263 0 0 0 0
Hidden shafts could swallow us if we tried to continue on down this tunnel.
The flooding is already up to my waist.  Large crystals overhead shimmer
rainbows of reflected light.***  Let's go -.

266: The mine is less flooded here.
0 0 263 0 0 0 0 0
A meandering gold laden vein of quartz and blooming crystals of diamonds
and topaz burst from the walls of the cave.  A passage goes -.***

267: You are inside the cave.
230 268 0 0 0 0 0 0
A hot steam swirls around our heads, and the walls are warm to the touch.
The trail winds - and -.**

268: You are in a rather large chamber.
267 0 0 269 0 0 269 0
Beds of ferns and palm leaves make several cozy nests along the walls. In the
center of the room is a throne of gold and silver.***  A passageway leads
down and +.

269: You are walking along the edge of a huge abyss.
0 0 268 0 268 1 270 0
Steam is rising in great clouds from the immeasurable depths.  A very narrow
trail winds down.**  There is a tunnel -.*

270: You are on the edge of a huge abyss.
0 0 0 0 269 1 271 0
The trail winds farther down.****

271: You are winding your way along the abyss.
0 0 0 0 270 1 272 0
The trail continues up and down.****

272: You are on a wide shelf near the steamy abyss.
0 273 0 0 271 1 0 0
The stifling hot cave seems even hotter to me, staring down into this misty 
abyss.  A trail winds up.*  A passageway leads -.**

273: You are in a wide tunnel leading to a fuming abyss.
272 274 0 0 0 0 0 0
The passageway winds through many beautiful formations of crystals and
sparkling minerals.  The tunnel continues - and -.**

274: You are in a tunnel.
273 231 0 0 0 0 0 0
It is very warm in here.  The smell of steam and hot rocks permeates the place.
The cave continues - and -.**

275: You are at the bottom of a pit.
0 0 0 0 232 0 0 0
At the top of the pit, a single star can be seen in the night sky.  There
doesn't appear to be any way to get out without a rope.  I don't remember
how we got here.****

SHAR_EOF
if test 48075 -ne "`wc -c battlestar/nightfile`"
then
echo shar: error transmitting battlestar/nightfile '(should have been 48075 characters)'
fi
#	End of shell archive
exit 0

yee@ucbvax.ARPA (Peter E. Yee) (01/24/85)

This is part 3 of the BATTLESTAR distribution.

#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
-----cut here-----cut here-----cut here-----cut here-----
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	battlestar/externs.h
#	battlestar/dayobjs
#	battlestar/nightobjs
#	battlestar/Makefile
#	battlestar/cypher.c
#	battlestar/fly.c
#	battlestar/getcom.c
#	battlestar/battlestar.6
#	battlestar/battlestar.c
#	battlestar/globals.c
#	battlestar/init.c
#	battlestar/mkfile.c
#	battlestar/mkobjs.c
#	battlestar/mkwlist.c
# This archive created: Wed Jan 23 20:04:05 1985
cat << \SHAR_EOF > battlestar/externs.h
/* @(#)externs.h	1.2 11/28/84 */

#include <sys/signal.h>
#include <stdio.h>

#define PATH(x)		"/usr/games/lib/x"
#define logfile		PATH(battlestar.log)

#define BITS (8 * sizeof (int))

#define OUTSIDE		(position > 68 && position < 246 && position != 218)
#define rnd(x)		(rand() % (x))
#define max(a,b)	((a) < (b) ? (b) : (a))
#define testbit(array, index)	(array[index/BITS] & (1 << (index % BITS)))
#define setbit(array, index)	(array[index/BITS] |= (1 << (index % BITS)))
#define clearbit(array, index)	(array[index/BITS] &= ~(1 << (index % BITS)))

	/* well known rooms */
#define FINAL	275
#define GARDEN	197
#define POOLS	126
#define DOCK	93

	/* word types */
#define VERB	0
#define OBJECT  1
#define NOUNS	2
#define PREPS	3
#define ADJS	4
#define CONJ	5

	/* words numbers */
#define KNIFE		0 
#define SWORD		1
#define LAND		2
#define WOODSMAN 	3
#define TWO_HANDED	4
#define CLEAVER		5
#define BROAD		6
#define MAIL		7
#define HELM		8
#define SHIELD		9
#define MAID		10
#define BODY		10
#define VIPER		11
#define LAMPON		12
#define SHOES		13
#define CYLON		14
#define PAJAMAS		15
#define ROBE		16
#define AMULET		17
#define MEDALION	18
#define TALISMAN	19
#define DEADWOOD	20
#define MALLET		21
#define LASER		22
#define BATHGOD		23
#define NORMGOD		24
#define GRENADE		25
#define CHAIN		26
#define ROPE		27
#define LEVIS		28
#define MACE		29
#define SHOVEL		30
#define HALBERD		31
#define	COMPASS		32
#define	CRASH		33
#define ELF		34
#define FOOT		35
#define COINS		36
#define MATCHES		37
#define MAN		38
#define PAPAYAS		39
#define PINEAPPLE	40
#define KIWI		41
#define COCONUTS	42
#define MANGO		43
#define RING		44
#define POTION		45
#define BRACELET	46
#define GIRL		47
#define GIRLTALK	48
#define DARK		49
#define TIMER		50
#define CHAR		53
#define BOMB		54
#define DEADGOD		55
#define DEADTIME	56
#define DEADNATIVE	57
#define NATIVE		58
#define HORSE		59
#define CAR		60
#define POT		61
#define BAR		62
#define	BLOCK		63
#define NUMOFOBJECTS	64
	/* non-objects below */
#define UP	1000
#define DOWN	1001
#define AHEAD	1002
#define BACK	1003
#define RIGHT	1004
#define LEFT	1005
#define TAKE	1006
#define USE	1007
#define LOOK	1008
#define QUIT	1009
#define NORTH	1010
#define SOUTH	1011
#define EAST	1012
#define WEST	1013
#define SU      1014
#define DROP	1015
#define TAKEOFF	1016
#define DRAW	1017
#define PUTON	1018
#define WEARIT	1019
#define PUT	1020
#define INVEN	1021
#define EVERYTHING 1022
#define AND	1023
#define KILL	1024
#define RAVAGE	1025
#define UNDRESS	1026
#define THROW	1027
#define LAUNCH	1028
#define LANDIT	1029
#define LIGHT	1030
#define FOLLOW	1031
#define KISS	1032
#define LOVE	1033
#define GIVE	1034
#define SMITE	1035
#define SHOOT	1036
#define ON	1037
#define	OFF	1038
#define TIME	1039
#define SLEEP	1040
#define DIG	1041
#define EAT	1042
#define SWIM	1043
#define DRINK	1044
#define DOOR	1045
#define SAVE	1046
#define RIDE	1047
#define DRIVE	1048
#define SCORE	1049
#define BURY	1050 
#define JUMP	1051
#define KICK	1052

	/* injuries */
#define ARM	6		/* broken arm */
#define RIBS	7		/* broken ribs */
#define SPINE	9		/* broken back */
#define SKULL	11		/* fractured skull */
#define INCISE	10		/* deep incisions */
#define NECK	12		/* broken NECK */
#define NUMOFINJURIES 13

	/* notes */
#define	CANTLAUNCH	0
#define LAUNCHED	1
#define CANTSEE		2
#define CANTMOVE	3 
#define JINXED		4
#define DUG		5
#define NUMOFNOTES	6

	/* fundamental constants */
#define NUMOFROOMS	275
#define NUMOFWORDS	((NUMOFOBJECTS + BITS - 1) / BITS)
#define LINELENGTH	81

#define TODAY		0
#define TONIGHT		1
#define CYCLE		100

	/* initial variable values */
#define TANKFULL	250
#define TORPEDOES	10
#define MAXWEIGHT	60
#define MAXCUMBER	10

struct room {
	char *name;
	int link[8];
#define north	link[0]
#define south	link[1]
#define east	link[2]
#define west	link[3]
#define up	link[4]
#define access	link[5]
#define down	link[6]
#define flyhere	link[7]
	char *desc;
	unsigned int objects[NUMOFWORDS];
};
struct room dayfile[];
struct room nightfile[];
struct room *location;

	/* object characteristics */
char *objdes[NUMOFOBJECTS];
char *objsht[NUMOFOBJECTS];
char *ouch[NUMOFINJURIES];
int objwt[NUMOFOBJECTS];
int objcumber[NUMOFOBJECTS];

	/* current input line */
#define NWORD	20			/* words per line */
char words[NWORD][15];
int wordvalue[NWORD];
int wordtype[NWORD];
int wordcount, wordnumber;

char *truedirec(), *rate();
char *getcom(), *getword();

	/* state of the game */
int time;
int position;
int direction;
int left, right, ahead, back;
int clock, fuel, torps;
int carrying, encumber;
int rythmn;
int followfight;
int ate;
int snooze;
int meetgirl;
int followgod;
int godready;
int win;
int wintime;
int wiz;
int tempwiz;
int matchlight, matchcount;
int loved;
int pleasure, power, ego;
int WEIGHT;
int CUMBER;
int notes[NUMOFNOTES];
unsigned int inven[NUMOFWORDS];
unsigned int wear[NUMOFWORDS];
char beenthere[NUMOFROOMS+1];
char injuries[NUMOFINJURIES];

char uname[9];

struct wlist {
	char *string;
	int value, article;
	struct wlist *next;
};
#define HASHSIZE	256
#define HASHMUL		81
#define HASHMASK	(HASHSIZE - 1)
struct wlist *hashtab[HASHSIZE];
struct wlist wlist[];

struct objs {
	short room;
	short obj;
};
struct objs dayobjs[];
struct objs nightobjs[];
SHAR_EOF
if test 5227 -ne "`wc -c battlestar/externs.h`"
then
echo shar: error transmitting battlestar/externs.h '(should have been 5227 characters)'
fi
cat << \SHAR_EOF > battlestar/dayobjs
@(#)dayobjs	1.1 11/18/84
236	59
237	60
275	61
275	62
275	63
260	36
266	49
235	50
51	51
59	51
48	51
66	52
65	52
19	54
167	58
21	0
30	0
30	5
260	1
70	2
71	2
72	2
73	2
74	2
75	2
76	2
77	2
78	2
79	2
81	2
82	2
83	2
84	2
85	2
86	2
87	2
88	2
90	2
95	2
96	2
97	2
99	2
100	2
104	2
172	3
172	20
172	21
146	34
146	31
146	9
190	4
190	45
142	6
258	7
258	8
21	10
7	11
216	13
64	14
36	14
49	14
8	16
13	17
20	22
126	23
26	25
256	25
237	26
237	32
218	28
164	29
137	30
11	36
24	37
235	37
93	38
109	39
110	40
152	40
154	40
111	41
149	43
112	42
150	42
151	42
153	42
192	42
204	42
207	42
209	42
213	42
240	42
218	44
130	46
93	47
268	12
SHAR_EOF
if test 615 -ne "`wc -c battlestar/dayobjs`"
then
echo shar: error transmitting battlestar/dayobjs '(should have been 615 characters)'
fi
cat << \SHAR_EOF > battlestar/nightobjs
@(#)nightobjs	1.1 11/18/84
218	15
235	58
92	39
92	40
92	41
92	43
92	58
92	38
181	12
236	12
92	12
216	3
216	20
216	21
168	3
168	20
168	21
170	3
170	20
170	21
124	9
124	31
124	34
144	9
144	31
144	34
113	9
113	31
113	34
161	9
161	31
161	34
169	9
169	31
169	34
182	9
182	31
182	34
198	9
198	31
198	34
212	9
212	31
212	34
216	9
216	31
216	34
226	9
226	31
226	34
228	9
228	31
228	34
68	14
144	30
249	35
250	35
93	39
SHAR_EOF
if test 410 -ne "`wc -c battlestar/nightobjs`"
then
echo shar: error transmitting battlestar/nightobjs '(should have been 410 characters)'
fi
cat << \SHAR_EOF > battlestar/Makefile
# @(#)Makefile	1.3 12/3/84

CFLAGS=		-O
OBJS=		battlestar.o com1.o com2.o com3.o com4.o com5.o com6.o com7.o \
		init.o cypher.o getcom.o parse.o room.o save.o fly.o misc.o \
		globals.o \
		wlist.o dayfile.o nightfile.o dayobjs.o nightobjs.o
CFILES=		battlestar.c com1.c com2.c com3.c com4.c com5.c com6.c com7.c \
		init.c cypher.c getcom.c parse.c room.c save.c fly.c misc.c \
		globals.c
LIBS=		-lcurses -ltermlib
LINTFLAGS=	-h
JUNKFILES=	battlestar tags mkfile mkwlist mkobjs \
		wlist.c dayfile.c nightfile.c dayobjs.c nightobjs.c
DATAFILES=	dayfile nightfile battlewords dayobjs nightobjs
DIR=		$(DESTDIR)/usr/games
LOGFILE=	$(DIR)/lib/battlestar.log
MAN=		$(DESTDIR)/usr/man/man6/battlestar.6

battlestar: ${OBJS}
	cc ${OBJS} ${LIBS} -o battlestar

mkfile: mkfile.c
	$(CC) $(CFLAGS) -o mkfile mkfile.c

dayfile.o: dayfile mkfile
	mkfile dayfile
	$(CC) $(CFLAGS) -c dayfile.c
	rm dayfile.c

nightfile.o: nightfile mkfile
	mkfile nightfile
	$(CC) $(CFLAGS) -c nightfile.c
	rm nightfile.c

mkwlist: mkwlist.c
	$(CC) $(CFLAGS) -o mkwlist mkwlist.c

wlist.c: battlewords mkwlist
	mkwlist battlewords

mkobjs: mkobjs.c
	$(CC) $(CFLAGS) -o mkobjs mkobjs.c

dayobjs.c: dayobjs mkobjs
	mkobjs dayobjs

nightobjs.c: nightobjs mkobjs
	mkobjs nightobjs

lint: ${CFILES} 
	lint ${LINTFLAGS} ${CFILES} ${LIBS} 

install: battlestar $(MAN) $(LOGFILE)
	install -s -c battlestar $(DIR)/battlestar

logfile $(LOGFILE):
	cp /dev/null $(LOGFILE)
	chmod 666 $(LOGFILE)

man $(MAN):
	install -c battlestar.6 $(MAN)

clean:
	rm -f ${OBJS} ${JUNKFILES}
SHAR_EOF
if test 1537 -ne "`wc -c battlestar/Makefile`"
then
echo shar: error transmitting battlestar/Makefile '(should have been 1537 characters)'
fi
cat << \SHAR_EOF > battlestar/cypher.c
#ifndef lint
static char sccsid[] = "@(#)cypher.c	1.2 11/28/84";
#endif

#include "externs.h"

cypher()
{
	register int n;
	int junk;
	int lflag = -1;
	char buffer[10];

	while (wordtype[wordnumber] == ADJS)
		wordnumber++;
	while (wordnumber <= wordcount) {
		switch(wordvalue[wordnumber]) {

			case UP:
				if (location[position].access || wiz || tempwiz) {
					if (!location[position].access)
						puts("Zap!  A gust of wind lifts you up.");
					if (!move(location[position].up, AHEAD))
						return(-1);
				} else {
					puts("There is no way up");
					return(-1);
				}
				lflag = 0;
				break;

			 case DOWN:
				if (!move(location[position].down, AHEAD))
					return(-1);
				lflag = 0;
				break;

			 case LEFT:
				if (!move(left, LEFT))
					return(-1);
				lflag = 0;
				break;

			 case RIGHT:
				if (!move(right, RIGHT))
					return(-1);
				lflag = 0;
				break;
			 
			 case AHEAD:
				if (!move(ahead, AHEAD))
					return(-1);
				lflag = 0;
				break;
			 
			 case BACK:
				if (!move(back, BACK))
					return(-1);
				lflag = 0;
				break;
			 
			 case SHOOT:
				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(location[position].objects,n) && *objsht[n]){
							wordvalue[wordnumber+1] = n;
							wordnumber = shoot();
						}
				wordnumber++;
				wordnumber++;
				}
				else 
					shoot();
				break;

			 case TAKE:
				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(location[position].objects,n) && *objsht[n]){
							wordvalue[wordnumber+1] = n;
							wordnumber = take(location[position].objects);
						}
				wordnumber++;
				wordnumber++;
				}
				else 
					take(location[position].objects);
				break;

			 case DROP:

				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(inven,n)){
							wordvalue[wordnumber+1] = n;
							wordnumber = drop("Dropped");
						}
				wordnumber++;
				wordnumber++;
				}
				else 
					drop("Dropped");
				break;


			 case KICK:
			 case THROW:
				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(inven,n) ||
						  testbit(location[position].objects, n) && *objsht[n]){
							wordvalue[wordnumber+1] = n;
							wordnumber = throw(wordvalue[wordnumber] == KICK ? "Kicked" : "Thrown");
						}
					wordnumber += 2;
				} else 
					throw(wordvalue[wordnumber] == KICK ? "Kicked" : "Thrown");
				break;

			 case TAKEOFF:
				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(wear,n)){
							wordvalue[wordnumber+1] = n;
							wordnumber = takeoff();
						}
					wordnumber += 2;
				}
				else 
					takeoff();
				break;


			 case DRAW:

				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(wear,n)){
							wordvalue[wordnumber+1] = n;
							wordnumber = draw();
						}
					wordnumber += 2;
				}
				else 
					draw();
				break;


			 case PUTON:

				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(location[position].objects,n) && *objsht[n]){
							wordvalue[wordnumber+1] = n;
							wordnumber = puton();
						}
					wordnumber += 2;
				}
				else 
					puton();
				break;

			 case WEARIT:

				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(inven,n)){
							wordvalue[wordnumber+1] = n;
							wordnumber = wearit();
						}
					wordnumber += 2;
				}
				else 
					wearit();
				break;


			 case EAT:

				if (wordnumber < wordcount && wordvalue[wordnumber+1] == EVERYTHING){
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(inven,n)){
							wordvalue[wordnumber+1] = n;
							wordnumber = eat();
						}
					wordnumber += 2;
				}
				else 
					eat();
				break;


			case PUT:
				put();
				break;


			case INVEN:
				if (ucard(inven)){
					puts("You are holding:\n");
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(inven,n))
							printf("\t%s\n", objsht[n]);
					printf("\n= %d kilogram%s (%d%%)\n", carrying, (carrying == 1 ? "." : "s."),(WEIGHT ? carrying*100/WEIGHT : -1));
					printf("Your arms are %d%% full.\n",encumber*100/CUMBER);
				}
				else
					puts("You aren't carrying anything.");
					
				if (ucard(wear)){
					puts("\nYou are wearing:\n");
					for (n=0; n < NUMOFOBJECTS; n++)
						if (testbit(wear,n))
							printf("\t%s\n", objsht[n]);
				}
				else
					puts("\nYou are stark naked.");
				if (card(injuries,NUMOFINJURIES)){
					puts("\nYou have suffered:\n");
					for (n=0; n < NUMOFINJURIES; n++)
						if (injuries[n])
							printf("\t%s\n",ouch[n]);
					printf("\nYou can still carry up to %d kilogram%s\n",WEIGHT,(WEIGHT == 1 ? "." : "s."));
				}
				else
					puts("\nYou are in perfect health.");
				break;

			case USE:
				lflag = use();
				break;

			case LOOK:
				if (!notes[CANTSEE] || testbit(inven,LAMPON) || testbit(location[position].objects,LAMPON) || matchlight){
					beenthere[position] = 2;
					writedes();
					printobjs();
					if (matchlight){
						puts("\nYour match splutters out.");
						matchlight = 0;
					}
				} else 
					puts("I can't see anything.");
				return(-1);
				break;

			 case SU:
			 if (wiz || tempwiz){
				printf("\nRoom (was %d) = ", position);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d", &position);
				printf("Time (was %d) = ",time);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d", &time);
				printf("Fuel (was %d) = ",fuel);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d", &fuel);
				printf("Torps (was %d) = ",torps);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d", &torps);
				printf("CUMBER (was %d) = ",CUMBER);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d", &CUMBER);
				printf("WEIGHT (was %d) = ",WEIGHT);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d",&WEIGHT);
				printf("Clock (was %d) = ",clock);
				fgets(buffer,10,stdin);
				if (*buffer != '\n')
					sscanf(buffer,"%d",&clock);
				printf("Wizard (was %d, %d) = ",wiz, tempwiz);
				fgets(buffer,10,stdin);
				if (*buffer != '\n'){
					sscanf(buffer,"%d",&junk);
					if (!junk)
						tempwiz = wiz = 0;
				}
				printf("\nDONE.\n");
				return(0);
			 }
			 else
				 puts("You aren't a wizard.");
			 break;
				
			 case SCORE:
				printf("\tPLEASURE\tPOWER\t\tEGO\n");
				printf("\t%3d\t\t%3d\t\t%3d\n\n",pleasure,power,ego);
				printf("This gives you the rating of %s in %d turns.\n",rate(),time);
				printf("You have visited %d out of %d rooms this run (%d%%).\n",card(beenthere,NUMOFROOMS),NUMOFROOMS,card(beenthere,NUMOFROOMS)*100/NUMOFROOMS);
				break;

			 case KNIFE:
			 case KILL:
				murder();
				break;

			 case UNDRESS:
			 case RAVAGE:
				ravage();
				break;

			 case SAVE:
				save();
				break;

			 case FOLLOW:
				lflag = follow();
				break;

			 case GIVE:
				give();
				break;

			 case KISS:
				kiss();
				break;

			 case LOVE:
				 love();
				 break;

			 case RIDE:
				lflag = ride();
				break;

			 case DRIVE:
				lflag = drive();
				break;

			 case LIGHT:
				 light();
				 break;

			 case LAUNCH:
				if (!launch())
					return(-1);
				else 
					lflag = 0;
				break;

			case LANDIT:
				if (!land())
					return(-1);
				else
					lflag = 0;
				break;

			case TIME:
				chime();
				break;

			 case SLEEP:
				zzz();
				break;

			 case DIG:
				dig();
				break;

			 case JUMP:
				lflag = jump();
				break;

			 case BURY:
				bury();
				break;

			 case SWIM:
				puts("Surf's up!");
				break;

			 case DRINK:
				drink();
				break;

			 case QUIT:
				die();

			 default:
				puts("How's that?");
				return(-1);
				break;

			 
		}
		if (wordnumber < wordcount && *words[wordnumber++] == ',')
			continue;
		else return(lflag);
       }
       return(lflag);
}
SHAR_EOF
if test 8260 -ne "`wc -c battlestar/cypher.c`"
then
echo shar: error transmitting battlestar/cypher.c '(should have been 8260 characters)'
fi
cat << \SHAR_EOF > battlestar/fly.c
#ifndef lint
static char sccsid[] = "@(#)fly.c	1.2 11/28/84";
#endif

#include "externs.h"
#undef UP
#include <curses.h>

#define abs(a)	((a) < 0 ? -(a) : (a))
#define MIDR  (LINES/2 - 1)
#define MIDC  (COLS/2 - 1)

int row, column;
int dr = 0, dc = 0;
char destroyed;
int clock = 120;		/* time for all the flights in the game */
char cross = 0;
int (*oldsig)();

succumb()
{
	switch (oldsig) {
	case SIG_DFL:
		endfly();
		exit(1);
	case SIG_IGN:
		break;
	default:
		endfly();
		(*oldsig)();
	}
}

visual()
{
	int moveenemy();

	destroyed = 0;
	savetty();
	if(initscr() == ERR){
		puts("Whoops!  No more memory...");
		return(0);
	}
	oldsig = signal(SIGINT, succumb);
	crmode();
	noecho();
	screen();
	row = rnd(LINES-3) + 1;
	column = rnd(COLS-2) + 1;
	moveenemy();
	for (;;) {
		switch(getchar()){

			case 'h':
			case 'r':
				dc = -1;
				fuel--;
				break;

			case 'H':
			case 'R':
				dc = -5;
				fuel -= 10;
				break;

			case 'l':
				dc = 1;
				fuel--;
				break;

			case 'L':
				dc = 5;
				fuel -= 10;
				break;

			case 'j':
			case 'u':
				dr = 1;
				fuel--;
				break;

			case 'J':
			case 'U':
				dr = 5;
				fuel -= 10;
				break;

			case 'k':
			case 'd':
				dr = -1;
				fuel--;
				break;

			case 'K':
			case 'D':
				dr = -5;
				fuel -= 10;
				break;

			case '+':
				if (cross){
					cross = 0;
					notarget();
				}
				else
					cross = 1;
				break;

			case ' ':
			case 'f':
				if (torps){
					torps -= 2;
					blast();
					if (row == MIDR && column - MIDC < 2 && MIDC - column < 2){
						destroyed = 1;
						alarm(0);
					}
				}
				else
					mvaddstr(0,0,"*** Out of torpedoes. ***");
				break;

			case 'q':
				endfly();
				return(0);

			default:
				mvaddstr(0,26,"Commands = r,R,l,L,u,U,d,D,f,+,q");
				continue;

			case EOF:
				break;
		}
		if (destroyed){
			endfly();
			return(1);
		}
		if (clock <= 0){
			endfly();
			die();
		}
	}
}

screen()
{
	register int r,c,n;
	int i;

	clear();
	i = rnd(100);
	for (n=0; n < i; n++){
		r = rnd(LINES-3) + 1;
		c = rnd(COLS);
		mvaddch(r, c, '.');
	}
	mvaddstr(LINES-1-1,21,"TORPEDOES           FUEL           TIME");
	refresh();
}

target()
{
	register int n;

	move(MIDR,MIDC-10);
	addstr("-------   +   -------");
	for (n = MIDR-4; n < MIDR-1; n++){
		mvaddch(n,MIDC,'|');
		mvaddch(n+6,MIDC,'|');
	}
}

notarget()
{
	register int n;

	move(MIDR,MIDC-10);
	addstr("                     ");
	for (n = MIDR-4; n < MIDR-1; n++){
		mvaddch(n,MIDC,' ');
		mvaddch(n+6,MIDC,' ');
	}
}

blast()
{
	register int n;

	alarm(0);
	move(LINES-1, 24);
	printw("%3d", torps);
	for(n = LINES-1-2; n >= MIDR + 1; n--){
		mvaddch(n, MIDC+MIDR-n, '/');
		mvaddch(n, MIDC-MIDR+n, '\\');
		refresh();
	}
	mvaddch(MIDR,MIDC,'*');
	for(n = LINES-1-2; n >= MIDR + 1; n--){
		mvaddch(n, MIDC+MIDR-n, ' ');
		mvaddch(n, MIDC-MIDR+n, ' ');
		refresh();
	}
	alarm(1);
}

moveenemy()
{
	double d;
	int oldr, oldc;

	oldr = row;
	oldc = column;
	if (fuel > 0){
		if (row + dr <= LINES-3 && row + dr > 0)
			row += dr;
		if (column + dc < COLS-1 && column + dc > 0)
			column += dc;
	} else if (fuel < 0){
		fuel = 0;
		mvaddstr(0,60,"*** Out of fuel ***");
	}
	d = (double) ((row - MIDR)*(row - MIDR) + (column - MIDC)*(column - MIDC));
	if (d < 16){
		row += (rnd(9) - 4) % (4 - abs(row - MIDR));
		column += (rnd(9) - 4) % (4 - abs(column - MIDC));
	}
	clock--;
	mvaddstr(oldr, oldc - 1, "   ");
	if (cross)
		target();
	mvaddstr(row, column - 1, "/-\\");
	move(LINES-1, 24);
	printw("%3d", torps);
	move(LINES-1, 42);
	printw("%3d", fuel);
	move(LINES-1, 57);
	printw("%3d", clock);
	refresh();
	signal(SIGALRM, moveenemy);
	alarm(1);
}

endfly()
{
	alarm(0);
	signal(SIGALRM, SIG_DFL);
	mvcur(0,COLS-1,LINES-1,0);
	endwin();
	signal(SIGTSTP, SIG_DFL);
	signal(SIGINT, oldsig);
}
SHAR_EOF
if test 3771 -ne "`wc -c battlestar/fly.c`"
then
echo shar: error transmitting battlestar/fly.c '(should have been 3771 characters)'
fi
cat << \SHAR_EOF > battlestar/getcom.c
#ifndef lint
static char sccsid[] = "@(#)getcom.c	1.1 11/18/84";
#endif

#include <stdio.h>
#include <ctype.h>

char *
getcom(buf, size, prompt, error)
	char *buf;
	int size;
	char *prompt, *error;
{
	for (;;) {
		fputs(prompt, stdout); 
		if (fgets(buf, size, stdin) == 0)
			exit(1);
		while (isspace(*buf))
			buf++;
		if (*buf)
			break;
		if (error)
			puts(error);
	}
	return (buf);
}

char *
getword(buf1, buf2, flag)
	char *buf1, *buf2;
{
	/* shifts to UPPERCASE if flag > 0, lowercase if    */
	/* flag < 0, and leaves it unchanged if flag = 0    */

	while (isspace(*buf1))
		buf1++;
	if (*buf1 != ',') {
		if (!*buf1) {
			*buf2 = 0;
			return (0);
		}
		while (*buf1 && !isspace(*buf1) && *buf1 != ',')
			*buf2++ = shift(*buf1++, flag);
	} else
		*buf2++ = *buf1++;
	*buf2 = 0;
	while (isspace(*buf1))
		buf1++;
	return (*buf1 ? buf1 : 0);
}

shift(c, flg)
	char c;
	int flg;
{
	if (flg < 0)
		return isupper(c) ? tolower(c) : c;
	if (flg > 0)
		return islower(c) ? toupper(c) : c;
	return c;
}
SHAR_EOF
if test 1008 -ne "`wc -c battlestar/getcom.c`"
then
echo shar: error transmitting battlestar/getcom.c '(should have been 1008 characters)'
fi
cat << \SHAR_EOF > battlestar/battlestar.6
.. @(#)battlestar.6	1.1 11/18/84
.TH BATTLESTAR PUBLIC 
.UC 4
.SH NAME
battlestar \- a tropical adventure game
.SH SYNOPSIS
.B battlestar
[
.B -r (recover a saved game)
]
.br
.fi
.SH DESCRIPTION
.I Battlestar
is an adventure game in the classic style.  However, It's slightly less
of a
puzzle and more a game of exploration.  There are a few magical words
in the game, but on the whole, simple English
should suffice to make one's desires understandable to the parser.
.SH "THE SETTING"
In the days before the darkness came, when battlestars ruled the
heavens...
.br
.nf

		Three He made and gave them to His daughters,
		Beautiful nymphs, the goddesses of the waters.
		One to bring good luck and simple feats of wonder,
		Two to wash the lands and churn the waves asunder,
		Three to rule the world and purge the skies with thunder.
		
.fi
.PP
In those times great wizards were known and their powers were beyond
belief.  They could take any object from thin air, and, uttering the
word
'su,' could disappear.
.PP
In those times men were known for their lust of gold and desire to
wear fine weapons.  Swords and coats of mail were fashioned that could
withstand a laser blast.
.PP
But when the darkness fell, the rightful reigns were toppled.  Swords
and helms and heads of state went rolling across the grass.  The entire
fleet of battlestars was reduced to a single ship.
.SH "SAMPLE COMMANDS"
.nf

	take	---	take an object
	drop	---	drop an object

	wear	---	wear an object you are holding
	draw	---	carry an object you are wearing

	puton	---	take an object and wear it
	take off --	draw an object and drop it

	throw  <object> <direction>

	!	<shell esc>
	
.fi
.SH "IMPLIED OBJECTS"
.nf

	>-: take watermellon
	watermellon:
	Taken.
	>-: eat
	watermellon:
	Eaten.
	>-: take knife and sword and apple, drop all
	knife:
	Taken.
	broadsword:
	Taken.
	apple:
	Taken.
	knife:
	Dropped.
	broadsword:
	Dropped.
	apple:
	Dropped.
	>-: get
	knife:
	Taken.
	
.fi
.PP
Notice that the "shadow" of the next word stays around if you
want to take advantage of it.  That is, saying "take knife" and then
"drop"
will drop the knife you just took.
.SH "SCORE & INVEN"
The two commands "score" and "inven" will print out your current status
in
the game.
.SH "SAVING A GAME"
The command "save" will save your game in a file called "Bstar."  You
can
recover a saved game by using the "-r" option when you start up the
game.
.SH DIRECTIONS
The compass directions N, S, E, and W can be used if you have a compass.
If you don't have a compass, you'll have to say R, L, A, or B, which
stand for
Right, Left, Ahead, and Back.  Directions printed in room descriptions
are
always printed in R, L, A, & B relative directions.
.SH HISTORY
I wrote Battlestar in 1979 in order to experiment with the niceties of
the C Language.
Most interesting things that happen in the game are hardwired into the
code, so don't 
send me any hate mail about it!  Instead, enjoy art for art's sake!
.SH AUTHOR
David Riggle
.SH "INSPIRATION & ASSISTANCE"
Chris Guthrie
.br
Peter Da Silva
.br
Kevin Brown
.br
Edward Wang
.br
Ken Arnold & Company
.SH BUGS
Countless.
.SH "FAN MAIL"
Send to edward%ucbarpa@Berkeley.arpa, chris%ucbcory@berkeley.arpa,
riggle.pa@xerox.arpa.
SHAR_EOF
if test 3226 -ne "`wc -c battlestar/battlestar.6`"
then
echo shar: error transmitting battlestar/battlestar.6 '(should have been 3226 characters)'
fi
cat << \SHAR_EOF > battlestar/battlestar.c
#ifndef lint
static char sccsid[] = "@(#)battlestar.c	1.2 11/28/84";
#endif

#include "externs.h"

main(argc,argv)
int  argc;
char **argv;
{
	char mainbuf[LINELENGTH];
	char *next;

	initialize(argc < 2 || strcmp(argv[1], "-r"));
start:
	news();
	beenthere[position]++;
	if (notes[LAUNCHED])
		crash();		/* decrements fuel & crash */
	if (matchlight) {
		puts("Your match splutters out.");
		matchlight = 0;
	}
	if (!notes[CANTSEE] || testbit(inven,LAMPON) ||
	    testbit(location[position].objects, LAMPON)) {
		writedes();
		printobjs();
	} else
		puts("It's too dark to see anything in here!");
	whichway(location[position]);
run:
	next = getcom(mainbuf, sizeof mainbuf, ">-: ",
		"Please type in something.");
	for (wordcount = 0; next && wordcount < 20; wordcount++)
		next = getword(next, words[wordcount], -1);
	parse();
	switch (cypher()) {
		case -1:
			goto run;
		case 0:
			goto start;
		default:
			exit();
	}
}
SHAR_EOF
if test 926 -ne "`wc -c battlestar/battlestar.c`"
then
echo shar: error transmitting battlestar/battlestar.c '(should have been 926 characters)'
fi
cat << \SHAR_EOF > battlestar/globals.c
#ifndef lint
static char sccsid[] = "@(#)globals.c	1.2 11/28/84";
#endif

#include "externs.h"

int WEIGHT = MAXWEIGHT;
int CUMBER = MAXCUMBER;

char *objdes[NUMOFOBJECTS] = {
	"There is a knife here",
	"There is an exquisitely crafted sword and scabbard here.",
	0,				/* can land from here */
	"There is a fierce woodsman here brandishing a heavy mallet.",
	"There is an unweildly two-handed sword here.",
	"There is a bloody meat cleaver here.",
	"A rusty broadsword is lying here.",
	"There is an ancient coat of finely woven mail here.",
	"There is a old dented helmet with an ostrich plume here.",
	"There is a shield of some native tribe here.",
	"The maid's body is lying here. She was murdered!",
	"There is a Viper ready for launch here.",
	"A kerosene lantern is burning luridly here.",
	"An old pair of shoes has been discarded here.",
	0,				/* cylon */
	"There is a pair of pajamas here.",
	"A kingly robe of royal purple and spun gold is draped here.",
	"There is a strange golden amulet on the floor here.",
	"A medallion of solid gold shimmers on the ground nearby.",
	"A talisman of gold is lying here.",
	"A dead woodsman has fallen here. He was savagely murdered.",
	"A heavy wooden mallet lies nearby.",
	"There is a laser pistol here.",
       "A flower-like young goddess is bathing in the hot mineral pools. She is \nwatching you, but continues to steep and sing softly.",
	"The goddess is reclining on a bed of ferns and studying you intently.",
	"There is a grenade here",
	"There is a length of heavy chain here.",
	"There is a stout rope here.",
	"There is a pair of Levi's here.",
	"A bloody mace is lying on the ground here.",
	"There is a shovel here.",
	"A long, sharp halberd is propped up here.",
	"There is a compass here",
	"Wreckage and smoldering debris from a crash litter the ground here.",
	"A woodland Elf armed with a shield and deadly halberd lunges toward you!",
	"I think I hear footsteps behind us.",
	"There are a few coins here.",
	"There are some matches here.",
       "An unctuous man in a white suit and a dwarf are standing here.",
       "There are some ripe papayas here.",
       "There is a ripe pineapple here.",
       "There are some kiwi fruit here.",
       "There are some coconuts here.",
       "There is a ripe mango here.",
       "There is a sparkling diamond ring here.",
       "There is a colorful pink potion in a small crystal vial here.",
       "A gold bracelet is on the ground here.",
       "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.'",
       "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.'",
       "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!'",
       "An old timer with one eye missing and no money for a drink sits at the bar.",
       "You are flying through an asteroid field!",
       "A planet is nearby.",
       "The ground is charred here.",
       "There is a thermonuclear warhead here.",
       "The fragile, beautiful young goddess lies here.  You murdered her horribly.",
       "The old timer is lying here.  He is dead.",
       "The native girl's body is lying here.",
       "A native girl is sitting here.",
       "A gorgeous white stallion is standing here.",
       "The keys are in the ignition.",
       "A pot of pearls and jewels is sitting here.",
       "A bar of solid gold is here.",
       "There is a 10 kilogram diamond block here."

};

char *objsht[NUMOFOBJECTS] = {
	"knife",
	"fine sword",
	0,
	"Woodsman",
	"two-handed sword",
	"meat cleaver",
	"broadsword",
	"coat of mail",
	"plumed helmet",
	"shield",
	"maid's body",
	"viper",
	"lantern",
	"shoes",
	0,
	"pajamas",
	"robe",
	"amulet",
	"medallion",
	"talisman",
	"woodsman's body",
	"wooden mallet",
	"laser",
	0,
	0,
	"grenade",
	"chain",
	"rope",
	"levis",
	"mace",
	"shovel",
	"halberd",
	"compass",
	0,
	"Elf",
	0,
	"coins",
	"match book",
	0,
	"papayas",
	"pineapple",
	"kiwi",
	"coconuts",
	"mango",
	"ring",
	"potion",
	"bracelet",
	0,
	0,
	"Dark Lord",
	0,
	0,
	0,
	0,
	"warhead",
	"goddess's body",
	"old timer's body",
	"girl's body",
	0,
	"stallion",
	"car",
	"pot of jewels",
	"bar of gold",
	"diamond block"
};

char *ouch[NUMOFINJURIES] = {
	"some minor abrasions",
	"some minor lacerations",
	"a minor puncture wound",
	"a minor amputation",
	"a sprained wrist",
	"a fractured ankle and shattered kneecap",
	"a broken arm and dislocated shoulder",
	"a few broken ribs",
	"a broken leg and torn ligaments",
	"a broken back and ruptured spleen",
	"some deep incisions and a loss of blood",	
	"a fractured skull and mashed face",
	"a broken neck"
};

int objwt[NUMOFOBJECTS] = {
	1, 	5,	0,	10,	15,	2,	10,	10,
	3,	5,	50,	2500,	2,	1,	100,	1,	
	2,	1,	1,	1,	60,	10,	5,	0,
	50,	5,	15,	5,	1,	20,	10,	10,
	0,	0,	0,	0,	1,	0,	0,	1,
	1,	1,	2,	1,	0,	0,	0,	0,
	0,	0,	100,	0,	0,	0,	55,	47,
	50,	45,	45,	100,	2000,	30,	20,	10
};

int objcumber[NUMOFOBJECTS] = {
	1, 	5,	0,	150,	10,	1,	5,	2,
	2,	1,	5,	10,	1,	1,	10,	1,
	1,	1,	1,	1,	7,	5,	4,	0,
	0,	1,	1,	1,	1,	5,	4,	4,
	1,	0,	0,	0,	1,	0,	0,	1,
	1,	1,	3,	1,	0,	0,	1,	0,
	0,	0,	10,	0,	0,	0,	7,	8,
	10,	8,	8,	10,	10,	3,	1,	2
};

int win = 1;
int matchcount = 20;
int followgod = -1;
int followfight = -1;
SHAR_EOF
if test 5716 -ne "`wc -c battlestar/globals.c`"
then
echo shar: error transmitting battlestar/globals.c '(should have been 5716 characters)'
fi
cat << \SHAR_EOF > battlestar/init.c
#ifndef lint
static char sccsid[] = "@(#)init.c	1.2 11/28/84";
#endif

#include "externs.h"
#include <pwd.h>

initialize(startup)
	char startup;
{
	register struct objs *p;
	int die();

	puts("Version 4.2, fall 1984.");
	puts("First Adventure game written by His Lordship, the honorable");
	puts("Admiral D.W. Riggle\n");
	srand(getpid());
	getutmp(uname);
	wiz = wizard(uname);
	wordinit();
	if (startup) {
		location = dayfile;
		direction = NORTH;
		time = 0;
		snooze = CYCLE * 1.5;
		position = 22;
		setbit(wear, PAJAMAS);
		fuel = TANKFULL;
		torps = TORPEDOES;
		for (p = dayobjs; p->room != 0; p++)
			setbit(location[p->room].objects, p->obj);
	} else
		restore();
	signal(SIGINT, die);
}

getutmp(uname)
	char *uname;
{
	struct passwd *ptr;

	ptr = getpwuid(getuid());
	strcpy(uname, ptr ? ptr->pw_name : "");
}

char *list[] = {	/* hereditary wizards */
	"riggle",
	"chris",
	"edward",
	"comay",
	"yee",
	"dmr",
	"ken",
	0
};

char *badguys[] = {
	"wnj",
	"root",
	"ted",
	0
};

wizard(uname)
	char *uname;
{
	char flag;

	if (flag = checkout(uname))
		printf("You are the Great wizard %s.\n", uname);
	return flag;
}

checkout(uname)
	register char *uname;
{
	register char **ptr;

	for (ptr = list; *ptr; ptr++)
		if (strcmp(*ptr, uname) == 0)
			return 1;
	for (ptr = badguys; *ptr; ptr++)
		if (strcmp(*ptr, uname) == 0) {
			printf("You are the Poor anti-wizard %s.  Good Luck!\n",
				uname);
			CUMBER = 3;
			WEIGHT = 9;	/* that'll get him! */
			clock = 10;
			setbit(location[7].objects, WOODSMAN);	/* viper room */
			setbit(location[20].objects, WOODSMAN);	/* laser " */
			setbit(location[13].objects, DARK);	/* amulet " */
			setbit(location[8].objects, ELF);	/* closet */
			return 0;	/* anything else, Chris? */
		}
	return 0;
}
SHAR_EOF
if test 1757 -ne "`wc -c battlestar/init.c`"
then
echo shar: error transmitting battlestar/init.c '(should have been 1757 characters)'
fi
cat << \SHAR_EOF > battlestar/mkfile.c
#ifndef lint
static char sccsid[] = "@(#)mkfile.c	1.2 11/28/84";
#endif

#include <stdio.h>

FILE *from, *to;
int line = 1;
int c;
char *unctrl();

main(argc, argv)
	int argc;
	char **argv;
{
	register room;
	char bol;
	register i, j;
	char temp[100];

	if (argc != 2) {
		printf("Usage: %s filename\n", argv[0]);
		exit();
	}
	sprintf(temp, "%.*s.c", sizeof temp - 3, argv[1]);
	if ((from = fopen(argv[1], "r")) == 0) {
		perror(argv[1]);
		exit(1);
	}
	if ((to = fopen(temp, "w")) == 0) {
		perror(temp);
		exit(1);
        }
	fprintf(to, "#include \"externs.h\"\n\n");
	fprintf(to, "struct room %s[] = {\n", argv[1]);
	fprintf(to, "\t{ 0 },\n");
	while ((c = getc(from)) != '\n' && c != EOF)
		;
	for (room = 1; (i = getnum()) >= 0; room++) {
		if (c != ':')
			error("Format error (character '%s').", unctrl(c));
		if (room != i)
			error("Room number mismatch (%d should be %d).",
				i, room);
		while ((c = getc(from)) == ' ' || c == '\t')
			;
		fprintf(to, "\t{ \"");
		for (; c != '\n' && c != EOF; c = getc(from)) {
			if (c == '"')
				putc('\\', to);
			putc(c, to);
		}
		fprintf(to, "\",\n");
		if (c == EOF)
			error("Format error (character '%s').", unctrl(c));
		for (i = 0; i < 8 && (j = getnum()) >= 0; i++)
			fprintf(to, "%s%d", i ? ", " : "\t", j);
		fprintf(to, ",\n");
		if (j < 0)
			error("Format error (character '%s').", unctrl(c));
		for (; c == ' ' || c == '\t'; c = getc(from))
			;
		if (c != '\n')
			error("Format error (character '%s').", unctrl(c));
		bol = 0;
		putc('"', to);
		while ((c = getc(from)) != EOF && (c != '\n' || !bol)) {
			if (bol)
				fprintf(to, "\\n\\\n"), bol = 0;
			if (c == '\n') {
				line++;
				bol = 1;
			} else {
				if (c == '"')
					putc('\\', to);
				putc(c, to);
			}
		}
		fprintf(to, "\\n\" },\n");
	}
	fprintf(to, "};\n");
	fclose(from);
	fclose(to);
	exit(0);
}

getnum()
{
	register i = 0;

	for (; c == '\n' || c == '\t' || c == ' '; c = getc(from))
		if (c == '\n')
			line++;
	for (; c >= '0' && c <= '9'; c = getc(from))
		i = i * 10 + c - '0';
	return c == EOF ? -1 : i;
}

error(fmt, a, b, c, d)
{
	printf("line %d: ", line);
	printf(fmt, a, b, c, d);
	exit(1);
}

char *
unctrl(c)
	register c;
{
	char buf[5];

	if (c == EOF)
		return "EOF";
	c = (unsigned char) c;
	if (c < ' ')
		return sprintf(buf, "^%c", c + '@');
	if (c < 0x7f)
		return sprintf(buf, "%c", c);
	if (c == 0x7f)
		return "^?";
	return sprintf(buf, "\\%03o", c);
}
SHAR_EOF
if test 2419 -ne "`wc -c battlestar/mkfile.c`"
then
echo shar: error transmitting battlestar/mkfile.c '(should have been 2419 characters)'
fi
cat << \SHAR_EOF > battlestar/mkobjs.c
#ifndef lint
static char sccsid[] = "@(#)mkobjs.c	1.1 11/18/84";
#endif

#include <stdio.h>

FILE *from, *to;
int line = 1;
int c;
char *unctrl();

main(argc, argv)
	int argc;
	char **argv;
{
	register i;
	char temp[100];

	if (argc != 2) {
		printf("Usage: %s filename\n", argv[0]);
		exit();
	}
	sprintf(temp, "%.*s.c", sizeof temp - 3, argv[1]);
	if ((from = fopen(argv[1], "r")) == 0) {
		perror(argv[1]);
		exit(1);
	}
	if ((to = fopen(temp, "w")) == 0) {
		perror(temp);
		exit(1);
        }
	fprintf(to, "#include \"externs.h\"\n\n");
	fprintf(to, "struct objs %s[] = {\n", argv[1]);
	while ((c = getc(from)) != '\n' && c != EOF)
		;
	while ((i = getnum()) >= 0) {
		fprintf(to, "\t{ %d, ", i);
		if ((i = getnum()) < 0)
			error("Format error (character '%s').", unctrl(c));
		fprintf(to, "%d },\n", i);
	}
	fprintf(to, "\t0\n};\n");
	fclose(from);
	fclose(to);
	exit(0);
}

getnum()
{
	register i = 0;

	for (; c == '\n' || c == '\t' || c == ' '; c = getc(from))
		if (c == '\n')
			line++;
	for (; c >= '0' && c <= '9'; c = getc(from))
		i = i * 10 + c - '0';
	return c == EOF ? -1 : i;
}

error(fmt, a, b, c, d)
{
	printf("line %d: ", line);
	printf(fmt, a, b, c, d);
	exit(1);
}

char *
unctrl(c)
	register c;
{
	char buf[5];

	if (c == EOF)
		return "EOF";
	c = (unsigned char) c;
	if (c < ' ')
		return sprintf(buf, "^%c", c + '@');
	if (c < 0x7f)
		return sprintf(buf, "%c", c);
	if (c == 0x7f)
		return "^?";
	return sprintf(buf, "\\%03o", c);
}
SHAR_EOF
if test 1462 -ne "`wc -c battlestar/mkobjs.c`"
then
echo shar: error transmitting battlestar/mkobjs.c '(should have been 1462 characters)'
fi
cat << \SHAR_EOF > battlestar/mkwlist.c
#ifndef lint
static char sccsid[] = "@(#)mkwlist.c	1.1 11/18/84";
#endif

#include <stdio.h>

FILE *from, *to;
int line = 1;
int c;
char *unctrl();

main(argc, argv)
	int argc;
	char **argv;
{
	register i, j;

	if (argc != 2) {
		printf("Usage: %s filename\n", argv[0]);
		exit();
	}
	if ((from = fopen(argv[1], "r")) == 0) {
		perror(argv[1]);
		exit(1);
	}
	if ((to = fopen("wlist.c", "w")) == 0) {
		perror("wlist.c");
		exit(1);
        }
	fprintf(to, "#include \"externs.h\"\n\n");
	fprintf(to, "struct wlist wlist[] = {\n");
	while ((c = getc(from)) != '\n' && c != EOF)
		;
	if (c == '\n')
		c = getc(from);
	while (c != EOF) {
		for (; c == ' ' || c == '\t' || c == '\n'; c = getc(from))
			if (c == '\n')
				line++;
		if (c == EOF)
			break;
		fprintf(to, "\t{ \"");
		for (; c != ' ' && c != '\t' && c != '\n' && c != EOF; c = getc(from))
			putc(c, to);
		putc('"', to);
		if (c == EOF)
			error("Format error (character '%s').", unctrl(c));
		for (i = 0; i < 2 && (j = getnum()) >= 0; i++)
			fprintf(to, ", %d", j);
		fprintf(to, " },\n");
		if (j < 0)
			error("Format error (character '%s').", unctrl(c));
	}
	fprintf(to, "\t0\n};\n");
	fclose(from);
	fclose(to);
	exit(0);
}

getnum()
{
	register i = 0;

	for (; c == '\n' || c == '\t' || c == ' '; c = getc(from))
		if (c == '\n')
			line++;
	for (; c >= '0' && c <= '9'; c = getc(from))
		i = i * 10 + c - '0';
	return c == EOF ? -1 : i;
}

error(fmt, a, b, c, d)
{
	printf("line %d: ", line);
	printf(fmt, a, b, c, d);
	exit(1);
}

char *
unctrl(c)
	register c;
{
	char buf[5];

	if (c == EOF)
		return "EOF";
	c = (unsigned char) c;
	if (c < ' ')
		return sprintf(buf, "^%c", c + '@');
	if (c < 0x7f)
		return sprintf(buf, "%c", c);
	if (c == 0x7f)
		return "^?";
	return sprintf(buf, "\\%03o", c);
}
SHAR_EOF
if test 1772 -ne "`wc -c battlestar/mkwlist.c`"
then
echo shar: error transmitting battlestar/mkwlist.c '(should have been 1772 characters)'
fi
#	End of shell archive
exit 0

yee@ucbvax.ARPA (Peter E. Yee) (01/24/85)

This is part 4 of the Battlestar distribution.

#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
-----cut here-----cut here-----cut here-----cut here-----
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	battlestar/com1.c
#	battlestar/com2.c
#	battlestar/com3.c
#	battlestar/com4.c
#	battlestar/com5.c
#	battlestar/com6.c
# This archive created: Wed Jan 23 20:07:24 1985
cat << \SHAR_EOF > battlestar/com1.c
#ifndef lint
static char sccsid[] = "@(#)com1.c	1.2 11/28/84";
#endif

#include "externs.h"

move(thataway, token)
int thataway, token;
{
	wordnumber++;
	if ((!notes[CANTMOVE] && !notes[LAUNCHED]) || testbit(location[position].objects, LAND) || fuel > 0 && notes[LAUNCHED])
		if (thataway) {
			position = thataway;
			newway(token);
			time++;
		}
		else {
			puts("You can't go this way.");
			newway(token);
			whichway(location[position]);
			return(0);
		}
	else if (notes[CANTMOVE] && !notes[LAUNCHED])
		puts("You aren't able to move; you better drop something.");
	else
		puts("You are out of fuel; now you will rot in space forever!");
	return(1);
}

convert(tothis)		/* Converts day to night and vice versa. 	    */
int tothis;		/* Day objects are permanent.  Night objects are added*/
{			/* at dusk, and subtracted at dawn.		*/
	register struct objs *p;
	register i, j;

	if (tothis == TONIGHT) {
		for (i = 1; i <= NUMOFROOMS; i++)
			for (j = 0; j < NUMOFWORDS; j++)
				nightfile[i].objects[j] = dayfile[i].objects[j];
		for (p = nightobjs; p->room != 0; p++)
			setbit(nightfile[p->room].objects, p->obj);
		location = nightfile;
	} else {
		for (i = 1; i <= NUMOFROOMS; i++)
			for (j = 0; j < NUMOFWORDS; j++)
				dayfile[i].objects[j] = nightfile[i].objects[j];
		for (p = nightobjs; p->room != 0; p++)
			clearbit(dayfile[p->room].objects, p->obj);
		location = dayfile;
	}
}

news()
{
	register int n;
	int hurt;

	if (time > 30 && position < 32){
		puts("An explosion of shuddering magnitude splinters bulkheads and");
		puts("ruptures the battlestar's hull.  You are sucked out into the");
		puts("frozen void of space and killed.");
		die();
	}
	if (time > 20 && position < 32)
		puts("Explosions rock the battlestar.");
	if (time > snooze){
		puts("You drop from exhaustion...");
		zzz();
	}
	if (time > snooze - 5)
		puts("You're getting tired.");
	if (time > (rythmn + CYCLE)) {
		if (location == nightfile) {
			convert(TODAY);
			if (OUTSIDE && time - rythmn - CYCLE < 10) {
				puts("Dew lit sunbeams stretch out from a watery sunrise and herald the dawn.");
				puts("You awake from a misty dream-world into stark reality.");
				puts("It is day.");
			}
		} else {
			convert(TONIGHT);
			clearbit(location[POOLS].objects, BATHGOD);
			if (OUTSIDE && time - rythmn - CYCLE < 10) {
				puts("The dying sun sinks into the ocean, leaving a blood stained sunset.");
				puts("The sky slowly fades from orange to violet to black.  A few stars");
				puts("flicker on, and it is night.");
				puts("The world seems completly different at night.");
			}
		}
		rythmn = time - time % CYCLE;
	}
	if (!wiz && !tempwiz)
		if ((testbit(inven,TALISMAN) || testbit(wear,TALISMAN)) && (testbit(inven,MEDALION) || testbit(wear,MEDALION)) && (testbit(inven,AMULET) || testbit(wear,AMULET))){
			tempwiz = 1;
			puts("The three amulets glow and reenforce each other in power.\nYou are now a wizard.");
	}
	if (testbit(location[position].objects,ELF)){
		printf("%s\n",objdes[ELF]);
		fight(ELF,rnd(30));
	}
	if (testbit(location[position].objects,DARK)){
		printf("%s\n",objdes[DARK]);
		fight(DARK,100);
	}
	if (testbit(location[position].objects,WOODSMAN)){
		printf("%s\n",objdes[WOODSMAN]);
		fight(WOODSMAN,50);
	}
	switch(position){
		
		case 267:
		case 257:	/* entering a cave */
		case 274:
		case 246:
			notes[CANTSEE] = 1;
			break;
		case 160:
		case 216:	/* leaving a cave */
		case 230:
		case 231:
		case 232:
			notes[CANTSEE] = 0;
			break;
	}
	if (testbit(location[position].objects, GIRL))
		meetgirl = 1;
	if (meetgirl && CYCLE * 1.5 - time < 10){
		setbit(location[GARDEN].objects,GIRLTALK);
		setbit(location[GARDEN].objects,LAMPON);
		setbit(location[GARDEN].objects,ROPE);
	}
	if (position == DOCK && (beenthere[position] || time > CYCLE)){
		clearbit(location[DOCK].objects, GIRL);
		clearbit(location[DOCK].objects,MAN);
	}
	if (meetgirl && time - CYCLE * 1.5 > 10){
		clearbit(location[GARDEN].objects,GIRLTALK);
		clearbit(location[GARDEN].objects,LAMPON);
		clearbit(location[GARDEN].objects,ROPE);
		meetgirl = 0;
	}
	if (testbit(location[position].objects,CYLON)){
		puts("Oh my God, you're being shot at by an alien spacecraft!");
		printf("The targeting computer says we have %d seconds to attack!\n",clock);
		fflush(stdout);
		sleep(1);
		if (!visual()){
			hurt = rnd(NUMOFINJURIES);
			injuries[hurt] = 1;
			puts("Laser blasts sear the cockpit, and the alien veers off in a victory roll.");
			puts("The viper shudders under a terrible explosion.");
			printf("I'm afraid you have suffered %s.\n", ouch[hurt]);
		}
		else
			clearbit(location[position].objects,CYLON);
	}
	if (injuries[SKULL] && injuries[INCISE] && injuries[NECK]){
		puts("I'm afraid you have suffered fatal injuries.");
		die();
	}
	for (n=0; n < NUMOFINJURIES; n++)
		if (injuries[n] == 1){
			injuries[n] = 2;
			if (WEIGHT > 5)
				WEIGHT -= 5;
			else
				WEIGHT = 0;
		}
	if (injuries[ARM] == 2){
		CUMBER -= 5;
		injuries[ARM]++;
	}
	if (injuries[RIBS] == 2){
		CUMBER -= 2;
		injuries[RIBS]++;
	}
	if (injuries[SPINE] == 2){
		WEIGHT = 0;
		injuries[SPINE]++;
	}
	if (carrying > WEIGHT || encumber > CUMBER)
		notes[CANTMOVE] = 1;
	else
		notes[CANTMOVE] = 0;
}

crash()
{
	int hurt1,hurt2;

	fuel--;
	if (!location[position].flyhere || (testbit(location[position].objects,LAND) && fuel <= 0)){
		if (!location[position].flyhere)
			puts("You're flying too low.  We're going to crash!");
		else{ 
			puts("You're out of fuel.  We'll have to crash land!");
			if (!location[position].down){
				puts("Your viper strikes the ground and explodes into firey fragments.");
				puts("Thick black smoke billows up from the wreckage.");
				die();
			}
			position = location[position].down;
		}
		notes[LAUNCHED] = 0;
		setbit(location[position].objects,CRASH);
		time += rnd(CYCLE/4);
		puts("The viper explodes into the ground and you lose consciousness...");
		zzz();
		hurt1 = rnd(NUMOFINJURIES - 2) + 2;
		hurt2 = rnd(NUMOFINJURIES - 2) + 2;
		injuries[hurt1] = 1;
		injuries[hurt2] = 1;
		injuries[0] = 1;	/* abrasions */
		injuries[1] = 1;	/* lacerations */
		printf("I'm afraid you have suffered %s and %s.\n",ouch[hurt1],ouch[hurt2]);
	}
}
SHAR_EOF
if test 6171 -ne "`wc -c battlestar/com1.c`"
then
echo shar: error transmitting battlestar/com1.c '(should have been 6171 characters)'
fi
cat << \SHAR_EOF > battlestar/com2.c
#ifndef lint
static char sccsid[] = "@(#)com2.c	1.2 11/28/84";
#endif

#include "externs.h"

wearit()		/* synonyms = {sheathe, sheath} */
{
	register int n;
	int firstnumber, value;

	firstnumber = wordnumber;
	while(wordtype[++wordnumber] == ADJS);
	while(wordnumber <= wordcount){
		value = wordvalue[wordnumber];
		for (n=0; objsht[value][n]; n++);
		switch(value){
			
			case -1:
				puts("Wear what?");
				return(firstnumber);

			default:
				printf("You can't wear%s%s!\n",(objsht[value][n-1] == 's' ? " " : " a "),objsht[value]);
				return(firstnumber);

			case KNIFE:
		/*	case SHIRT:	*/
			case ROBE:
			case LEVIS:	/* wearable things */
			case SWORD:
			case MAIL:
			case HELM:
			case SHOES:
			case PAJAMAS:
			case COMPASS:
			case LASER:
			case AMULET:
			case TALISMAN:
			case MEDALION:
			case ROPE:
			case RING:
			case BRACELET:
			case GRENADE:

				if (testbit(inven,value)){
					clearbit(inven,value);
					setbit(wear,value);
					carrying -= objwt[value];
					encumber -= objcumber[value];
					time++;
					printf("You are now wearing %s %s.\n",(objsht[value][n-1] == 's' ? "the" : "a"), objsht[value]);
				}
				else if (testbit(wear,value))
					printf("You are already wearing the %s.\n", objsht[value]);
				else 
					printf("You aren't holding the %s.\n", objsht[value]);
				if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
					wordnumber++;
				else 
					return(firstnumber);
		} /* end switch */
	} /* end while */
	puts("Don't be ridiculous.");
	return(firstnumber);
}

put()		/* synonyms = {buckle, strap, tie} */
{
	if (wordvalue[wordnumber + 1] == ON){
		wordvalue[++wordnumber] = PUTON;
		return(cypher());
	}
	if (wordvalue[wordnumber + 1] == DOWN){
		wordvalue[++wordnumber] = DROP;
		return(cypher());
	}
	puts("I don't understand what you want to put.");
	return(-1);

}

draw() 			/* synonyms = {pull, carry} */
{
	return(take(wear));
}

use()
{
	while (wordtype[++wordnumber] == ADJS && wordnumber < wordcount);
	if (wordvalue[wordnumber] == AMULET && testbit(inven,AMULET) && position != FINAL){
		puts("The amulet begins to glow.");
		if (testbit(inven,MEDALION)){
			puts("The medallion comes to life too.");
			if (position == 114){
				location[position].down = 160;
				whichway(location[position]);
				puts("The waves subside and it is possible to descend to the sea cave now.");
				time++;
				return(-1);
			}
		}
		puts("A light mist falls over your eyes and the sound of purling water trickles in");
		puts("your ears.   When the mist lifts you are standing beside a cool stream.");
		if (position == 229)
			position = 224;
		else
			position = 229;
		time++;
		return(0);
	}
	else if (position == FINAL)
		puts("The amulet won't work in here.");
	else if (wordvalue[wordnumber] == COMPASS && testbit(inven,COMPASS))
		printf("Your compass points %s.\n",truedirec(NORTH,'-'));
	else if (wordvalue[wordnumber] == COMPASS)
		puts("You aren't holding the compass.");
	else if (wordvalue[wordnumber] == AMULET)
		puts("You aren't holding the amulet.");
	else
		puts("There is no apparent use.");
	return(-1);
}

murder()
{
	register int n;

	for (n=0; !((n == SWORD || n == KNIFE || n == TWO_HANDED || n == MACE || n == CLEAVER || n == BROAD || n == CHAIN || n == SHOVEL || n == HALBERD) && testbit(inven,n)) && n < NUMOFOBJECTS; n++);
	if (n == NUMOFOBJECTS)
		puts("You don't have suitable weapons to kill.");
	else {
		printf("Your %s should do the trick.\n",objsht[n]);
		while (wordtype[++wordnumber] == ADJS);
		switch(wordvalue[wordnumber]){
			
			case NORMGOD:
				if (testbit(location[position].objects,BATHGOD)){
					puts("The goddess's head slices off.  Her corpse floats in the water.");
					clearbit(location[position].objects,BATHGOD);
					setbit(location[position].objects,DEADGOD);
					power += 5;
					notes[JINXED]++;
				} else if (testbit(location[position].objects,NORMGOD)){
					puts("The goddess pleads but you strike her mercilessly.  Her broken body lies in a\npool of blood.");
					clearbit(location[position].objects,NORMGOD);
					setbit(location[position].objects,DEADGOD);
					power += 5;
					notes[JINXED]++;
					if (wintime)
						live();
				} else puts("I dont see her anywhere.");
				break;
			case TIMER:
				if (testbit(location[position].objects,TIMER)){
					puts("The old man offers no resistance.");
					clearbit(location[position].objects,TIMER);
					setbit(location[position].objects,DEADTIME);
					power++;
					notes[JINXED]++;
				} else puts("Who?");
				break;
			case NATIVE:
				if (testbit(location[position].objects,NATIVE)){
					puts("The girl screams as you cut her body to shreds.  She is dead.");
					clearbit(location[position].objects,NATIVE);
					setbit(location[position].objects,DEADNATIVE);
					power += 5;
					notes[JINXED]++;
				} else puts("What girl?");
				break;
			case MAN:
				if (testbit(location[position].objects,MAN)){
					puts("You strike him to the ground, and he coughs up blood.");
					puts("Your fantasy is over.");
					die();
				}
			case -1:
				puts("Kill what?");
				break;

			default:
				if (wordtype[wordnumber] != NOUNS)
					puts("Kill what?");
				else
					printf("You can't kill the %s!\n",objsht[wordvalue[wordnumber]]);
		}
	}
}

ravage()
{
	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount);
	if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){
		time++;
		switch(wordvalue[wordnumber]){
			case NORMGOD:
				puts("You attack the goddess, and she screams as you beat her.  She falls down");
				puts("crying and tries to hold her torn and bloodied dress around her.");
				power += 5;
				pleasure += 8;
				ego -= 10;
				wordnumber--;
				godready = -30000;
				murder();
				win = -30000;
				break;
			case NATIVE:
				puts("The girl tries to run, but you catch her and throw her down.  Her face is");
				puts("bleeding, and she screams as you tear off her clothes.");
				power += 3;
				pleasure += 5;
				ego -= 10;
				wordnumber--;
				murder();
				if (rnd(100) < 50){
					puts("Her screams have attracted attention.  I think we are surrounded.");
					setbit(location[ahead].objects,WOODSMAN);
					setbit(location[ahead].objects,DEADWOOD);
					setbit(location[ahead].objects,MALLET);
					setbit(location[back].objects,WOODSMAN);
					setbit(location[back].objects,DEADWOOD);
					setbit(location[back].objects,MALLET);
					setbit(location[left].objects,WOODSMAN);
					setbit(location[left].objects,DEADWOOD);
					setbit(location[left].objects,MALLET);
					setbit(location[right].objects,WOODSMAN);
					setbit(location[right].objects,DEADWOOD);
					setbit(location[right].objects,MALLET);
				}
				break;
			default:
				puts("You are perverted.");
		}
	}
	else
		puts("Who?");
}

follow()
{
	if (followfight == time){
		puts("The Dark Lord leaps away and runs down secret tunnels and corridoors.");
		puts("You chase him through the darkness and splash in pools of water.");
		puts("You have cornered him.  His laser sword extends as he steps forward.");
		position = FINAL;
		fight(DARK,75);
		setbit(location[position].objects,TALISMAN);
		setbit(location[position].objects,AMULET);
		return(0);
	}
	else if (followgod == time){
		puts("The goddess leads you down a steamy tunnel and into a high, wide chamber.");
		puts("She sits down on a throne.");
		position = 268;
		setbit(location[position].objects,NORMGOD);
		notes[CANTSEE] = 1;
		return(0);
	}
	else 
		puts("There is no one to follow.");
	return(-1);
}
SHAR_EOF
if test 7508 -ne "`wc -c battlestar/com2.c`"
then
echo shar: error transmitting battlestar/com2.c '(should have been 7508 characters)'
fi
cat << \SHAR_EOF > battlestar/com3.c
#ifndef lint
static char sccsid[] = "@(#)com3.c	1.1 11/18/84";
#endif

#include "externs.h"

dig()
{
	if (testbit(inven,SHOVEL)){
		puts("OK");
		time++;
		switch(position){
			case 144:		/* copse near beach */
				if (!notes[DUG]){
					setbit(location[position].objects,DEADWOOD);
					setbit(location[position].objects,COMPASS);
					setbit(location[position].objects,KNIFE);
					setbit(location[position].objects,MACE);
					notes[DUG] = 1;
				}
				break;

			default:
				puts("Nothing happens.");
		}
	}
	else	
		puts("You don't have a shovel.");
}

jump()
{
	register int n;

	switch(position){
		default:
			puts("Nothing happens.");
			return(-1);

		case 242:
			position = 133;
			break;
		case 214:
		case 215:
		case 162:
		case 159:
			position = 145;
			break;
		case 232:
			position = 275;
			break;
		case 3:
			position = 1;
			break;
		case 172:
			position = 201;
	}
	puts("Ahhhhhhh...");
	injuries[12] = injuries[8] = injuries[7] = injuries[6] = 1;
	for (n=0; n < NUMOFOBJECTS; n++)
		if (testbit(inven,n)){
			clearbit(inven,n);
			setbit(location[position].objects,n);
		}
	carrying = 0;
	encumber = 0;
	return(0);
}

bury()
{
	int value;

	if (testbit(inven,SHOVEL)){
		while(wordtype[++wordnumber] != OBJECT && wordtype[wordnumber] != NOUNS && wordnumber < wordcount);
		value = wordvalue[wordnumber];
		if (wordtype[wordnumber] == NOUNS && (testbit(location[position].objects,value) || value == BODY))
			switch(value){
				case BODY:
					wordtype[wordnumber] = OBJECT;
					if (testbit(inven,MAID) || testbit(location[position].objects,MAID))
						value = MAID;
					if (testbit(inven,DEADWOOD) || testbit(location[position].objects,DEADWOOD))
						value = DEADWOOD;
					if (testbit(inven,DEADGOD) || testbit(location[position].objects,DEADGOD))
						value = DEADGOD;
					if (testbit(inven,DEADTIME) || testbit(location[position].objects,DEADTIME))
						value = DEADTIME;
					if (testbit(inven,DEADNATIVE) || testbit(location[position].objects,DEADNATIVE))
						value = DEADNATIVE;
					break;

				case NATIVE:
				case NORMGOD:
					puts("She screams as you wrestle her into the hole.");
				case TIMER:
					power += 7;
					ego -= 10;
				case AMULET:
				case MEDALION:
				case TALISMAN:
					wordtype[wordnumber] = OBJECT;
					break;

				default:
					puts("Wha..?");
			}
		if (wordtype[wordnumber] == OBJECT && position > 88 && (testbit(inven,value) || testbit(location[position].objects,value))){
			puts("Buried.");
			if (testbit(inven,value)){
				clearbit(inven,value);
				carrying -= objwt[value];
				encumber -= objcumber[value];
			}
			clearbit(location[position].objects,value);
			switch(value){
				case MAID:
				case DEADWOOD:
				case DEADNATIVE:
				case DEADTIME:
				case DEADGOD:
					ego += 2;
					printf("The %s should rest easier now.\n",objsht[value]);
			}
		}
		else
			puts("It doesn't seem to work.");
	}
	else
		puts("You aren't holding a shovel.");
}

drink()
{
	register int n;

	if (testbit(inven,POTION)){
		puts("The cool liquid runs down your throat but turns to fire and you choke.");
		puts("The heat reaches your limbs and tingles your spirit.  You feel like falling");
		puts("asleep.");
		clearbit(inven, POTION);
		WEIGHT = MAXWEIGHT;
		CUMBER = MAXCUMBER;
		for (n=0; n < NUMOFINJURIES; n++)
			injuries[n] = 0;
		time++;
		zzz();
	}
	else
		puts("I'm not thirsty.");
}

shoot()
{
	int firstnumber, value;
	register int n;

	if (!testbit(inven,LASER))
		puts("You aren't holding a blaster.");
	else {
		firstnumber = wordnumber;
		while(wordtype[++wordnumber] == ADJS);
		while(wordnumber<=wordcount && wordtype[wordnumber] == OBJECT){
			value = wordvalue[wordnumber];
			printf("%s:\n", objsht[value]);
			for (n=0; objsht[value][n]; n++);
			if (testbit(location[position].objects,value)){
				clearbit(location[position].objects,value);
				time++;
				printf("The %s explode%s\n",objsht[value],(objsht[value][n-1]=='s' ? (objsht[value][n-2]=='s' ? "s." : ".") : "s."));
				if (value == BOMB)
					die();
			}
			else
				printf("I dont see any %s around here.\n", objsht[value]);
			if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
				wordnumber++;
			else
				return(firstnumber);
		}
			    /* special cases with their own return()'s */

		if (wordnumber <= wordcount && wordtype[wordnumber] == NOUNS){
			time++;
			switch(wordvalue[wordnumber]){
			
				case DOOR:
					switch(position){
						case 189:
						case 231:
							puts("The door is unhinged.");
							location[189].north = 231;
							location[231].south = 189;
							whichway(location[position]);
							break;
						case 30:
							puts("The wooden door splinters.");
							location[30].west = 25;
							whichway(location[position]);
							break;
						case 31:
							puts("The laser blast has no effect on the door.");
							break;
						case 20:
							puts("The blast hits the door and it explodes into flame.  The magnesium burns");
							puts("so rapidly that we have no chance to escape.");
							die();
						default:
							puts("Nothing happens.");
					}
					break;

				case NORMGOD:
					if (testbit(location[position].objects,BATHGOD)){
						puts("The goddess is hit in the chest and splashes back against the rocks.");
						puts("Dark blood oozes from the charred blast hole.  Her naked body floats in the");
						puts("pools and then off downstream.");
						clearbit(location[position].objects,BATHGOD);
						setbit(location[180].objects,DEADGOD);
						power += 5;
						ego -= 10;
						notes[JINXED]++;
					} else if (testbit(location[position].objects,NORMGOD)){
						puts("The blast catches the goddess in the stomach, knocking her to the ground.");
						puts("She writhes in the dirt as the agony of death taunts her.");
						puts("She has stopped moving.");
						clearbit(location[position].objects,NORMGOD);
						setbit(location[position].objects,DEADGOD);
						power += 5;
						ego -= 10;
						notes[JINXED]++;
						if (wintime)
							live();
						break;
					} else
						puts("I don't see any goddess around here.");
					break;

				case TIMER:
					if (testbit(location[position].objects,TIMER)){
						puts("The old man slumps over the bar.");
						power++;
						ego -= 2;
						notes[JINXED]++;
						clearbit(location[position].objects,TIMER);
						setbit(location[position].objects,DEADTIME);
					}
					else puts("What old timer?");
					break;
				case MAN:
					if (testbit(location[position].objects,MAN)){
						puts("The man falls to the ground with blood pouring all over his white suit.");
						puts("Your fantasy is over.");
						die();
					}
					else puts("What man?");
					break;
				case NATIVE:
					if (testbit(location[position].objects,NATIVE)){
						puts("The girl is blown backwards several feet and lies in a pool of blood.");
						clearbit(location[position].objects,NATIVE);
						setbit(location[position].objects,DEADNATIVE);
						power += 5;
						ego -= 2;
						notes[JINXED]++;
					} else puts("There is no girl here.");
					break;
				case -1:
					puts("Shoot what?");
					break;

				default:
					printf("You can't shoot the %s.\n",objsht[wordvalue[wordnumber]]);
			}
		}
		else puts("You must be a looney.");
	}
	return(firstnumber);
}
SHAR_EOF
if test 7231 -ne "`wc -c battlestar/com3.c`"
then
echo shar: error transmitting battlestar/com3.c '(should have been 7231 characters)'
fi
cat << \SHAR_EOF > battlestar/com4.c
#ifndef lint
static char sccsid[] = "@(#)com4.c	1.2 11/28/84";
#endif

#include "externs.h"

take(from)
unsigned int from[];
{
	int firstnumber, heavy, bulky, value;
	register int n;

	firstnumber = wordnumber;
	if (wordnumber < wordcount && wordvalue[wordnumber+1] == OFF){
		wordnumber++;
		wordvalue[wordnumber] = TAKEOFF;
		return(cypher());
	}
	else {
		while(wordtype[++wordnumber] == ADJS);
		while(wordnumber<=wordcount && wordtype[wordnumber] == OBJECT){
			value = wordvalue[wordnumber];
			printf("%s:\n", objsht[value]);
			for (n=0; objsht[value][n]; n++);
			heavy = (carrying + objwt[value]) <= WEIGHT;
			bulky = (encumber + objcumber[value]) <= CUMBER;
			if ((testbit(from,value) || wiz || tempwiz) && heavy && bulky && !testbit(inven,value)){
				setbit(inven,value);
				carrying += objwt[value];
				encumber += objcumber[value];
				time++;
				if (testbit(from,value))
					printf("Taken.\n");
				else
					printf("Zap! Taken from thin air.\n");
				clearbit(from,value);
				if (value == MEDALION)
					win--;
			}
			else if (testbit(inven,value))
				printf("You're already holding%s%s.\n", (objsht[value][n-1] == 's' ? " " : " a "),objsht[value]);
			else if (!heavy)
				printf("The %s %s too heavy.\n", objsht[value],(objsht[value][n-1] == 's' ? "are" : "is"));
			else if (!bulky)
				printf("The %s %s too cumbersome to hold.\n", objsht[value],(objsht[value][n-1] == 's' ? "are" : "is"));
			else
				printf("I dont see any %s around here.\n", objsht[value]);
			if (wordnumber < wordcount -1 && wordvalue[++wordnumber] == AND)
				wordnumber++;
			else
				return(firstnumber);
		}
	}
			    /* special cases with their own return()'s */

	if (wordnumber <= wordcount && wordtype[wordnumber] == NOUNS)
		switch(wordvalue[wordnumber]){
			
			case SWORD:
				if (testbit(from, SWORD)){
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				if (testbit(from, TWO_HANDED)){
					wordvalue[wordnumber] = TWO_HANDED;
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				wordvalue[wordnumber] = BROAD;
				wordtype[wordnumber--] = OBJECT;
				return(take(from));

			case BODY:
				if (testbit(from,MAID)){
					wordvalue[wordnumber] = MAID;
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				else if (testbit(from,DEADWOOD)){
					wordvalue[wordnumber] = DEADWOOD;
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				else if (testbit(from,DEADNATIVE)){
					wordvalue[wordnumber] = DEADNATIVE;
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				else if (testbit(from,DEADGOD)){
					wordvalue[wordnumber] = DEADGOD;
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				else {
					wordvalue[wordnumber] = DEADTIME;
					wordtype[wordnumber--] = OBJECT;
					return(take(from));
				}
				break;

			case AMULET:
				if (testbit(location[position].objects,AMULET)){
					puts("The amulet is warm to the touch, and its beauty catches your breath.");
					puts("A mist falls over your eyes, but then it is gone.  Sounds seem clearer");
					puts("and sharper but far away as if in a dream.  The sound of purling water reaches");
					puts("you from afar.  The mist falls again, and your heart leaps in horror.  The gold");
					puts("freezes your hands and fathomless darkness engulfs your soul.");
				}
				wordtype[wordnumber--] = OBJECT;
				return(take(from));

			case MEDALION:
				if (testbit(location[position].objects, MEDALION)){
					puts("The medallion is warm, and it rekindles your spirit with the warmth of life.");
					puts("Your amulet begins to glow as the medallion is brought near to it, and together\nthey radiate.");
				}
				wordtype[wordnumber--] = OBJECT;
				return(take(from));

			case TALISMAN:
				if (testbit(location[position].objects,TALISMAN)){
					puts("The talisman is cold to the touch, and it sends a chill down your spine.");
				}
				wordtype[wordnumber--] = OBJECT;
				return(take(from));

			case NORMGOD:
				if (testbit(location[position].objects,BATHGOD) && (testbit(wear,AMULET) || testbit(inven,AMULET))){
					puts("She offers a delicate hand, and you help her out of the sparkling springs.");
					puts("Water droplets like liquid silver bedew her golden skin, but when they part");
					puts("from her, they fall as teardrops.  She wraps a single cloth around her and");
					puts("ties it at the waist.  Around her neck hangs a golden amulet.");
					puts("She bids you to follow her.");
					pleasure++;
					followgod = time;
					clearbit(location[position].objects,BATHGOD);
				} else if (!testbit(location[position].objects,BATHGOD))
					puts("You're in no position to take her.");
				else 
					puts("She moves away from you.");
				break;

			default:
				puts("It doesn't seem to work.");
		}
	else
		puts("You've got to be kidding.");
	return(firstnumber);
}

throw(name)
	char *name;
{
	int n;
	int deposit = 0;
	int first, value;

	first = wordnumber;
	if (drop(name) != -1){
		switch(wordvalue[wordnumber]){
			
			case AHEAD:
				deposit = ahead;
				break;

			case BACK:
				deposit = back;
				break;

			case LEFT:
				deposit = left;
				break;

			case RIGHT:
				deposit = right;
				break;

			case UP:
				deposit = location[position].up * (location[position].access || position == FINAL);
				break;

			case DOWN:
				deposit = location[position].down;
				break;
		}
		wordnumber = first;
		while (wordtype[++wordnumber] == ADJS);
		while (wordnumber <= wordcount){
			value = wordvalue[wordnumber];
			if (deposit && testbit(location[position].objects,value)){
				clearbit(location[position].objects,value);
				if (value != GRENADE)
					setbit(location[deposit].objects,value);
				else{
					puts("A thundering explosion nearby sends up a cloud of smoke and shrapnel.");
					for (n = 0; n < NUMOFWORDS; n ++)
						location[deposit].objects[n] = 0;
					setbit(location[deposit].objects,CHAR);
				}
				if (value == ROPE && position == FINAL)
					location[position].access = 1;
				switch(deposit){
					case 189:
					case 231:
						puts("The stone door is unhinged.");
						location[189].north = 231;
						location[231].south = 189;
						break;
					case 30:
						puts("The wooden door is blown open.");
						location[30].west = 25;
						break;
					case 31:
						puts("The door is not damaged.");
				}
			}
			else if (value == GRENADE && testbit(location[position].objects,value)){
				puts("You are blown into shreds when your grenade explodes.");
				die();
			}
			if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
				wordnumber++;
			else 
				return(first);
		}
		return(first);
	}
	return(first);
}

drop(name)
char *name;
{
	
	int firstnumber, value;

	firstnumber = wordnumber;
	while (wordtype[++wordnumber] == ADJS)
		;
	while (wordnumber<=wordcount && (wordtype[wordnumber] == OBJECT || wordtype[wordnumber] == NOUNS)) {
		value = wordvalue[wordnumber];
		printf("%s:\n", objsht[value]);
		if (testbit(inven,value)){
			clearbit(inven,value);
			carrying -= objwt[value];
			encumber -= objcumber[value];
			if (value == BOMB){
				puts("The bomb explodes.  A blinding white light and immense concussion obliterate us.");
				die();
			}
			if (value != AMULET && value != MEDALION && value != TALISMAN)
				setbit(location[position].objects,value);
			else
				tempwiz = 0;
			time++;
			if (*name == 'K')
				puts("Drop kicked.");
			else
				printf("%s.\n", name);
		}
		else {
			if (*name != 'K') {
				printf("You aren't holding the %s.\n", objsht[value]);
				if (testbit(location[position].objects,value)) {
					if (*name == 'T')
						puts("Kicked instead.");
					else if (*name == 'G')
						puts("Given anyway.");
				}
			} else
				puts("Kicked.");
		}
		if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
			wordnumber++;
		else
			return(firstnumber);
	}
	puts("Do what?");
	return(-1);
}

takeoff()
{
	wordnumber = take(wear);
	return(drop("Dropped"));
}

puton()
{
	wordnumber = take(location[position].objects);
	return(wearit());
}

eat()
{
	register int n;
	int firstnumber, value;

	firstnumber = wordnumber;
	while(wordtype[++wordnumber] == ADJS);
	while(wordnumber <= wordcount){
		value = wordvalue[wordnumber];
		for (n=0; objsht[value][n]; n++);
		switch(value){
			
			case -1:
				puts("Eat what?");
				return(firstnumber);

			default:
				printf("You can't eat%s%s!\n",(objsht[value][n-1] == 's' ? " " : " a "),objsht[value]);
				return(firstnumber);

			case PAPAYAS:
			case PINEAPPLE:
			case KIWI:
			case COCONUTS:	/* eatable things */
			case MANGO:

				printf("%s:\n",objsht[value]);
				if (testbit(inven,value) && time > ate - CYCLE && testbit(inven,KNIFE)){
					clearbit(inven,value);
					carrying -= objwt[value];
					encumber -= objcumber[value];
					ate = max(time,ate) + CYCLE/3;
					snooze += CYCLE/10;
					time++;
					puts("Eaten.  You can explore a little longer now.");
				}
				else if (time < ate - CYCLE)
					puts("You're stuffed.");
				else if (!testbit(inven,KNIFE))
					puts("You need a knife.");
				else
					printf("You aren't holding the %s.\n", objsht[value]);
				if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
					wordnumber++;
				else 
					return(firstnumber);
		} /* end switch */
	} /* end while */
	return(firstnumber);
}
SHAR_EOF
if test 9323 -ne "`wc -c battlestar/com4.c`"
then
echo shar: error transmitting battlestar/com4.c '(should have been 9323 characters)'
fi
cat << \SHAR_EOF > battlestar/com5.c
#ifndef lint
static char sccsid[] = "@(#)com5.c	1.2 11/28/84";
#endif

#include "externs.h"

kiss()
{
	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount);
	if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){
		pleasure++;
		printf("Kissed.\n");
		switch (wordvalue[wordnumber]){
			case NORMGOD:
			switch(godready++){
				case 0:
					puts("She squirms and avoids your advances.");
					break;
				case 1:
					puts("She is coming around; she didn't fight it as much.");
					break;
				case 2:
					puts("She's begining to like it.");
					break;
				default:
					puts("She's gone limp.");
					
			}
			break;
			case NATIVE:
				puts("The lips are warm and her body robust.  She pulls you down to the ground.");
				break;
			case TIMER:
				puts("The old man blushes.");
				break;
			case MAN:
				puts("The dwarf punches you in the kneecap.");
				break;
			default:
				pleasure--;
		}
	}
	else	puts("I'd prefer not to.");
}

love()
{
	register int n;

	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount);
	if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){
		if (wordvalue[wordnumber] == NORMGOD && !loved)
			if (godready >= 2){
				puts("She cuddles up to you, and her mouth starts to work:\n'That was my sister's amulet.  The lovely goddess, Purl, was she.  The Empire\ncaptured her just after the Darkness came.  My other sister, Vert, was killed\nby the Dark Lord himself.  He took her amulet and warped its power.\nYour quest was foretold by my father before he died, but to get the Dark Lord's\namulet you must use cunning and skill.  I will leave you my amulet.");
				puts("which you may use as you wish.  As for me, I am the last goddess of the\nwaters.  My father was the Island King, and the rule is rightfully mine.'\n\nShe pulls the throne out into a large bed.");
				power++;
				pleasure += 15;
				ego++;
				if (card(injuries, NUMOFINJURIES)){
					puts("Her kisses revive you; your wounds are healed.\n");
					for (n=0; n < NUMOFINJURIES; n++)
						injuries[n] = 0;
					WEIGHT = MAXWEIGHT;
					CUMBER = MAXCUMBER;
				}
				printf("Goddess:\n");
				if (!loved)
					setbit(location[position].objects,MEDALION);
				loved = 1;
				time += 10;
				zzz();
			}
			else {
				puts("You wish!");
				return;
			}
		if (wordvalue[wordnumber] == NATIVE){
			puts("The girl is easy prey.  She peals off her sarong and indulges you.");
			power++;
			pleasure += 5;
			printf("Girl:\n");
			time += 10;
			zzz();
		}
		printf("Loved.\n");
	}
	else puts("I't doesn't seem to work.");
}

zzz()
{
	int oldtime;
	register int n;

	oldtime = time;
	if ((snooze - time) < (0.75 * CYCLE)){
		time += 0.75 * CYCLE - (snooze - time);
		printf("<zzz>");
		for (n = 0; n < time - oldtime; n++)
			printf(".");
		printf("\n");
		snooze += 3 * (time - oldtime);
		if (notes[LAUNCHED]){
			fuel -= (time - oldtime);
			if (location[position].down){
				position = location[position].down;
				crash();
			}
			else
				notes[LAUNCHED] = 0;
		}
		if (OUTSIDE && rnd(100) < 50){
			puts("You are awakened abruptly by the sound of someone nearby.");
			switch(rnd(4)){
				case 0:
					if (ucard(inven)){
						n = rnd(NUMOFOBJECTS);
						while(!testbit(inven,n))
							n = rnd(NUMOFOBJECTS);
						clearbit(inven,n);
						if (n != AMULET && n != MEDALION && n != TALISMAN)
							setbit(location[position].objects,n);
						carrying -= objwt[n];
						encumber -= objcumber[n];
					}
					puts("A fiendish little Elf is stealing your treasures!");
					fight(ELF,10);
					break;
				case 1:
					setbit(location[position].objects,DEADWOOD);
					break;
				case 2:
					setbit(location[position].objects,HALBERD);
					break;
				default:
					break;
			}
		}
	}
	else
		return(0);
	return(1);
}

chime()
{
	if ((time / CYCLE + 1) % 2 && OUTSIDE)
		switch((time % CYCLE)/(CYCLE / 7)){
			case 0:
				puts("It is just after sunrise.");
				break;
			case 1:
				puts("It is early morning.");
				break;
			case 2:
				puts("It is late morning.");
				break;
			case 3:
				puts("It is near noon.");
				break;
			case 4:
				puts("It is early afternoon.");
				break;
			case 5:
				puts("It is late afternoon.");
				break;
			case 6:
				puts("It is near sunset.");
				break;
		}
	else if (OUTSIDE)
		switch((time % CYCLE)/(CYCLE / 7)){
			case 0:
				puts("It is just after sunset.");
				break;
			case 1:
				puts("It is early evening.");
				break;
			case 2:
				puts("The evening is getting old.");
				break;
			case 3:
				puts("It is near midnight.");
				break;
			case 4:
				puts("These are the wee hours of the morning.");
				break;
			case 5:
				puts("The night is waning.");
				break;
			case 6:
				puts("It is almost morning.");
				break;
		}
	else
		puts("I can't tell the time in here.");
}

give()
{
	int obj = -1, result = -1, person = 0, firstnumber, last1, last2;

	firstnumber = wordnumber;
	while (wordtype[++wordnumber] != OBJECT  && wordvalue[wordnumber] != AMULET && wordvalue[wordnumber] != MEDALION && wordvalue[wordnumber] != TALISMAN && wordnumber <= wordcount);
	if (wordnumber <= wordcount){
		obj = wordvalue[wordnumber];
		if (obj == EVERYTHING)
			wordtype[wordnumber] = -1;
		last1 = wordnumber;
	}
	wordnumber = firstnumber;
	while ((wordtype[++wordnumber] != NOUNS || wordvalue[wordnumber] == obj) && wordnumber <= wordcount);
	if (wordtype[wordnumber] == NOUNS){
		person = wordvalue[wordnumber];
		last2 = wordnumber;
	}
	wordnumber = last1 - 1;
	if (person && testbit(location[position].objects,person))
		if (person == NORMGOD && godready < 2 && !(obj == RING || obj == BRACELET))
			puts("The goddess won't look at you.");
		else
			result = drop("Given");
	else {
		puts("I don't think that is possible.");
		return(0);
	}
	if (result != -1 && (testbit(location[position].objects,obj) || obj == AMULET || obj == MEDALION || obj == TALISMAN)){
		clearbit(location[position].objects,obj);
		time++;
		ego++;
		switch(person){
			case NATIVE:
				puts("She accepts it shyly.");
				ego += 2;
				break;
			case NORMGOD:
				if (obj == RING || obj == BRACELET){
					puts("She takes the charm and puts it on.  A little kiss on the cheek is");
					puts("your reward.");
					ego += 5;
					godready += 3;
				}
				if (obj == AMULET || obj == MEDALION || obj == TALISMAN){
					win++;
					ego += 5;
					power -= 5;
					if (win >= 3){
						puts("The powers of the earth are now legitimate.  You have destroyed the Darkness");
						puts("and restored the goddess to her thrown.  The entire island celebrates with");
						puts("dancing and spring feasts.  As a measure of her gratitude, the goddess weds you");
						puts("in the late summer and crowns you Prince Liverwort, Lord of Fungus.");
						puts("\nBut, as the year wears on and autumn comes along, you become restless and");
						puts("yearn for adventure.  The goddess, too, realizes that the marriage can't last.");
						puts("She becomes bored and takes several more natives as husbands.  One evening,");
						puts("after having been out drinking with the girls, she kicks the throne particulary");
						puts("hard and wakes you up.  (If you want to win this game, you're going to have to\nshoot her!)");
						clearbit(location[position].objects,MEDALION);
						wintime = time;
					}
				}
				break;
			case TIMER:
				if (obj == COINS){
					puts("He fingers the coins for a moment and then looks up agape.  `Kind you are and");
					puts("I mean to repay you as best I can.'  Grabbing a pencil and cocktail napkin...\n");
					printf(  "+-----------------------------------------------------------------------------+\n");
					printf(  "|				   xxxxxxxx\\				      |\n");
					printf(  "|				       xxxxx\\	CLIFFS			      |\n");
					printf(  "|		FOREST			  xxx\\				      |\n");
					printf(  "|				\\\\	     x\\        	OCEAN		      |\n");
					printf(  "|				||	       x\\			      |\n");
					printf(  "|				||  ROAD	x\\			      |\n");
					printf(  "|				||		x\\			      |\n");
					printf(  "|		SECRET		||	  .........			      |\n");
					printf(  "|		 - + -		||	   ........			      |\n");
					printf(  "|		ENTRANCE	||		...      BEACH		      |\n");
					printf(  "|				||		...		  E	      |\n");
					printf(  "|				||		...		  |	      |\n");
					printf(  "|				//		...	    N <-- + --- S     |\n");
					printf(  "|		PALM GROVE     //		...		  |	      |\n");
					printf(  "|			      //		...		  W	      |\n");
					printf(  "+-----------------------------------------------------------------------------+\n");
					puts("\n`This map shows a secret entrance to the catacombs.");
					puts("You will know when you arrive because I left an old pair of shoes there.'");
				}
				break;
		}
	}
	wordnumber = max(last1,last2);
	return(firstnumber);
}
SHAR_EOF
if test 8811 -ne "`wc -c battlestar/com5.c`"
then
echo shar: error transmitting battlestar/com5.c '(should have been 8811 characters)'
fi
cat << \SHAR_EOF > battlestar/com6.c
#ifndef lint
static char sccsid[] = "@(#)com6.c	1.2 11/28/84";
#endif

#include "externs.h"

launch()
{
	if (testbit(location[position].objects,VIPER) && !notes[CANTLAUNCH]){
		if (fuel > 4){
			clearbit(location[position].objects,VIPER);
			position = location[position].up;
			notes[LAUNCHED] = 1;
			time++;
			fuel -= 4;
			puts("You climb into the viper and prepare for launch.");
			puts("With a touch of your thumb the turbo engines ignite, thrusting you back into\nyour seat.");
			return(1);
		}
		else
			puts("Not enough fuel to launch.");
	 }
	 else
		puts("Can't launch.");
	 return(0);
}

land()
{
	if (notes[LAUNCHED] && testbit(location[position].objects,LAND) && location[position].down){
		notes[LAUNCHED] = 0;
		position = location[position].down;
		setbit(location[position].objects,VIPER);
		fuel -= 2;
		time++;
		puts("You are down.");
		return(1);
	}
	else
		puts("You can't land here.");
	return(0);
}

die() 		/* endgame */
{
	printf("bye.\nYour rating was %s.\n", rate());
	post(' ');
	exit(0);
}

live()
{
	puts("\nYou win!");
	post('!');
	exit(0);
}

#include <sys/time.h>
post(ch)
char ch;
{
	FILE *fp;
	struct timeval tv;
	char *date;
	int s = sigblock(sigmask(SIGINT));

	gettimeofday(&tv, (struct timezone *)0);	/* can't call time */
	date = ctime(&tv.tv_sec);
	date[24] = '\0';
	if (fp = fopen(logfile,"a")) {
		fprintf(fp, "%s  %8s  %c%20s", date, uname, ch, rate());
		if (wiz)
			fprintf(fp, "   wizard\n");
		else if (tempwiz)
			fprintf(fp, "   WIZARD!\n");
		else
			fprintf(fp, "\n");
	} else
		perror(logfile);
	sigsetmask(s);
}

char *
rate()
{
	int score;

	score = max(max(pleasure,power),ego);
	if (score == pleasure){
		if (score < 5)
			return("novice");
		else if (score < 20)
			return("junior voyeur");
		else if (score < 35)
			return("Don Juan");
		else return("Marquis De Sade");
	}
	else if (score == power){
		if (score < 5)
			return("serf");
		else if (score < 8)
			return("Samurai");
		else if (score < 13)
			return("Klingon");
		else if (score < 22)
			return("Darth Vader");
		else return("Sauron the Great");
	}
	else{
		if (score < 5)
			return("Polyanna");
		else if (score < 10)
			return("philanthropist");
		else if (score < 20)
			return("Tattoo");
		else return("Mr. Roarke");
	}
}

drive()
{
	if (testbit(location[position].objects,CAR)){
		puts("You hop in the car and turn the key.  There is a perceptible grating noise,");
		puts("and an explosion knocks you unconscious...");
		clearbit(location[position].objects,CAR);
		setbit(location[position].objects,CRASH);
		injuries[5] = injuries[6] = injuries[7] = injuries[8] = 1;
		time += 15;
		zzz();
		return(0);
	}
	else
		puts("There is nothing to drive here.");
	return(-1);
}

ride()
{
	if (testbit(location[position].objects,HORSE)){
		puts("You climb onto the stallion and kick it in the guts.  The stupid steed launches");
		puts("forward through bush and fern.  You are thrown and the horse gallups off.");
		clearbit(location[position].objects,HORSE);
		while (!(position = rnd(NUMOFROOMS+1)) || !OUTSIDE || !beenthere[position] || location[position].flyhere);
		setbit(location[position].objects,HORSE);
		if (location[position].north)
			position = location[position].north;
		else if (location[position].south)
			position = location[position].south;
		else if (location[position].east)
			position = location[position].east;
		else
			position = location[position].west;
		return(0);
	}
	else puts("There is no horse here.");
	return(-1);
}

light()		/* synonyms = {strike, smoke} */
{		/* for matches, cigars */
	if (testbit(inven,MATCHES) && matchcount){
		puts("Your match splutters to life.");
		time++;
		matchlight = 1;
		matchcount--;
		if (position == 217){
			puts("The whole bungalow explodes with an intense blast.");
			die();
		}
	}
	else puts("You're out of matches.");
}
SHAR_EOF
if test 3823 -ne "`wc -c battlestar/com6.c`"
then
echo shar: error transmitting battlestar/com6.c '(should have been 3823 characters)'
fi
#	End of shell archive
exit 0

yee@ucbvax.ARPA (Peter E. Yee) (01/24/85)

This is part 5 of the BATTLESTAR distribution.

#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
-----cut here-----cut here-----cut here-----cut here-----
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	battlestar/battlewords
#	battlestar/com7.c
#	battlestar/globals.c
#	battlestar/init.c
#	battlestar/misc.c
#	battlestar/parse.c
#	battlestar/room.c
#	battlestar/save.c
# This archive created: Wed Jan 23 20:09:43 1985
cat << \SHAR_EOF > battlestar/battlewords
@(#)battlewords	1.2 11/28/84
knife	0	1
sword	1	2
scabbard	1	1
fine	1	1
two-handed	4	1
cleaver	5	1
broadsword	6	1
mail	7	1
coat	7	1
helmet	8	1
shield	9	1
maid	10	1
maid's	10	1
body	10	2
viper	11	1
lamp	12	1
lantern	12	1
shoes	13	1
pajamas	15	1
robe	16	1
amulet	17	2
medallion	18	2
talisman	19	2
woodsman	20	1
woodsman's	20	1
mallet	21	1
laser	22	1
pistol	22	1
blaster	22	1
gun	22	1
goddess	24	2
grenade	25	1
chain	26	1
rope	27	1
levis	28	1
pants	28	1
mace	29	1
shovel	30	1
halberd	31	1
compass	32	1
elf	34	1
coins	36	1
matches	37	1
match	37	1
book	37	1
man	38	2
papayas	39	1
pineapple	40	1
kiwi	41	1
coconuts	42	1
mango	43	1
ring	44	1
potion	45	1
bracelet	46	1
timer	50	2
bomb	54	1
warhead	54	1
girl	58	2
native	58	2
horse	59	1
stallion	59	1
car	60	1
volare	60	1
pot	61	1
jewels	61	1
bar	62	1
diamond	63	1
block	63	1
up	1000	0
u	1000	0
down	1001	0
d	1001	0
ahead	1002	0
a	1002	0
back	1003	0
b	1003	0
right	1004	0
r	1004	0
left	1005	0
l	1005	0
take	1006	0
get	1006	0
use	1007	0
look	1008	0
lo	1008	0
quit	1009	0
q	1009	0
su	1014	0
drop	1015	0
draw	1017	0
pull	1017	0
carry	1017	0
wear	1019	0
sheathe	1019	0
put	1020	0
buckle	1020	0
strap	1020	0
tie	1020	0
inven	1021	0
i	1021	0
everything	1022	1
all	1022	1
and	1023	5
kill	1024	0
fight	1024	0
ravage	1025	0
rape	1025	0
undress	1026	0
throw	1027	0
launch	1028	0
land	1029	0
light	1030	0
strike	1030	0
follow	1031	0
chase	1031	0
kiss	1032	0
love	1033	0
fuck	1033	0
give	1034	0
smite	1035	0
attack	1035	0
swing	1035	0
stab	1035	0
slice	1035	0
cut	1035	0
hack	1035	0
shoot	1036	0
blast	1036	0
on	1037	3
off	1038	3
time	1039	0
sleep	1040	0
dig	1041	0
eat	1042	0
swim	1043	0
drink	1044	0
door	1045	2
save	1046	0
ride	1047	0
mount	1047	0
drive	1048	0
start	1048	0
score	1049	0
points	1049	0
bury	1050	0
jump	1051	0
kick	1052	0
kerosene	0	4
plumed	0	4
ancient	0	4
golden	0	4
gold	0	4
ostrich	0	4
rusty	0	4
old	0	4
dented	0	4
blue	0	4
purple	0	4
kingly	0	4
the	0	4
climb	0	4
move	0	4
make	0	4
to	0	4
SHAR_EOF
if test 1939 -ne "`wc -c battlestar/battlewords`"
then
echo shar: error transmitting battlestar/battlewords '(should have been 1939 characters)'
fi
cat << \SHAR_EOF > battlestar/com7.c
#ifndef lint
static char sccsid[] = "@(#)com7.c	1.2 11/28/84";
#endif

#include "externs.h"

fight(enemy,strength)
int enemy,strength;
{
	int lifeline = 0;
	int hurt;
	char auxbuf[LINELENGTH];
	char *next;
	int i;
	int exhaustion;

fighton:
	time++;
	snooze -= 5;
	if (snooze > time)
		exhaustion = CYCLE/(snooze - time);
	else {
		puts("You collapse exhausted, and he pulverizes your skull.");
		die();
	}
	if (snooze - time < 20)
		puts("You look tired! I hope you're able to fight.");
	next = getcom(auxbuf, LINELENGTH, "<fight!>-: ", 0);
	for (i=0; next && i < 10; i++)
		next = getword(next, words[i], -1);
	parse();
	switch(wordvalue[wordnumber]){

		case KILL:
		case SMITE:
			if (testbit(inven,TWO_HANDED))
				hurt = rnd(70) - 2 * card(injuries,NUMOFINJURIES) - ucard(wear) - exhaustion;
			else if (testbit(inven,SWORD) || testbit(inven, BROAD))
				hurt = rnd(50)%(WEIGHT-carrying)-card(injuries,NUMOFINJURIES)-encumber - exhaustion;
			else if (testbit(inven,KNIFE) || testbit(inven,MALLET) || testbit(inven,CHAIN) || testbit(inven,MACE) || testbit(inven,HALBERD))
				hurt = rnd(15) - card(injuries,NUMOFINJURIES) - exhaustion;
			else 
				hurt = rnd(7) - encumber;
			if (hurt < 5)
				switch(rnd(3)){

					case 0:
						puts("You swung wide and missed.");
						break;
					case 1:
						puts("He checked your blow. CLASH! CLANG!");
						break;
					case 2:
						puts("His filthy tunic hangs by one less thread.");
						break;
				}
			else if (hurt < 10){
				switch(rnd(3)){
					case 0:
						puts("He's bleeding.");
						break;
					case 1:
						puts("A trickle of blood runs down his face.");
						break;
					case 2:
						puts("A huge purple bruise is forming on the side of his face.");
						break;
				}
				lifeline++;
			}
			else if (hurt < 20){
				switch(rnd(3)){
					case 0:
						puts("He staggers back quavering.");
						break;
					case 1:
						puts("He jumps back with his hand over the wound.");
						break;
					case 2:
						puts("His shirt falls open with a swath across the chest.");
						break;
				}
				lifeline += 5;
			}
			else if (hurt < 30){
				switch(rnd(3)){
					case 0:
						printf("A bloody gash opens up on his %s side.\n",(rnd(2) ? "left" : "right"));
						break;
					case 1:
						puts("The steel bites home and scrapes along his ribs.");
						break;
					case 2:
						puts("You pierce him, and his breath hisses through clenched teeth.");
						break;
				}
				lifeline += 10;
			}
			else if (hurt < 40){
				switch(rnd(3)){
					case 0:
						puts("You smite him to the ground.");
						if (strength - lifeline > 20)
							puts("But in a flurry of steel he regains his feet!");
						break;
					case 1:
						puts("The force of your blow sends him to his knees.");
						puts("His arm swings lifeless at his side.");
						break;
					case 2:
						puts("Clutching his blood drenched shirt, he collapses stunned.");
						break;
				}
				lifeline += 20;
			}
			else {
				switch(rnd(3)){
					case 0:
						puts("His ribs crack under your powerful swing, flooding his lungs with blood.");
						break;
					case 1:
						puts("You shatter his upheld arm in a spray of blood.  The blade continues deep");
						puts("into his back, severing the spinal cord.");
						lifeline += 25;
						break;
					case 2:
						puts("With a mighty lunge the steel slides in, and gasping, he falls to the ground.");
						lifeline += 25;
						break;
				}
				lifeline += 30;
			}
			break;

		case BACK:
			if (enemy == DARK && lifeline > strength * 0.33){
				puts("He throws you back against the rock and pummels your face.");
				if (testbit(inven,AMULET) || testbit(wear,AMULET)){
					printf("Lifting the amulet from you, ");
					if (testbit(inven,MEDALION) || testbit(wear,MEDALION)){
						puts("his power grows and the walls of\nthe earth tremble.");
						puts("When he touches the medallion, your chest explodes and the foundations of the\nearth collapse.");
						puts("The planet is consumed by darkness.");
						die();
					}
					if (testbit(inven,AMULET)){
						clearbit(inven,AMULET);
						carrying -= objwt[AMULET];
						encumber -= objcumber[AMULET];
					}
					else
						clearbit(wear,AMULET);
					puts("he flees down the dark caverns.");
					clearbit(location[position].objects,DARK);
					injuries[SKULL] = 1;
					followfight = time;
					return (0);
				}
				else{
					puts("I'm afraid you have been killed.");
					die();
				}
			}
			else{
				puts("You escape stunned and disoriented from the fight.");
				puts("A victorious bellow echoes from the battlescene.");
				if (back && position != back)
					move(back,BACK);
				else if (ahead &&position != ahead)
					move(ahead,AHEAD);
				else if (left && position != left)
					move(left,LEFT);
				else if (right && position != right)
					move(right,RIGHT);
				else
					move(location[position].down,AHEAD);
				return(0);
			}

		case SHOOT:
			if (testbit(inven,LASER)){
				if (strength - lifeline <= 50){
					printf("The %s took a direct hit!\n",objsht[enemy]);
					lifeline += 50;
				}
				else {
					puts("With his bare hand he deflects the laser blast and whips the pistol from you!");
					clearbit(inven,LASER);
					setbit(location[position].objects,LASER);
					carrying -= objwt[LASER];
					encumber -= objcumber[LASER];
				}
			}
			else
				puts("Unfortunately, you don't have a blaster handy.");
			break;

		case DROP:
		case DRAW:
			cypher();
			time--;
			break;
		
		default:
			puts("You don't have a chance, he is too quick.");
			break;

	}
	if (lifeline >= strength){
		printf("You have killed the %s.\n", objsht[enemy]);
		if (enemy == ELF || enemy == DARK)
			puts("A watery black smoke consumes his body and then vanishes with a peal of thunder!");
		clearbit(location[position].objects,enemy);
		power += 2;
		notes[JINXED]++;
		return(0);
	}
	puts("He attacks...");
	/* some embellisments */
	hurt = rnd(NUMOFINJURIES) - (testbit(inven,SHIELD) != 0) - (testbit(wear,MAIL) != 0) - (testbit(wear,HELM) != 0);
	hurt += (testbit(wear,AMULET) != 0) + (testbit(wear,MEDALION) != 0) + (testbit(wear,TALISMAN) != 0);
	hurt = hurt < 0 ? 0 : hurt;
	hurt =	hurt >= NUMOFINJURIES ? NUMOFINJURIES -1 : hurt;
	if (!injuries[hurt]){
		injuries[hurt] = 1;
		printf("I'm afraid you have suffered %s.\n", ouch[hurt]);
	}
	else
		puts("You emerge unscathed.");
	if (injuries[SKULL] && injuries[INCISE] && injuries[NECK]){
		puts("I'm afraid you have suffered fatal injuries.");
		die();
	}
	goto fighton;
}
SHAR_EOF
if test 6486 -ne "`wc -c battlestar/com7.c`"
then
echo shar: error transmitting battlestar/com7.c '(should have been 6486 characters)'
fi
cat << \SHAR_EOF > battlestar/globals.c
#ifndef lint
static char sccsid[] = "@(#)globals.c	1.2 11/28/84";
#endif

#include "externs.h"

int WEIGHT = MAXWEIGHT;
int CUMBER = MAXCUMBER;

char *objdes[NUMOFOBJECTS] = {
	"There is a knife here",
	"There is an exquisitely crafted sword and scabbard here.",
	0,				/* can land from here */
	"There is a fierce woodsman here brandishing a heavy mallet.",
	"There is an unweildly two-handed sword here.",
	"There is a bloody meat cleaver here.",
	"A rusty broadsword is lying here.",
	"There is an ancient coat of finely woven mail here.",
	"There is a old dented helmet with an ostrich plume here.",
	"There is a shield of some native tribe here.",
	"The maid's body is lying here. She was murdered!",
	"There is a Viper ready for launch here.",
	"A kerosene lantern is burning luridly here.",
	"An old pair of shoes has been discarded here.",
	0,				/* cylon */
	"There is a pair of pajamas here.",
	"A kingly robe of royal purple and spun gold is draped here.",
	"There is a strange golden amulet on the floor here.",
	"A medallion of solid gold shimmers on the ground nearby.",
	"A talisman of gold is lying here.",
	"A dead woodsman has fallen here. He was savagely murdered.",
	"A heavy wooden mallet lies nearby.",
	"There is a laser pistol here.",
       "A flower-like young goddess is bathing in the hot mineral pools. She is \nwatching you, but continues to steep and sing softly.",
	"The goddess is reclining on a bed of ferns and studying you intently.",
	"There is a grenade here",
	"There is a length of heavy chain here.",
	"There is a stout rope here.",
	"There is a pair of Levi's here.",
	"A bloody mace is lying on the ground here.",
	"There is a shovel here.",
	"A long, sharp halberd is propped up here.",
	"There is a compass here",
	"Wreckage and smoldering debris from a crash litter the ground here.",
	"A woodland Elf armed with a shield and deadly halberd lunges toward you!",
	"I think I hear footsteps behind us.",
	"There are a few coins here.",
	"There are some matches here.",
       "An unctuous man in a white suit and a dwarf are standing here.",
       "There are some ripe papayas here.",
       "There is a ripe pineapple here.",
       "There are some kiwi fruit here.",
       "There are some coconuts here.",
       "There is a ripe mango here.",
       "There is a sparkling diamond ring here.",
       "There is a colorful pink potion in a small crystal vial here.",
       "A gold bracelet is on the ground here.",
       "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.'",
       "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.'",
       "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!'",
       "An old timer with one eye missing and no money for a drink sits at the bar.",
       "You are flying through an asteroid field!",
       "A planet is nearby.",
       "The ground is charred here.",
       "There is a thermonuclear warhead here.",
       "The fragile, beautiful young goddess lies here.  You murdered her horribly.",
       "The old timer is lying here.  He is dead.",
       "The native girl's body is lying here.",
       "A native girl is sitting here.",
       "A gorgeous white stallion is standing here.",
       "The keys are in the ignition.",
       "A pot of pearls and jewels is sitting here.",
       "A bar of solid gold is here.",
       "There is a 10 kilogram diamond block here."

};

char *objsht[NUMOFOBJECTS] = {
	"knife",
	"fine sword",
	0,
	"Woodsman",
	"two-handed sword",
	"meat cleaver",
	"broadsword",
	"coat of mail",
	"plumed helmet",
	"shield",
	"maid's body",
	"viper",
	"lantern",
	"shoes",
	0,
	"pajamas",
	"robe",
	"amulet",
	"medallion",
	"talisman",
	"woodsman's body",
	"wooden mallet",
	"laser",
	0,
	0,
	"grenade",
	"chain",
	"rope",
	"levis",
	"mace",
	"shovel",
	"halberd",
	"compass",
	0,
	"Elf",
	0,
	"coins",
	"match book",
	0,
	"papayas",
	"pineapple",
	"kiwi",
	"coconuts",
	"mango",
	"ring",
	"potion",
	"bracelet",
	0,
	0,
	"Dark Lord",
	0,
	0,
	0,
	0,
	"warhead",
	"goddess's body",
	"old timer's body",
	"girl's body",
	0,
	"stallion",
	"car",
	"pot of jewels",
	"bar of gold",
	"diamond block"
};

char *ouch[NUMOFINJURIES] = {
	"some minor abrasions",
	"some minor lacerations",
	"a minor puncture wound",
	"a minor amputation",
	"a sprained wrist",
	"a fractured ankle and shattered kneecap",
	"a broken arm and dislocated shoulder",
	"a few broken ribs",
	"a broken leg and torn ligaments",
	"a broken back and ruptured spleen",
	"some deep incisions and a loss of blood",	
	"a fractured skull and mashed face",
	"a broken neck"
};

int objwt[NUMOFOBJECTS] = {
	1, 	5,	0,	10,	15,	2,	10,	10,
	3,	5,	50,	2500,	2,	1,	100,	1,	
	2,	1,	1,	1,	60,	10,	5,	0,
	50,	5,	15,	5,	1,	20,	10,	10,
	0,	0,	0,	0,	1,	0,	0,	1,
	1,	1,	2,	1,	0,	0,	0,	0,
	0,	0,	100,	0,	0,	0,	55,	47,
	50,	45,	45,	100,	2000,	30,	20,	10
};

int objcumber[NUMOFOBJECTS] = {
	1, 	5,	0,	150,	10,	1,	5,	2,
	2,	1,	5,	10,	1,	1,	10,	1,
	1,	1,	1,	1,	7,	5,	4,	0,
	0,	1,	1,	1,	1,	5,	4,	4,
	1,	0,	0,	0,	1,	0,	0,	1,
	1,	1,	3,	1,	0,	0,	1,	0,
	0,	0,	10,	0,	0,	0,	7,	8,
	10,	8,	8,	10,	10,	3,	1,	2
};

int win = 1;
int matchcount = 20;
int followgod = -1;
int followfight = -1;
SHAR_EOF
if test 5716 -ne "`wc -c battlestar/globals.c`"
then
echo shar: error transmitting battlestar/globals.c '(should have been 5716 characters)'
fi
cat << \SHAR_EOF > battlestar/init.c
#ifndef lint
static char sccsid[] = "@(#)init.c	1.2 11/28/84";
#endif

#include "externs.h"
#include <pwd.h>

initialize(startup)
	char startup;
{
	register struct objs *p;
	int die();

	puts("Version 4.2, fall 1984.");
	puts("First Adventure game written by His Lordship, the honorable");
	puts("Admiral D.W. Riggle\n");
	srand(getpid());
	getutmp(uname);
	wiz = wizard(uname);
	wordinit();
	if (startup) {
		location = dayfile;
		direction = NORTH;
		time = 0;
		snooze = CYCLE * 1.5;
		position = 22;
		setbit(wear, PAJAMAS);
		fuel = TANKFULL;
		torps = TORPEDOES;
		for (p = dayobjs; p->room != 0; p++)
			setbit(location[p->room].objects, p->obj);
	} else
		restore();
	signal(SIGINT, die);
}

getutmp(uname)
	char *uname;
{
	struct passwd *ptr;

	ptr = getpwuid(getuid());
	strcpy(uname, ptr ? ptr->pw_name : "");
}

char *list[] = {	/* hereditary wizards */
	"riggle",
	"chris",
	"edward",
	"comay",
	"yee",
	"dmr",
	"ken",
	0
};

char *badguys[] = {
	"wnj",
	"root",
	"ted",
	0
};

wizard(uname)
	char *uname;
{
	char flag;

	if (flag = checkout(uname))
		printf("You are the Great wizard %s.\n", uname);
	return flag;
}

checkout(uname)
	register char *uname;
{
	register char **ptr;

	for (ptr = list; *ptr; ptr++)
		if (strcmp(*ptr, uname) == 0)
			return 1;
	for (ptr = badguys; *ptr; ptr++)
		if (strcmp(*ptr, uname) == 0) {
			printf("You are the Poor anti-wizard %s.  Good Luck!\n",
				uname);
			CUMBER = 3;
			WEIGHT = 9;	/* that'll get him! */
			clock = 10;
			setbit(location[7].objects, WOODSMAN);	/* viper room */
			setbit(location[20].objects, WOODSMAN);	/* laser " */
			setbit(location[13].objects, DARK);	/* amulet " */
			setbit(location[8].objects, ELF);	/* closet */
			return 0;	/* anything else, Chris? */
		}
	return 0;
}
SHAR_EOF
if test 1757 -ne "`wc -c battlestar/init.c`"
then
echo shar: error transmitting battlestar/init.c '(should have been 1757 characters)'
fi
cat << \SHAR_EOF > battlestar/misc.c
#ifndef lint
static char sccsid[] = "@(#)misc.c	1.1 11/18/84";
#endif

#include "externs.h"

card(array, size)		/* for beenthere, injuries */
	register char *array;
	int size;
{
	register char *end = array + size;
	register int i = 0;

	while (array < end)
		if (*array++)
			i++;
	return (i);
}

ucard(array)
	register unsigned *array;
{
	register int j = 0, n;

	for (n = 0; n < NUMOFOBJECTS; n++)
		if (testbit(array, n))
			    j++;
	return (j);
}
SHAR_EOF
if test 452 -ne "`wc -c battlestar/misc.c`"
then
echo shar: error transmitting battlestar/misc.c '(should have been 452 characters)'
fi
cat << \SHAR_EOF > battlestar/parse.c
#ifndef lint
static char sccsid[] = "@(#)parse.c	1.1 11/18/84";
#endif

#include "externs.h"

wordinit()
{
	register struct wlist *w;

	for (w = wlist; w->string; w++)
		install(w);
}

hash(s)
	register char *s;
{
	register hashval = 0;

	while (*s) {
		hashval += *s++;
		hashval *= HASHMUL;
		hashval &= HASHMASK;
	}
	return hashval;
}

struct wlist *
lookup(s)
	char *s;
{
	register struct wlist *wp;

	for (wp = hashtab[hash(s)]; wp != NULL; wp = wp->next)
		if (*s == *wp->string && strcmp(s, wp->string) == 0)
			return wp;
	return NULL;
}

install(wp)
	register struct wlist *wp;
{
	int hashval;

	if (lookup(wp->string) == NULL) {
		hashval = hash(wp->string);
		wp->next = hashtab[hashval];
		hashtab[hashval] = wp;
	} else
		printf("Multiply defined %s.\n", wp->string);
}

parse()
{
	register struct wlist *wp;
	register n;

	wordnumber = 0;           /* for cypher */
	for (n = 0; n <= wordcount; n++) {
		if ((wp = lookup(words[n])) == NULL) {
			wordvalue[n] = -1;
			wordtype[n] = -1;
		} else {
			wordvalue[n] = wp -> value;
			wordtype[n] = wp -> article;
		}
	}
}
SHAR_EOF
if test 1083 -ne "`wc -c battlestar/parse.c`"
then
echo shar: error transmitting battlestar/parse.c '(should have been 1083 characters)'
fi
cat << \SHAR_EOF > battlestar/room.c
#ifndef lint
static char sccsid[] = "@(#)room.c	1.2 11/28/84";
#endif

#include "externs.h"

writedes()
{
	int compass;
	register char *p;
	register c;

	printf("\n\t%s\n", location[position].name);
	if (beenthere[position] < 3) {
		compass = NORTH;
		for (p = location[position].desc; c = *p++;)
			if (c != '-' && c != '*' && c != '+')
				putchar(c);
			else {
				if (c != '*')
					printf(truedirec(compass, c));
				compass++;
			}
	}
}

printobjs()
{
	register unsigned int *p = location[position].objects;
	register n;

	printf("\n");
	for (n = 0; n < NUMOFOBJECTS; n++)
		if (testbit(p, n) && objdes[n])
			puts(objdes[n]);
}

whichway(here)
struct room here;
{
	switch(direction) {

		case NORTH:
			left = here.west;
			right = here.east;
			ahead = here.north;
			back = here.south;
			break;
		
		case SOUTH:
			left = here.east;
			right = here.west;
			ahead = here.south;
			back = here.north;
			break;

		case EAST:
			left = here.north;
			right = here.south;
			ahead = here.east;
			back = here.west;
			break;

		case WEST:
			left = here.south;
			right = here.north;
			ahead = here.west;
			back = here.east;
			break;

	}
}

char *
truedirec(way, option)
int way;
char option;
{
	switch(way) {

		case NORTH:
			switch(direction) {
				case NORTH:
					return("ahead");
				case SOUTH:
					return(option == '+' ? "behind you" : "back");
				case EAST:
					return("left");
				case WEST:
					return("right");
			}

		case SOUTH:
			switch(direction) {
				case NORTH:
					return(option == '+' ? "behind you" : "back");
				case SOUTH:
					return("ahead");
				case EAST:
					return("right");
				case WEST:
					return("left");
			}

		case EAST:
			switch(direction) {
				case NORTH:
					return("right");
				case SOUTH:
					return("left");
				case EAST:
					return("ahead");
				case WEST:	
					return(option == '+' ? "behind you" : "back");
			}

		case WEST:
			switch(direction) {
				case NORTH:
					return("left");
				case SOUTH:
					return("right");
				case EAST:
					return(option == '+' ? "behind you" : "back");
				case WEST:
					return("ahead");
			}

		default:
			printf("Error: room %d.  More than four directions wanted.", position);
			return("!!");
      }
}

newway(thisway)
int thisway;
{
	switch(direction){

		case NORTH:
			switch(thisway){
				case LEFT:
					direction = WEST;
					break;
				case RIGHT:
					direction = EAST;
					break;
				case BACK:
					direction = SOUTH;
					break;
			}
			break;
		case SOUTH:
			switch(thisway){
				case LEFT:
					direction = EAST;
					break;
				case RIGHT:
					direction = WEST;
					break;
				case BACK:
					direction = NORTH;
					break;
			}
			break;
		case EAST:
			switch(thisway){
				case LEFT:
					direction = NORTH;
					break;
				case RIGHT:
					direction = SOUTH;
					break;
				case BACK:
					direction = WEST;
					break;
			}
			break;
		case WEST:
			switch(thisway){
				case LEFT:
					direction = SOUTH;
					break;
				case RIGHT:
					direction = NORTH;
					break;
				case BACK:
					direction = EAST;
					break;
			}
			break;
      }
}
SHAR_EOF
if test 3088 -ne "`wc -c battlestar/room.c`"
then
echo shar: error transmitting battlestar/room.c '(should have been 3088 characters)'
fi
cat << \SHAR_EOF > battlestar/save.c
#ifndef lint
static char sccsid[] = "@(#)save.c	1.2 11/28/84";
#endif

#include "externs.h"

restore()
{
	char *getenv();
	char *home;
	char home1[100];
	register int n;
	int tmp;
	register FILE *fp;

	home = getenv("HOME");
	strcpy(home1, home);
	strcat(home1, "/Bstar");
	if ((fp = fopen(home1, "r")) == 0) {
		perror(home1);
		return;
	}
	fread(&WEIGHT, sizeof WEIGHT, 1, fp);
	fread(&CUMBER, sizeof CUMBER, 1, fp);
	fread(&clock, sizeof clock, 1, fp);
	for (n = 1; n <= NUMOFROOMS; n++) {
		fread(location[n].link, sizeof location[n].link, 1, fp);
		fread(location[n].objects, sizeof location[n].objects, 1, fp);
	}
	fread(inven, sizeof inven, 1, fp);
	fread(wear, sizeof wear, 1, fp);
	fread(injuries, sizeof injuries, 1, fp);
	fread(notes, sizeof notes, 1, fp);
	fread(&direction, sizeof direction, 1, fp);
	fread(&position, sizeof position, 1, fp);
	fread(&time, sizeof time, 1, fp);
	fread(&tmp, sizeof tmp, 1, fp);
	location = tmp ? dayfile : nightfile;
	fread(&fuel, sizeof fuel, 1, fp);
	fread(&torps, sizeof torps, 1, fp);
	fread(&carrying, sizeof carrying, 1, fp);
	fread(&encumber, sizeof encumber, 1, fp);
	fread(&rythmn, sizeof rythmn, 1, fp);
	fread(&followfight, sizeof followfight, 1, fp);
	fread(&ate, sizeof ate, 1, fp);
	fread(&snooze, sizeof snooze, 1, fp);
	fread(&meetgirl, sizeof meetgirl, 1, fp);
	fread(&followgod, sizeof followgod, 1, fp);
	fread(&godready, sizeof godready, 1, fp);
	fread(&win, sizeof win, 1, fp);
	fread(&wintime, sizeof wintime, 1, fp);
	fread(&matchlight, sizeof matchlight, 1, fp);
	fread(&matchcount, sizeof matchcount, 1, fp);
	fread(&loved, sizeof loved, 1, fp);
	fread(&pleasure, sizeof pleasure, 1, fp);
	fread(&power, sizeof power, 1, fp);
	fread(&ego, sizeof ego, 1, fp);
}

save()
{
	char *getenv();
	char *home;
	char home1[100];
	register int n;
	int tmp;
	FILE *fp;

	home = getenv("HOME");
	strcpy(home1, home);
	strcat(home1, "/Bstar");
	if ((fp = fopen(home1, "w")) == 0) {
		perror(home1);
		return;
	}
	printf("Saved in %s.\n", home1);
	fwrite(&WEIGHT, sizeof WEIGHT, 1, fp);
	fwrite(&CUMBER, sizeof CUMBER, 1, fp);
	fwrite(&clock, sizeof clock, 1, fp);
	for (n = 1; n <= NUMOFROOMS; n++) {
		fwrite(location[n].link, sizeof location[n].link, 1, fp);
		fwrite(location[n].objects, sizeof location[n].objects, 1, fp);
	}
	fwrite(inven, sizeof inven, 1, fp);
	fwrite(wear, sizeof wear, 1, fp);
	fwrite(injuries, sizeof injuries, 1, fp);
	fwrite(notes, sizeof notes, 1, fp);
	fwrite(&direction, sizeof direction, 1, fp);
	fwrite(&position, sizeof position, 1, fp);
	fwrite(&time, sizeof time, 1, fp);
	tmp = location == dayfile;
	fwrite(&tmp, sizeof tmp, 1, fp);
	fwrite(&fuel, sizeof fuel, 1, fp);
	fwrite(&torps, sizeof torps, 1, fp);
	fwrite(&carrying, sizeof carrying, 1, fp);
	fwrite(&encumber, sizeof encumber, 1, fp);
	fwrite(&rythmn, sizeof rythmn, 1, fp);
	fwrite(&followfight, sizeof followfight, 1, fp);
	fwrite(&ate, sizeof ate, 1, fp);
	fwrite(&snooze, sizeof snooze, 1, fp);
	fwrite(&meetgirl, sizeof meetgirl, 1, fp);
	fwrite(&followgod, sizeof followgod, 1, fp);
	fwrite(&godready, sizeof godready, 1, fp);
	fwrite(&win, sizeof win, 1, fp);
	fwrite(&wintime, sizeof wintime, 1, fp);
	fwrite(&matchlight, sizeof matchlight, 1, fp);
	fwrite(&matchcount, sizeof matchcount, 1, fp);
	fwrite(&loved, sizeof loved, 1, fp);
	fwrite(&pleasure, sizeof pleasure, 1, fp);
	fwrite(&power, sizeof power, 1, fp);
	fwrite(&ego, sizeof ego, 1, fp);
}
SHAR_EOF
if test 3415 -ne "`wc -c battlestar/save.c`"
then
echo shar: error transmitting battlestar/save.c '(should have been 3415 characters)'
fi
#	End of shell archive
exit 0

jss@sjuvax.UUCP (J. Shapiro) (02/13/85)

[Aren't you hungry...?]

	Sorry to post this to net.sources, but I just tried to unpack
battlestar, and of all the files we have gotten, only battlestar.1 parts 1
and 2 and battlestar.2 part 1 have unpacked successfully.  All other files
produced errors. The list of files it was unable to create is impressive.

	Perhaps a reposting of the whole thing in smaller chunks is in order.
I would write to the author, but among the things missing (post editing) is
his name...

Jon Shapiro