home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
BEEHIVE
/
GAMES
/
STARSHIP.ARC
/
E3.PRO
< prev
next >
Wrap
Text File
|
1989-09-27
|
15KB
|
525 lines
procedure faire;
var
uniforms:boolean;
adu:byte;
lu:boolean;
begin
adu:=0;
uniforms:=false;
lu:=false;
repeat
writeln('The following unusual goods are offered for sale');
writeln('1. auxilliary drive units, one million credits for the first,');
writeln(' two million for the second, three for the third.');
writeln('2. spiffy new uniforms for the crew, sixty thousand credits');
writeln('3. a laser unit, price one lifeboat and one probe');
writeln('4. an autodoc of alien manufacture, one million credits');
writeln('(Credit extended for #2 only)');
writeln('You may buy any, all, or none. Buy which number (5 to leave)');
status;
showcash;
inputs;
case inp of
1: if credits<(adu+1)*1E6 then
begin
writeln('You don''t have ',(adu+1)*1e6,' million credits')
end{ifthen}
else if adu>2 then writeln('You''ve bought them all.')
else
begin
adu:=adu+1;
speed:=speed+1;
tspeed:=tspeed+1;
cspeed:=cspeed+1;
credits:=credits-1E6*(adu);
end;{inner else}
2: if uniforms=true then writeln('You already bought those.')
else
begin
uniforms:=true;
writeln('The crew is delighted.');
morale:=morale+6;
moralebounce:=moralebounce+3;
credits:=credits-6E4;
end;{else}
3: if (probes=0) or (boats=0) then writeln('you don''t have both a probe and a boat.')
else if lu=true then writeln('You already bought the only laser unit')
else
begin
lu:=true;
laser:=laser+1;
tlaser:=tlaser+1;
claser:=claser+1;
boats:=boats-1;
probes:=probes-1;
end;{second else}
4: if credits<1E6 then writeln('Not enough cash')
else if autodoc=true then writeln('you already have one, and you don''t need two.')
else
begin
autodoc:=true;
credits:=credits-1E6;
morale:=morale+6;
moralebounce:=moralebounce+1;
end;{second else}
end;{repeat}
until inp=5;
end;{procedure faire}
procedure gift;
begin
case random(5) of
0:
begin
writeln('a bottle of smnervian lifewater.');
morale:=morale+10;
moralebounce:=moralebounce+8;
end;{case 0}
1:
begin
writeln('an amazing stock of adhesives.');
hull:=hull+1;
thull:=thull+1;
chull:=chull+1;
writeln('hull strength now ',chull);
end;{case 1}
2:
begin
writeln('a lifeboat');
boats:=boats+1;
end;{case 2}
3:
begin
writeln('alien electronic secrets worth 50000 credits.');
credits:=credits+5E4;
end;{case 3}
4:
begin
writeln('measles.');
if autodoc=true then writeln('Your autodoc cures the measles.')
else begin
writeln('You spend the next .01 years recovering.');
t:=t-0.01;
end;{else}
end;{case 4}
end;{case}
end;{gift}
procedure aliens;
begin
roll:=false;
writeln;
writeln('You have met a race of alien beings');
if assignment=false then
begin
for index:=0 to 4 do alienmatch[index]:=random(5);
assignment:=true;
end;
index:=random(5);
case index of
0:writeln('Some look like mops, while others look more like brooms.');
1:writeln('They look rather like a combination between a pidgeon and a sprinkler head.');
2:writeln('They look a little like a cross between a fern and a banana cream pie.');
3:writeln('They look somewhat like a Spanish tile roof and smell like chocolate.');
4:writeln('They remind you of a four-foot hot fudge sundae.');
end;{case}
writeln('Will you:');
writeln('1. Ignore the aliens');
writeln('2. Attack');
writeln('3. Flee');
writeln('4. Try to communicate');
inputs;
if (inp>4) or (inp<1) then inp:=1;
case alienmatch[index] of
0: begin
if inp=1 then writeln('The aliens ignore you');
if inp=2 then strikefirst;
if inp=3 then writeln('The aliens run the other way');
if inp=4 then faire;
end;{case 0}
1: begin
if inp=1 then
begin
writeln('The aliens attack you!');
handfight(0);
end;{ifthen}
if inp=2 then strikefirst;
if inp=3 then
begin
writeln('The aliens catch up and attack you!');
handfight(0);
end;{ifthen}
if inp=4 then writeln('The aliens insult you creatively, and leave.');
end;{case 1}
2: begin
if inp=1 then
begin
writeln('Although not talkative, the aliens are friendly, and give you ');
gift;
end;{ifthen}
if inp=2 then strikefirst;
if inp=3 then writeln('The aliens run the other way');
if inp=4 then writeln('The aliens explain that they hate talking, and leave');
end;{case 2}
3: begin
if inp=1 then writeln('The aliens ignore you');
if inp=2 then begin
strikefirst;
roll:=false;
end;{ifthen}
if inp=3 then writeln('The aliens wave goodbye');
if inp=4 then if random>0.5 then faire else
begin
writeln('The friendly aliens give you');
gift;
end; {else}
end;{case 3}
4: begin
if inp=1 then writeln('The aliens ignore you');
if inp=2 then begin
strikefirst;
roll:=false;
end;{ifthen}
if inp=3 then writeln('The aliens wave goodbye');
if inp=4 then if random>0.5 then faire else
begin
writeln('The friendly aliens give you');
gift;
end;{else}
end;{case 4}
end;{case}
if (roll=true) and (random>0.7) then begin
write('the defeated aliens had ');
gift;
end;{ifthen}
end;{aliens}
procedure findcrew(localint:byte);
begin
case localint of
1: writeln('A big kiss');
2: begin
writeln('a case of chicken pox...you lose .02 years while recovering.');
t:=t-0.02;
end;{case 2}
3: begin
writeln('their services for the rest of the lease period.');
mndex:=random(3)+1;
crew:=crew+mndex;
writeln('Since there are ',mndex,' of them your crew = ',crew);
end;{case 3}
4: if (hull<thull) or (laser<tlaser) or (speed<tspeed) then
begin
writeln('a repair job');
hull:=thull;
laser:=tlaser;
speed:=tspeed;
end
else writeln('a bright yellow paint job for the ',name);
end;{case}
morale:=morale+3*localint;
end;{findcrew}
procedure getthing;
begin
jndex:=random(10)+1;
case jndex of
1: begin
writeln('You find stranded crew; they are so delighted that they give you');
kndex:=random(4)+1;
findcrew(kndex);
if random(5)=0 then begin
writeln('The grateful crew also gives you');
kndex:=kndex+1;
if kndex=5 then kndex:=1;
findcrew(kndex);
end;{ifthen}
end;{case}
2: writeln('Aliens jump out of a closet and yell BOO, then they laugh and laugh');
3: begin
writeln('An abandoned computer holds the secrets of the legendary Jovain');
write('methods of navigation.');
kndex:=random(3);
speed:=speed+kndex;
tspeed:=tspeed+kndex;
cspeed:=cspeed+kndex;
if kndex=0 then writeln('but you don''t understand it')
else writeln('Your effective speed is now ',cspeed);
end;{case 3}
4: begin
writeln('You find a laser cannon with power cells');
laser:=laser+1;
tlaser:=tlaser+1;
claser:=claser+1;
writeln('laser power now ',claser);
end;{case 4}
5: begin
dt:=random*0.05;
writeln('You find a cask of wine from the Rhone, France, Earth');
writeln('You are delayed ',dt:0:3,' years while your crew sobers up.');
t:=t-dt;
morale:=morale+2;
moralebounce:=moralebounce+1;
end;{case 5}
6: begin
write('An abandoned computer contains new computer games worth ');
realvar:=random*8E4;
credits:=credits+realvar;
writeln(realvar:5:0,' credits.');
end;{case 6}
7: begin
writeln('One area is shielded with gold; your net worth');
realvar:=random*random*1E6;
credits:=credits+realvar;
write(' has increased by ');
format(realvar);
writeln;
end;{case 7}
8: begin
writeln('There are two small craft, and you take them aboard');
boats:=boats+2
end;{case 8}
9: begin
writeln('One of the search party says "What''s this button for?"');
writeln('There''s an explosion');
damage;
end;{case 9}
10: aliens;
end;{case}
end;{getthings}
procedure findthings;
begin
getthing;
if random>0.6 then getthing;
end;
procedure planet;
begin
writeln('An uncharted planet! Will you land?');
readln(yorn);
if upcase(yorn)='N' then exit;
if boats=0 then
begin
writeln('You can''t land without small craft. There is nothing to do but leave.');
exit;
end;
findthings;
writeln('type <cr> to continue searching');
readln(yorn);
findthings;
if random>0.4 then
begin
writeln('type <carriage return> to continue');
readln;
aliens;
while random>0.8 do
begin
writeln;
writeln('Another band of aliens!');
aliens;
end;{whiledo}
end;{ifthen}
writeln('Planetary exploration completed.');
writeln;
end;{planet}
procedure asteroid;
begin
writeln('It''s just an asteroid, cluttering up the vacuum');
end;
procedure derelict;
begin
writeln('It''s a derelict ship. Will you board?');
readln(yorn);
if upcase(yorn)='N' then exit;
if boats=0 then
begin
writeln('but you can''t board without a lifeboat');
end
else if random<0.15 then
begin
writeln('Sorry, but you can''t board. Apparently the aliens were built a little');
writeln('differently than you are. The cabin is a one-inch cube of molten metal');
end{ifthen}
else findthings;
end;
procedure probe;
begin
writeln('It''s a loose probe.');
if boats>0 then begin
probes:=probes+1;
writeln('You catch it with a small boat. You now have ',probes,' probes.');
end{ifthen}
else writeln('but you can''t catch it without a boat');
end;
procedure lifecraft;
begin
write('It''s a lifecraft in freefall;');
if boats>0 then
begin
writeln(' you take it aboard');
boats:=boats+1;
writeln('you now have ',boats,' boats.');
if random>0.92 then findthings;
end{ifthen}
else writeln('But you can''t catch it without a lifecraft');
end;
procedure alienship;
begin
writeln('"Alien ship in the viewer, Captain"');
case inp of
1:
begin
writeln('It attacks you with some unknown weapon and leaves.');
damage;
end;{case 1}
7:
begin
writeln('It goes on its way before you can take further action.');
end;{case 2}
else
if random>0.3 then aliens
else writeln('It sends out a message in some unknown language and leaves');
end;{else case}
end;{alienship}
procedure needlecraft;
begin
navy:=true;
writeln('The object is a navy needleship and it escorts you to your destination.');
if inp=1 then begin
writeln('But it took two shots at you before you were recognized.');
damage;
damage;
end;{ifthen}
end;
procedure spacestation;
begin
writeln('It''s an abandoned space station. Will you dock?');
readln(yorn);
if upcase(yorn)<>'N' then
begin
findthings;
writeln('type <cr> to continue search');
readln;
findthings;
end;{ifthen}
end;
procedure mine;
begin
writeln('Blam! The object was a mine.');
if inp=5 then
begin
boats:=boats-1;
index:=random(3)+1;
crew:=crew-index;
writeln('boat wrecked, ',index,' crew out of action');
shortcrew;
morale:=morale-index*5;
moralebounce:=moralebounce-2*index;
end;{ifthen}
if inp=6 then
begin
probes:=probes-1;
writeln('probe destroyed');
end;{ifthen}
if (inp<>6) and (inp<>5) then damage;
end;
procedure trader;
begin
traderflag:=true;
objectcount:=objectcount-1; {takes care of this one, but not previous}
chain(chnfile);
end;
procedure object;
begin
jump:=false;
writeln;
writeln('Captain, there is an uncharted object ahead');
inp:=0;
index:=random(40)+1;
while (inp<1) or (inp>7) do
begin
writeln('will you:');
writeln;
if claser>0 then writeln('1. Fire lasers');
writeln('2. Communicate');
if cspeed>0 then writeln('3. Approach');
if cspeed>0 then writeln('4. Avoid the object');
if (boats>0) and (crew>2) then writeln('5. Send out a small boat to investegate');
if probes>0 then writeln('6. Send a probe');
writeln('7. Ignore the object');
if crew<complement-3 then writeln('8. Reassign crew');
inputs;
if (((boats=0) or (crew<3)) and (inp=5)) or ((probes=0) and (inp=6)) then
begin
writeln('not possible, captain');
inp:=0; {restarts menu}
end;{ifthen}
if (cspeed=0) and ((inp=3) or (inp=4)) then
begin
writeln('no drive, captain');
inp:=0;
end;{ifthen}
if (inp=2) and (index<20) then begin
writeln('No reply to your hail');
inp:=0;
end;{ifthen}
if inp=8 then begin
shortcrew;
inp:=0;
end;{ifthen}
end;{whiledo}
if inp=4 then
if random*cspeed>1 then begin writeln('Object avoided'); exit end{inner ifthen}
else writeln('unable to avoid object');
if (inp=1) and ((index<20) or ((27<index) and (index<32))) then
begin
writeln('object destroyed');
exit;
end;{ifthen}
if inp=5 then begin
morale:=morale-2;
end;{ifthen}
if inp=1 then jump:=true;
if ((inp=5) or (inp=6)) and (index>19) and (index<28) then
begin
if inp=5 then
begin
boats:=boats-1;
jndex:=random(3)+1;
writeln('Space bandits have captured your boat with ',jndex,' crewmembers aboard.');
crewloss(jndex);
end{if inp=5}
else begin
probes:=probes-1;
writeln('Bandits swipe your probe');
end;{else}
exit;
end;{big ifthen}
case index of
1:planet;
2..5:asteroid;
6..8:mine;
9..11:lifecraft;
12:probe;
13..17:derelict;
18..19:spacestation;
20..27:bandit;
28..31:trader;
32..35:needlecraft;
36..40:alienship;
end;{case}
end;{procedure object}