var
i,j,iStork,jStork,iEnemy,EnemyShip,Possibility,iLo ck,iFire,Erase,iLives,iStage,
StageCount,iFuel : integer;
iPoint,LifePoint : Longint;
Key : Char;
Str : String;
Area : Array [1..6,1..10] of integer;
FireLock,MusicLock,BreakLock,CloseEnemy,Stagelock, DeathLock : Boolean;
Procedure FireMusic;
begin
for i:=1 to 3 do
begin
delay(1000);
Sound(150);
Delay(2500);
Sound(950);
Delay(1500);
Sound(1500);
Delay(2500);
Sound(250);
Delay(2500);
Sound(500);
Delay(900);
Delay(1550);
end;
NoSound;
end;
Procedure Impact;
begin
for i:=0 to 2 do
begin
gotoxy((jStork-1)*9 + 1,(iStork-1)*3 + i+1);
TextColor(20+i);
writeln('Û');
gotoxy((jStork-1)*9 + 3,(iStork-1)*3 + i+1);
writeln('Û');
gotoxy((jStork-1)*9 + 5,(iStork-1)*3 + i+1);
writeln('Û');
gotoxy((jStork-1)*9 + 7,(iStork-1)*3 + i+1);
writeln('Û');
for i:=1 to 5 do
begin
delay(9000); {IMPACT!!!}
sound(100);
delay(7000);
sound(150);
delay(3000);
sound(2500);
delay(3000);
sound(75);
delay(3000);
sound(175);
delay(5000);
NoSound;
end;
BreakLock:=True;
DeathLock:=True;
end;
Procedure WriteSlowly;
begin
for i:=1 to Length(Str) do
begin
Delay(7000);
gotoxy(26+i,13);
writeln(Str[i]);
end;
for i:=1 to 30 do
begin
Delay(15000);
TextColor(10);
gotoxy(24+i,15);
writeln('Û');
end;
TextColor(20);
gotoxy(33,17);
writeln('PRESS ANY KEY');
Readkey;
Clrscr;
Str:=' RED STORK';
TextColor(RED);
WriteSlowly;
Readkey;
Str:='A MR.STORK PRODUCTION';
TextColor(9);
WriteSlowly;
Readkey;
Str:='DONT BE AFRAID OF THE DARK!';
WriteSlowly;
Readkey;
TextColor(RED);
Str:='BE AFRAID OF WHAT IS IN IT!';
writeSlowly;
Readkey;
Clrscr;
TextColor(7);
gotoxy(35,11);
writeln('STAGE ',iStage);
gotoxy(29,13);
writeln('PRESS ENTER TO START');
readln;
Repeat
Clrscr;
iFuel:=10000;
for i:=1 to 6 do {Empty array}
for j:=1 to 10 do
begin
Area[i,j]:=0;
end;
Area[3,1]:=-1;
if StageLock then
begin
iStage:=iStage + 1;
TextColor(7);
gotoxy(35,11);
writeln('STAGE ',iStage);
gotoxy(29,13);
writeln('PRESS ENTER TO START');
Readln;
StageLock:=False;
end;
if DeathLock then
begin
TextColor(7);
gotoxy(35,11);
writeln('STAGE ',iStage);
gotoxy(29,13);
writeln('PRESS ENTER TO START');
readln;
DeathLock:=False;
end;
TextColor(6);
gotoxy(1,19);
writeln('Û Û Û
Û');
gotoxy(1,20);
writeln(' Û ÛÛÛ Û /\ ÛÛÛ
Û ');
gotoxy(1,21);
writeln(' Û ÛÛÛÛÛ ÛÛÛ / \ ÛÛÛÛÛ
Û ');
gotoxy(1,22);
writeln(' ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
');
TextColor(Red);
gotoxy(46,23);
writeln('123');
TextColor(yellow);
gotoxy(49,23);
writeln('456');
TextColor(Green);
gotoxy(52,23);
writeln('789');
repeat
Delay(35000);
for Erase:=1 to 18 do
begin
gotoxy(1,Erase);
ClrEol;
end;
if KeyPressed then
Key:=Readkey;
if Key=#0 then
Key:=Readkey;
Case Key of
Up :begin
if (Area[iStork - 1,jStork]<>0) and (iStork<>1) and(Area[iStork -
1,jStork]<>5) then
begin
Impact;
end;
if iStork<>1 then
begin
Area[iStork,jStork]:=0;
Area[iStork-1,jStork]:=-1;
end;
Key:=#1;
end;
Down:begin
if (Area[iStork + 1,jStork]<>0) and (iStork<>6) and (iStork<>1) and
(Area[iStork + 1,jStork]<>5)then
begin
Impact;
end;
if iStork<>6 then
begin
Area[iStork,jStork]:=0;
Area[iStork+1,jStork]:=-1;
end;
Key:=#1;
end;
Right:begin
if jStork<>9 then
begin
Area[iStork,jStork]:=0;
Area[iStork,jStork+1]:=-1;
end;
key:=#1;
end;
Left :begin
if jStork<>1 then
begin
Area[iStork,jStork]:=0;
Area[iStork,jStork-1]:=-1;
end;
key:=#1;
end;
Space:begin
if Area[iStork,jStork+1]<>0 then
begin
CloseEnemy:=True;
EnemyShip:=Area[iStork,jStork+1];
end;
iLock:=Random(Possibility); {Decide you'll create an enemy or not}
if iLock=0 then
begin
iEnemy:=Random(6)+1;
EnemyShip:=Random(4)+1;
Case EnemyShip of {Decide the type of enemy}
1:begin
Area[iEnemy,10]:=1;
end;
2:begin
Area[iEnemy,10]:=2;
end;
4:begin
Area[iEnemy,10]:=4;
end;
end; {End of Case}
end; {End of if}
iLock:=Random(110);
if iLock=0 then
begin
if Area[3,9]=0 then
Area[3,9]:=5;
end;
FireLock:=True;
for i:=1 to 6 do
for j:=1 to 10 do
begin
Case Area[i,j] of
-1 :begin
textcolor(12);
gotoxy((j-1)*9 + 1,(i-1)*3 + 1);
writeln('Ü =Ûß-');
gotoxy((j-1)*9 + 1,(i-1)*3 + 2);
writeln('ÛÛÛÛÛÛÛÜ');
gotoxy((j-1)*9 + 1,(i-1)*3 + 3);
writeln(' =ÛÜ-');
iStork:=i;
jStork:=j;
if CloseEnemy then
begin
FireMusic;
CloseEnemy:=False;
end;
end;
1 :begin
Area[i,j]:=0;
if j<>1 then {If you are at the end of way don't try to output}
begin
Area[i,j-1]:=1; {Put this ship's value into this array box}
if (i=iStork) and (j-1=jStork) then
begin
Impact;
end;
end;
2 :begin
Area[i,j]:=0;
if j<>1 then {If you are at the end of way don't try to output}
begin
Area[i,j-1]:=2; {Put this ship's value into this array box}
4 :begin
Area[i,j]:=0;
if j<>1 then {If you are at the end of way don't try to output}
begin
Area[i,j-1]:=4; {Put this ship's value into this array box}
var
i,j,iStork,jStork,iEnemy,EnemyShip,Possibility,iLo ck,iFire,Erase,iLives,iStage,
StageCount,iFuel : integer;
iPoint,LifePoint : Longint;
Key : Char;
Str : String;
Area : Array [1..6,1..10] of integer;
FireLock,MusicLock,BreakLock,CloseEnemy,Stagelock, DeathLock : Boolean;
Procedure FireMusic;
begin
for i:=1 to 3 do
begin
delay(1000);
Sound(150);
Delay(2500);
Sound(950);
Delay(1500);
Sound(1500);
Delay(2500);
Sound(250);
Delay(2500);
Sound(500);
Delay(900);
Delay(1550);
end;
NoSound;
end;
Procedure Impact;
begin
for i:=0 to 2 do
begin
gotoxy((jStork-1)*9 + 1,(iStork-1)*3 + i+1);
TextColor(20+i);
writeln('Û');
gotoxy((jStork-1)*9 + 3,(iStork-1)*3 + i+1);
writeln('Û');
gotoxy((jStork-1)*9 + 5,(iStork-1)*3 + i+1);
writeln('Û');
gotoxy((jStork-1)*9 + 7,(iStork-1)*3 + i+1);
writeln('Û');
for i:=1 to 5 do
begin
delay(9000); {IMPACT!!!}
sound(100);
delay(7000);
sound(150);
delay(3000);
sound(2500);
delay(3000);
sound(75);
delay(3000);
sound(175);
delay(5000);
NoSound;
end;
BreakLock:=True;
DeathLock:=True;
end;
Procedure WriteSlowly;
begin
for i:=1 to Length(Str) do
begin
Delay(7000);
gotoxy(26+i,13);
writeln(Str[i]);
end;
for i:=1 to 30 do
begin
Delay(15000);
TextColor(10);
gotoxy(24+i,15);
writeln('Û');
end;
TextColor(20);
gotoxy(33,17);
writeln('PRESS ANY KEY');
Readkey;
Clrscr;
Str:=' RED STORK';
TextColor(RED);
WriteSlowly;
Readkey;
Str:='A MR.STORK PRODUCTION';
TextColor(9);
WriteSlowly;
Readkey;
Str:='DONT BE AFRAID OF THE DARK!';
WriteSlowly;
Readkey;
TextColor(RED);
Str:='BE AFRAID OF WHAT IS IN IT!';
writeSlowly;
Readkey;
Clrscr;
TextColor(7);
gotoxy(35,11);
writeln('STAGE ',iStage);
gotoxy(29,13);
writeln('PRESS ENTER TO START');
readln;
Repeat
Clrscr;
iFuel:=10000;
for i:=1 to 6 do {Empty array}
for j:=1 to 10 do
begin
Area[i,j]:=0;
end;
Area[3,1]:=-1;
if StageLock then
begin
iStage:=iStage + 1;
TextColor(7);
gotoxy(35,11);
writeln('STAGE ',iStage);
gotoxy(29,13);
writeln('PRESS ENTER TO START');
Readln;
StageLock:=False;
end;
if DeathLock then
begin
TextColor(7);
gotoxy(35,11);
writeln('STAGE ',iStage);
gotoxy(29,13);
writeln('PRESS ENTER TO START');
readln;
DeathLock:=False;
end;
TextColor(6);
gotoxy(1,19);
writeln('Û Û Û
Û');
gotoxy(1,20);
writeln(' Û ÛÛÛ Û /\ ÛÛÛ
Û ');
gotoxy(1,21);
writeln(' Û ÛÛÛÛÛ ÛÛÛ / \ ÛÛÛÛÛ
Û ');
gotoxy(1,22);
writeln(' ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
');
TextColor(Red);
gotoxy(46,23);
writeln('123');
TextColor(yellow);
gotoxy(49,23);
writeln('456');
TextColor(Green);
gotoxy(52,23);
writeln('789');
repeat
Delay(35000);
for Erase:=1 to 18 do
begin
gotoxy(1,Erase);
ClrEol;
end;
if KeyPressed then
Key:=Readkey;
if Key=#0 then
Key:=Readkey;
Case Key of
Up :begin
if (Area[iStork - 1,jStork]<>0) and (iStork<>1) and(Area[iStork -
1,jStork]<>5) then
begin
Impact;
end;
if iStork<>1 then
begin
Area[iStork,jStork]:=0;
Area[iStork-1,jStork]:=-1;
end;
Key:=#1;
end;
Down:begin
if (Area[iStork + 1,jStork]<>0) and (iStork<>6) and (iStork<>1) and
(Area[iStork + 1,jStork]<>5)then
begin
Impact;
end;
if iStork<>6 then
begin
Area[iStork,jStork]:=0;
Area[iStork+1,jStork]:=-1;
end;
Key:=#1;
end;
Right:begin
if jStork<>9 then
begin
Area[iStork,jStork]:=0;
Area[iStork,jStork+1]:=-1;
end;
key:=#1;
end;
Left :begin
if jStork<>1 then
begin
Area[iStork,jStork]:=0;
Area[iStork,jStork-1]:=-1;
end;
key:=#1;
end;
Space:begin
if Area[iStork,jStork+1]<>0 then
begin
CloseEnemy:=True;
EnemyShip:=Area[iStork,jStork+1];
end;
iLock:=Random(Possibility); {Decide you'll create an enemy or not}
if iLock=0 then
begin
iEnemy:=Random(6)+1;
EnemyShip:=Random(4)+1;
Case EnemyShip of {Decide the type of enemy}
1:begin
Area[iEnemy,10]:=1;
end;
2:begin
Area[iEnemy,10]:=2;
end;
4:begin
Area[iEnemy,10]:=4;
end;
end; {End of Case}
end; {End of if}
iLock:=Random(110);
if iLock=0 then
begin
if Area[3,9]=0 then
Area[3,9]:=5;
end;
FireLock:=True;
for i:=1 to 6 do
for j:=1 to 10 do
begin
Case Area[i,j] of
-1 :begin
textcolor(12);
gotoxy((j-1)*9 + 1,(i-1)*3 + 1);
writeln('Ü =Ûß-');
gotoxy((j-1)*9 + 1,(i-1)*3 + 2);
writeln('ÛÛÛÛÛÛÛÜ');
gotoxy((j-1)*9 + 1,(i-1)*3 + 3);
writeln(' =ÛÜ-');
iStork:=i;
jStork:=j;
if CloseEnemy then
begin
FireMusic;
CloseEnemy:=False;
end;
end;
1 :begin
Area[i,j]:=0;
if j<>1 then {If you are at the end of way don't try to output}
begin
Area[i,j-1]:=1; {Put this ship's value into this array box}
if (i=iStork) and (j-1=jStork) then
begin
Impact;
end;
end;
2 :begin
Area[i,j]:=0;
if j<>1 then {If you are at the end of way don't try to output}
begin
Area[i,j-1]:=2; {Put this ship's value into this array box}
4 :begin
Area[i,j]:=0;
if j<>1 then {If you are at the end of way don't try to output}
begin
Area[i,j-1]:=4; {Put this ship's value into this array box}