Опубликовано 4 марта, 200620 г. comment_1962063 https://academ.club/html/emoticons/biggrin.gif {$A+,B-,D+,E+,F-,G-,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+,Y+} {$M 16384,0,655360} uses crt,all256 ; const ch=47;cc=15; type har=record hhod:byte; zm:array[1..4] of byte; shp:byte; shk:byte; pir:integer; kin:integer; end; var cf,pri,xy,yy,by,by1,pb,ccl,hod,nap,port,a,b,pm,c,d,do1,do2,do3,do4,do5,do6:integer; human,live,town:array[6..10] of boolean; check,ly,lx:array[7..9] of byte; shx,shy:array[7..9,0..100]of byte; magic:array[7..9,1..25] of boolean; len,xmm,ymm,e,x,y,pn,color,xtt,ytt,pstbr,pstai,pstzv,kstbr,kstai,kstzv:integer; hasme,day,ned,mes,god:integer; da,ne,me,go:string[4]; {THAT's WAR} wt,wz,wn,per1,per2:array[7..9,1..9]of integer; {KINSAMVAN} f:file of byte; pole:array[1..65,1..65]of byte; p:array[1..79] of ^pointer; p1,kr,gl,cl:^pointer; point:^pointer; were,w:word; cur:boolean; boat,polpit:array[7..9] of boolean; dpi,dki:array[7..9] of integer; zas,spower,power,know:array[7..9] of byte; ener,pitan:array[7..9] of integer; cccc:char; red,blue,green:har; stro:array[0..148,0..105] of byte; airoport:array[0..136,0..78] of byte; barak:array[0..82,0..36] of byte; zavod:array[0..148,0..105] of byte; var poi:pointer; as1,xmd,ymd,but,xm,ym,xb,yb,xb1,yb1,lon,wer,ab,bb,bc,bd:integer; co,cc1,coc,dv,no,con:integer; label 1,2,3,4,st,hm,z1,z2,z3,prod1,prod2,nee,law; procedure ylin(yyy,mlk:integer); begin line(100,yyy,220,yyy,mlk); end; function menu :byte; var viy:integer; label 1; begin viy:=1; menu:=0; initvga256; loadpcx('menu.pcx',true); ylin(60+viy*30,11); ylin(85+viy*30,11); repeat case readkey of #27:begin closevga256;halt;end; #80:if viy<>3 then begin ylin(85+viy*30,0);ylin(60+viy*30,0);viy:=viy+1;ylin(85+viy*30,11);ylin(60+viy*30,11);end; #72:if viy<>1 then begin ylin(85+viy*30,0);ylin(60+viy*30,0);viy:=viy-1;ylin(85+viy*30,11);ylin(60+viy*30,11);end; #13:begin if viy=3 then begin closevga256;halt;end else begin menu:=1;goto 1;end; end; end until viy=100; 1: end; procedure antiokno5;begin storebitblock(xb,yb,poi);release(poi);end; procedure okno5(sb1,sb2,sb3,sb4,sb5:string;fon,col:byte); begin lon:=0;co:=5;cc1:=0;if length(sb1)>0 then cc1:=cc1+1;if length(sb2)>0 then cc1:=cc1+1;if length(sb3)>0 then cc1:=cc1+1; if length(sb4)>0 then cc1:=cc1+1;if length(sb5)>0 then cc1:=cc1+1;if length(sb1)>lon then lon:=length(sb1);if length(sb2)>lon then lon:=length(sb2);if length(sb3)>lon then lon:=length(sb3);if length(sb4)>lon then lon:=length(sb4);if length(sb5)>lon then lon:=length(sb5);if length(sb1)=0 then co:=co-1;if length(sb2)=0 then co:=co-1;if length(sb3)=0 then co:=co-1;if length(sb4)=0 then co:=co-1;if length(sb5)=0 then co:=co-1;xb:=((319-lon*8) div 2)-2;xb1:=((319-lon*8) div 2)+lon*8;yb:=74; yb1:=126;wer:=imagesize(xb,yb,xb1,yb1);getmem(poi,wer);getbitblock(xb,yb,xb1,yb1,poi);coc:=6-cc1;if co=0 then co:=2;if co=1 then co:=2;no:=-1;dv:=50 div co;bar(xb,yb,xb1,yb1,fon);line(xb,yb,xb,yb1,col);line(xb,yb1,xb1,yb1,col); line(xb1,yb1,xb1,yb,col);line(xb1,yb,xb,yb,col);if length(sb1)<>0 then begin no:=no+1;writestr(((319-length(sb1)*8) div 2), round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb1);end;if length(sb2)<>0 then begin no:=no+1;writestr(((319-length(sb2) *8)div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb2);end;if length(sb3)<>0 then begin no:=no+1;writestr(((319- length(sb3)*8) div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb3);end;if length(sb4)<>0 then begin no:=no+1; writestr(((319-length(sb4)*8) div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb4);end;if length(sb5)<>0 then begin no:=no+1;writestr(((319-length(sb5)*8) div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb5);end;end; procedure buy(col:integer); var qp,q1p:pointer; procedure zd; begin loadpcx('buy.pcx',true); okno5('ќв® ¬Ґо Ї®§ў®«пҐв бЄгЇ вм','вҐеЁЄг, 室пйгобп ў','п祩Є е Їа®вЁў бв५ЄЁ.', '‚ Ё¦Ёе п祩Є е 室Ёвбп','㦥 бЄгЇ«Ґ п вҐеЁЄ .',217,188);readkey;antiokno5; readkey; bar(0,0,320,200,0); end; begin zd; loadpcx('buypis.pcx',true);okno5('ќв® ¬Ґо Ї®§ў®«пҐв бЄгЇ вм','вҐеЁЄг, 室пйгобп ў','п祩Є е Їа®вЁў бв५ЄЁ.', '‚ Ё¦Ёе п祩Є е 室Ёвбп','㦥 бЄгЇ«Ґ п вҐеЁЄ .',2,43);readkey;antiokno5; bar(0,0,320,200,0); end; function cantmovmon(ve,ho,al,al1:byte) :boolean; var nomm:byte; begin nomm:=0; cantmovmon:=false; if (pole[ve-1,ho]<>al) and (pole[ve-1,ho]<>al1)then nomm:=nomm+1; if (pole[ve+1,ho]<>al) and (pole[ve+1,ho]<>al1)then nomm:=nomm+1; if (pole[ve,ho-1]<>al) and (pole[ve,ho-1]<>al1)then nomm:=nomm+1; if (pole[ve,ho+1]<>al) and (pole[ve,ho+1]<>al1)then nomm:=nomm+1; if nomm=4 then cantmovmon:=true; end; procedure movemon(xtx,yty,num:byte); var ran,na,nn,nn1:byte; label 1,2; begin if (num=27) or (num=28) then begin nn:=1;nn1:=2;end; if num=30 then begin nn1:=6;nn:=6;end; if num=31 then begin nn1:=3;nn:=3;end; 1: if cantmovmon(xtx,yty,nn,nn1)=true then goto 2; na:=1+random(4); case na of 1:if (pole[xtx-1,yty]<>nn) and (pole[xtx-1,yty]<>nn1) then goto 1; 3:if (pole[xtx+1,yty]<>nn) and (pole[xtx+1,yty]<>nn1) then goto 1; 2:if (pole[xtx,yty-1]<>nn) and (pole[xtx,yty-1]<>nn1) then goto 1; 4:if (pole[xtx,yty+1]<>nn) and (pole[xtx,yty+1]<>nn1) then goto 1; end; pole[xtx,yty]:=nn; case na of 1:pole[xtx-1,yty]:=num; 3:pole[xtx+1,yty]:=num; 2:pole[xtx,yty-1]:=num; 4:pole[xtx,yty+1]:=num; end; 2:end; procedure antiokno; begin storebitblock(155-len*10 div 2,85,point); release(point); end; procedure okno(s1,s2,s3:string; fon,col:byte); begin len:=0; if length(s1)>len then len:=length(s1); if length(s2)>len then len:=length(s2); if length(s3)>len then len:=length(s3); were:=imagesize(155-len*10 div 2,85,150+len*10 div 2+3,135); getmem(point,were); getbitblock(155-len*10 div 2,85,150+len*10 div 2+3,135,point); bar(155-len*10 div 2,85,150+len*10 div 2+3,135,fon); line(155-len*10 div 2,85,150+len*10 div 2+3,85,col); line(155-len*10 div 2,135,150+len*10 div 2+3,135,col); line(155-len*10 div 2,85,155-len*10 div 2,135,col); line(150+len*10 div 2+3,85,150+len*10 div 2+3,135,col); writestr(160-length(s1)*10 div 2+10,97,col,0,s1); writestr(160-length(s2)*10 div 2+10,110,col,0,s2); writestr(160-length(s3)*10 div 2+10,123,col,0,s3); end; {!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} {!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} {!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} procedure death_man; var sus:string; begin sus:=''; if live[7]=false then if town[7]=false then sus:='ѓг¤®«мЈЁ©бЄЁ© Ї ⥮ !'; if live[8]=false then if town[8]=false then sus:='’гаЁдЁЄ бЄЁ© Ї ⥮ !'; if live[9]=false then if town[9]=false then sus:='Џ ⥮ зҐале вЁа ®ў !'; if sus<>'' then begin okno5('...‘…Ќ‘Ђ–?џ...','‚묥а',sus,'','',7,232);readkey;antiokno5; end; end; procedure givmagic(maks,ix,iy:byte); var dg,nowe:integer; as1,as2:string[70]; tru:array[1..65,1..65,7..9] of boolean; label 1,2; begin if (cf=0) or ((day=1)and(ned>1)) then for c:=7 to 9 do for a:=1 to 65 do for b:=1 to 65 do begin tru[a,b,c]:=false; end; 2: cf:=3; if color<9 then if tru[ix,iy,9]=true then begin okno5('?®Ї« ҐвпҐ «Ґ¦Ёв',' Ї®«г Ё г ҐЈ® Ґ','ᢥвЁвбп ЇбҐў¤®Ј« §.','','',2,232); readkey;antiokno5;goto 1; end; if color=9 then if tru[ix,iy,9]=true then begin okno5('‚ Їа®и«л© а § ўл аҐиЁ«Ё,','зв® ЇаЁиҐ«мж Ґ бв®Ёв','®бв ў«пвм ў ¦Ёўле...','','',2,232); readkey;antiokno5;goto 1; end; if tru[ix,iy,color]=true then begin case color of 7:okno5('‚л §¤Ґбм 㦥 Ўл«Ё','Ё Ї®¤г¬ «Ё,зв® Ґ бв®Ёв', '«ЁиЁ© а § § 室Ёвм бо¤ .','','',2,232); 8:okno5('Љ®Ј¤ ўл § и«Ё ¤®¬ЁЄ,','Ё®Ї« ҐвпҐ Ї®б« « ў б', '"Єг¤ Ї®¤ «миҐ".','','',2,232); end; readkey;antiokno5;goto 1; end; if maks=25 then as2:='...„®¬ЁЄ Ё®Ї« ҐвпЁ ...' else as2:='...?®Ї« ҐвпбЄЁ© Ўг©...'; dg:=random(17); nowe:=0; if magic[color,dg]=true then nowe:=100; case dg of 0:begin okno5(as2,'?¤Ё ®вбў ,','¬гв в Їа®Є«пвл©.','','',2,243);readkey; antiokno5;tru[ix,iy,color]:=true;goto 1;end; 1:begin as1:='’®а¬®§Ё«®ўЄЁ.';magic[color,dg]:=true;end; 2:begin as1:='’®аЇҐ¤л.';magic[color,dg]:=true;end; 3:begin as1:='‚®¤®«Ґп.';magic[color,dg]:=true;end; 4:begin as1:='‡«®Ј® «гз .';magic[color,dg]:=true;end; 5:begin as1:='‡«®Ј® «гз .';magic[color,4]:=true;end; 6:begin as1:='’ҐЇ«®ў®Ј® «гз .';magic[color,dg]:=true;end; 7:begin as1:='‘®бг饣® «гз .';magic[color,dg]:=true;end; 8:begin as1:='Ќ Їа ў«Ґ®Ј® ў Єгг¬ .';magic[color,dg]:=true;end; 9:begin as1:='Ђ«ЁЄ®а®ў ᢥв .';magic[color,dg]:=true;end; 10:begin as1:='‚л§®ў †Ґ«Ґ§®Ј® §ўҐап.';magic[color,dg]:=true;end; 11:begin as1:='‚л§®ў Ў®Ґў®Ј® е¬лап.';magic[color,dg]:=true;end; 12:begin as1:='? а®ў®© ¬®«Ёп.';magic[color,dg]:=true;end; 13:begin as1:='Љ®ЈвҐ© ᬥавЁ.';magic[color,dg]:=true;end; 14:begin as1:='„®¦¤п ѓҐа®®ў®© ЄЁб«®вл.';magic[color,dg]:=true;end; 15:begin as1:='ќд䥪⠬Ґ¤г§л.';magic[color,dg]:=true;end; 16:begin as1:='ѓ«оЄ® в Є «мжЁп.';magic[color,dg]:=true;end; 17:begin as1:='ЂЇ®Є «ЁЇбЁб .';magic[color,dg]:=true;end; end; if nowe<>100 then okno5(as2,'ЋвЄа®о-Є п ⥡Ґ ᥪаҐв',as1,'','',2,48) else okno5('?§ўЁЁ Ё¬ЇҐа в®а,','® в®,Ґ¤Ёб⢥®Ґ, зв®', 'п Ўл ⥡Ґ ¤®ўҐаЁ«','г ⥡п 㦥 Ґбвм...','', 2,243); repeat until readkey=#32; antiokno5; if color=9 then begin okno5('Ѓ®пбм ,зв® ЇаЁиҐ«Ґж ¬®¦Ґв','а ббЄ § вм зв®-«ЁЎ® ¤агЈЁ¬,','ўл ЇаЁЄ®зЁ«Ё ҐЈ®.','','',2,232); readkey;antiokno5; end; tru[ix,iy,color]:=true; if color=9 then tru[ix,iy,9]:=true; 1: end; procedure writ(xw,yw,cw,fn:integer;nw:longint); var sw:string; begin writestr(xw,yw,fn,0,'ЫЫЫЫЫ');str(nw,sw);writestr(xw,yw,cw,0,sw); end; procedure zahvat(ixx,iyy:byte); label 1; var zx,xz:string; vv:char; begin xz:=''; zx:=''; for a:=1 to 100 do if (shx[color,a]=ixx) and (shy[color,a]=iyy) then goto 1; if pole[ixx,iyy]=34 then begin xz:='? ев ЇЁаЁв ';end else if pole[ixx,iyy]=35 then begin xz:='? ев ЄЁ®ў ап';end; for a:=1 to 100 do if (shx[7,a]=ixx) and (shy[7,a]=iyy) then begin zx:='ѓг¤®«мЈЁ©бЄ®Ј® Ї ⥮ ';okno5(xz,zx,'‡ еў вЁвм? ¤ -enter','','',2,223); vv:=readkey;antiokno5;if vv<>#13 then goto 1; if xz='? ев ЇЁаЁв ' then begin shx[7,a]:=0;shy[7,a]:=0;red.shp:=red.shp-1; case color of 8:begin blue.shp:=blue.shp+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; 9:begin green.shp:=green.shp+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; end;goto 1;end else if xz='? ев ЄЁ®ў ап' then begin shx[7,a]:=0;shy[7,a]:=0;red.shk:=red.shk-1; case color of 8:begin blue.shk:=blue.shk+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; 9:begin green.shk:=green.shk+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; end;goto 1; end; end; {!!!!!!!!!!!!!!!!!!} for a:=1 to 100 do if (shx[8,a]=ixx) and (shy[8,a]=iyy) then begin zx:='’гаЁдЁЄ бЄ®Ј® Ї ⥮ ';okno5(xz,zx,'‡ еў вЁвм? ¤ -enter','','',2,223); vv:=readkey;antiokno5;if vv<>#13 then goto 1; if xz='? ев ЇЁаЁв ' then begin shx[8,a]:=0;shy[8,a]:=0;blue.shp:=blue.shp-1; case color of 7:begin red.shp:=red.shp+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; 9:begin green.shp:=green.shp+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; end;goto 1;end else if xz='? ев ЄЁ®ў ап' then begin shx[8,a]:=0;shy[8,a]:=0;blue.shk:=blue.shk-1; case color of 7:begin blue.shk:=blue.shk+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; 9:begin green.shk:=green.shk+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end; end;goto 1; end; end; {!!!!!!!!!!!!!!!!!!} for a:=1 to 100 do if (shx[9,a]=ixx) and (shy[9,a]=iyy) then begin zx:='Џ ⥮ зҐале вЁа ®ў';okno5(xz,zx,'‡ еў вЁвм? ¤ -enter','','',2,223); vv:=readkey;antiokno5;if vv<>#13 then goto 1; if xz='? ев ЇЁаЁв ' then begin shx[9,a]:=0;shy[9,a]:=0;green.shp:=green.shp-1; case color of 7:begin red.shp:=red.shp+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end; 8:begin blue.shp:=blue.shp+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end; end;goto 1; end else if xz='? ев ЄЁ®ў ап' then begin shx[9,a]:=0;shy[9,a]:=0;blue.shk:=blue.shk-1; case color of 7:begin red.shk:=red.shk+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end; 8:begin blue.shk:=blue.shk+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end; end;goto 1; end;end; {!!!!!!!!!!!!!!!!!!} 1:end; {!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} {!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} {!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} procedure givartifakt; var art,arup:string[70]; pii,kii,ra,arti,ra1:integer; label 1; begin pii:=0; kii:=0; ra1:=random(3); if ra=1 then ra:=17+random(12) else ra:=1+random(17); case ra of {I} 1:begin art:='Ѓа®п ¤аҐўҐЈ® ®ЎЁв ⥫п.';arup:='(§ йЁв +1)';zas:=zas+1;end; 2:begin art:='ЊҐз вЁв ®ў.';arup:='( в Є +1)';power:=power+1;end; 3:begin art:='„ॢпп Ў в ३Є .';arup:='(нҐаЈЁп+1)';spower:=spower+1;end; 4:begin art:='„ॢЁ© б«®ў ам.';arup:='(§ Ёп+1)';know:=know+1;end; {II} 5:begin art:='?Єга ЇҐб®з®Ј® зҐаўп.';arup:='(§ йЁв +2)';zas:=zas+2;end; 6:begin art:='ЊҐ¤ «м ўҐвҐа .';arup:='( в Є +2)';power:=power+2;end; 7:begin art:='ќҐаЈҐвЁзҐбЄЁ© ўЁЎаЁ®.';arup:='(нҐаЈЁп+2)';spower:=spower+2;end; 8:begin art:='‡ ¬лб«®ў в п ЇҐад®Є ав .';arup:='(§ Ёп+2)';know:=know+2;end; {III} 9:begin art:='Џ®ЄалвЁҐ §ўҐ¤®«Ґв ЇаЁиҐ«м楢.';arup:='(§ йЁв +3)';zas:=zas+3;end; 10:begin art:='Ћ§ўҐаЁ.';arup:='( в Є +3)';power:=power+3;end; 11:begin art:='ќҐаЈ® б®б.';arup:='(нҐаЈЁп+3)';spower:=spower+3;end; 12:begin art:='„ЁбЄ,®бв ў«Ґл© ЇаЁиҐ«мж ¬Ё.';arup:='(§ Ёп+3)';know:=know+3;end; {IV} 13:begin art:='Ђ¬Ґ§Ґа.';arup:='(§ Ёп=0)';know:=0;end; 14:begin art:='Љ ¬Ґм —Ґа®© ‹Ёе®а ¤ЄЁ.';arup:='( в Є =0,§ йЁв =0)';power:=0;zas:=0;end; 15:begin art:='ќ«ҐЄва®л© ў ¬ЇЁа.';arup:='(нҐаЈЁп=0)';spower:=0;end; 16:begin art:='Kackzor.';arup:='(§ йЁв =0)';zas:=0;end; 17:begin art:='Љ ¬Ґм ѓҐа® .';arup:='( в Є =0)';power:=0;end; {V} 18:begin art:='Price by Mr.RandoM.';arup:='(‚ᥠЇгЄвл+5)'; inc(know,5);inc(spower,5);inc(power,5);inc(zas,5);end; 19:begin art:='Џ гЄ ЂЎ®е ЎЁб .';arup:='(‚ᥠЇгЄвл=0)'; know:=0;spower:=0;power:=0;zas:=0;end; 20:begin art:='‚®а,бЎҐ¦ ўиЁ© c Ђа ЄЁб .';arup:='(ЇЁаЁв+1000,ЄЁ®ў ам+1000)'; pii:=1000;kii:=1000;end; 21:begin art:='‚ ааоЈ .';arup:='(ЇЁаЁв=0,ЄЁ®ў ам=0)'; pii:=1;kii:=1;end; 22:begin art:=' «мд -ЈҐҐа в®а ЇЁаЁв .';arup:='(ЇЁаЁв+150 ў ¤Ґм)'; dpi:=dpi+150;end; 23:begin art:=' «мд -ЈҐҐа в®а ЄЁ®ў ап.';arup:='(ЄЁ®ў ам+75 ў ¤Ґм)'; dki:=dki+75;end; 24:begin art:='ЎҐвв -ЈҐҐа в®а ЇЁаЁв .';arup:='(ЇЁаЁв+250 ў ¤Ґм)'; dpi:=dpi+250;end; 25:begin art:='ЎҐвв -ЈҐҐа в®а ЄЁ®ў ап.';arup:='(ЄЁ®ў ам+130 ў ¤Ґм)'; dki:=dki+130;end; 26:begin art:='ЈҐҐа в®а ЇЁв Ёп.';arup:='(ЇЁв ЁҐ Ї®«ҐҐв ў Ґ¤.)'; polpit:=true;end; 27:begin art:='„®Ї®«ЁвҐ«м п вгаЎЁ .';arup:='(室л+5)';if color=7 then red.hhod:=red.hhod+5; if color=8 then blue.hhod:=blue.hhod+5; if color=9 then green.hhod:=green.hhod+5;end; 28:begin art:='ѓҐҐа в®а ўаҐ¬ҐЁ.';arup:='(室л+10)';if color=7 then red.hhod:=red.hhod+10; if color=8 then blue.hhod:=blue.hhod+10; if color=9 then green.hhod:=green.hhod+10;end; end; okno5('...Ђђ’?”ЂЉ’...',art,arup,'','',2,31); if (pii=0) and (kii=0) then goto 1; if (pii=1) and (kii=1) then case color of 7:begin red.pir:=0;red.kin:=0;end; 8:begin blue.pir:=0;blue.kin:=0;end; 9:begin green.pir:=0;green.kin:=0;end; end; if (pii<>1) and (kii<>1) then case color of 7:begin red.pir:=red.pir+pii;red.kin:=red.kin+kii;end; 8:begin blue.pir:=blue.pir+pii;blue.kin:=blue.kin+kii;end; 9:begin green.pir:=green.pir+pii;green.kin:=green.kin+kii;end; end; 1:repeat until readkey=#32;antiokno5; case color of 7:begin writ(258,37,120,3,red.pir); writ(258,60,120,3,red.kin);end; 8:begin writ(258,37,120,3,blue.pir); writ(258,60,120,3,blue.kin);end; 9:begin writ(258,37,120,3,green.pir); writ(258,60,120,3,green.kin);end; end; end; procedure oknod(s1,s2,d3,d4,d5:string; fon,col:byte); var data:string; begin data:=s2+':'+d3+':'+d4+':'+d5+'Ј.'; len:=0; if length(s1)>len then len:=length(s1); if length(s2)>len then len:=length(s2); were:=imagesize(155-len*10 div 2,85,150+len*10 div 2+3,135); getmem(point,were); getbitblock(155-len*10 div 2,85,150+len*10 div 2+3,135,point); bar(155-len*10 div 2,85,150+len*10 div 2+3,135,fon); line(155-len*10 div 2,85,150+len*10 div 2+3,85,col); line(155-len*10 div 2,135,150+len*10 div 2+3,135,col); line(155-len*10 div 2,85,155-len*10 div 2,135,col); line(150+len*10 div 2+3,85,150+len*10 div 2+3,135,col); writestr(160-length(s1)*10 div 2+10,90,col,0,s1); writestr(160-length(data)*10 div 2+10,110,col,0,data); end; procedure map(x1,y1:integer); var px,py:integer; label 1; begin if human=false then goto 1; px:=250;py:=130; for a:=1 to 65 do for b:=1 to 65 do case pole[a,b] of 1:putpixel(a-1+px,b-1+py,29); 2:putpixel(a-1+px,b-1+py,30); 3:putpixel(a-1+px,b-1+py,249); 4:putpixel(a-1+px,b-1+py,46); 5:putpixel(a-1+px,b-1+py,177); 6:putpixel(a-1+px,b-1+py,2); 7:putpixel(a-1+px,b-1+py,224); {---Machines--Red---------} 39:putpixel(a-1+px,b-1+py,224); 40:putpixel(a-1+px,b-1+py,224); 41:putpixel(a-1+px,b-1+py,224); {---Machines--Blue---------} 8:putpixel(a-1+px,b-1+py,3); 42:putpixel(a-1+px,b-1+py,3); 43:putpixel(a-1+px,b-1+py,3); 44:putpixel(a-1+px,b-1+py,3); {---Machines--Green---------} 9:putpixel(a-1+px,b-1+py,223); 45:putpixel(a-1+px,b-1+py,223); 46:putpixel(a-1+px,b-1+py,223); 47:putpixel(a-1+px,b-1+py,223); 10:putpixel(a-1+px,b-1+py,224); 11:putpixel(a-1+px,b-1+py,224); 12:putpixel(a-1+px,b-1+py,224); 13:putpixel(a-1+px,b-1+py,224); 14:putpixel(a-1+px,b-1+py,3); 15:putpixel(a-1+px,b-1+py,3); 16:putpixel(a-1+px,b-1+py,3); 17:putpixel(a-1+px,b-1+py,3); 18:putpixel(a-1+px,b-1+py,223); 19:putpixel(a-1+px,b-1+py,223); 20:putpixel(a-1+px,b-1+py,223); 21:putpixel(a-1+px,b-1+py,223); 22:putpixel(a-1+px,b-1+py,103); 25:putpixel(a-1+px,b-1+py,112); 23:putpixel(a-1+px,b-1+py,138); 24:putpixel(a-1+px,b-1+py,145); {---Batiskaf----------------} 26:putpixel(a-1+px,b-1+py,1); 36:putpixel(a-1+px,b-1+py,1); 37:putpixel(a-1+px,b-1+py,1); 38:putpixel(a-1+px,b-1+py,1); 27:putpixel(a-1+px,b-1+py,225); 28:putpixel(a-1+px,b-1+py,245); 29:putpixel(a-1+px,b-1+py,42); 30:putpixel(a-1+px,b-1+py,250); 30:putpixel(a-1+px,b-1+py,99); 31:putpixel(a-1+px,b-1+py,210); 32:putpixel(a-1+px,b-1+py,100); 33:putpixel(a-1+px,b-1+py,111); end; putpixel(x1-1+px,y1-1+py,0); line(x1+px,y1-1+py,x1+9+px,y1-1+py,0); line(x1+px,y1+7+py,x1+9+px,y1+7+py,0); line(x1-1+px,y1+py,x1-1+px,y1+7+py,0); line(x1+9+px,y1+py,x1+9+px,y1+7+py,0); 1: end; procedure freemems; begin for a:=1 to 80 do release(p[a]); end; procedure load; var fifo:byte; begin loadpcx('cls.pcx',true); bar(0,0,320,200,0); loadpcx('game.pcx',false); w:=imagesize(0,78,24,102);getmem(p[1] ,w);getbitblock(0,78,24,102,p[1] ); w:=imagesize(26,78,51,102);getmem(p[2] ,w);getbitblock(26,78,50,102,p[2] ); w:=imagesize(78,78,102,102);getmem(p[3] ,w);getbitblock(78,78,102,102,p[3] ); {-------------mashines--------------------} w:=imagesize(0,0,24,24);getmem(p[7] ,w);getbitblock(0,0,24,24,p[7] ); w:=imagesize(0,26,24,50);getmem(p[8] ,w);getbitblock(0,26,24,50,p[8] ); w:=imagesize(0,52,24,76);getmem(p[9] ,w);getbitblock(0,52,24,76,p[9] ); {#@$%%##^@$#%^^$@%#} w:=imagesize(0,104,24,128);getmem(p[4] ,w);getbitblock(0,104,24,128,p[4] ); w:=imagesize(26,104,50,128);getmem(p[5] ,w);getbitblock(26,104,50,128,p[5] ); w:=imagesize(52,78,76,102);getmem(p[6] ,w);getbitblock(52,78,76,102,p[6] ); {-----------------RED----------------} w:=imagesize(104,0,128,24);getmem(p[10] ,w);getbitblock(104,0,128,24,p[10] ); w:=imagesize(130,0,154,24);getmem(p[11] ,w);getbitblock(130,0,154,24,p[11] ); w:=imagesize(130,26,154,50);getmem(p[12] ,w);getbitblock(130,26,154,50,p[12] ); w:=imagesize(104,26,128,50);getmem(p[13] ,w);getbitblock(104,26,128,50,p[13] ); {-----------------BLUE----------------} w:=imagesize(156,0,180,24);getmem(p[14] ,w);getbitblock(156,0,180,24,p[14] ); w:=imagesize(182,0,206,24);getmem(p[15] ,w);getbitblock(182,0,206,24,p[15] ); w:=imagesize(182,26,206,50);getmem(p[16] ,w);getbitblock(182,26,206,50,p[16] ); w:=imagesize(156,26,180,50);getmem(p[17] ,w);getbitblock(156,26,180,50,p[17] ); {-----------------GREEN----------------} w:=imagesize(208,0,232,24);getmem(p[18] ,w);getbitblock(208,0,232,24,p[18] ); w:=imagesize(234,0,258,24);getmem(p[19] ,w);getbitblock(234,0,258,24,p[19] ); w:=imagesize(234,26,258,50);getmem(p[20] ,w);getbitblock(234,26,258,50,p[20] ); w:=imagesize(208,26,232,50);getmem(p[21] ,w);getbitblock(208,26,232,50,p[21] ); w:=imagesize(0,130,24,154);getmem(p[22] ,w);getbitblock(0,130,24,154,p[22] ); w:=imagesize(26,130,50,154);getmem(p[23] ,w);getbitblock(26,130,50,154,p[23] ); w:=imagesize(78,104,102,128);getmem(p[24] ,w);getbitblock(78,104,102,128,p[24] ); w:=imagesize(130,52,154,76);getmem(p[25] ,w);getbitblock(130,52,154,76,p[25] ); {UP}w:=imagesize(156,52,180,76);getmem(p[26] ,w);getbitblock(156,52,180,76,p[26] ); w:=imagesize(104,52,128,76);getmem(p[27] ,w);getbitblock(104,52,128,76,p[27] ); w:=imagesize(104,78,128,102);getmem(p[28] ,w);getbitblock(104,78,128,102,p[28] ); w:=imagesize(130,78,154,102);getmem(p[29] ,w);getbitblock(130,78,154,102,p[29] ); w:=imagesize(104,104,128,128);getmem(p[30] ,w);getbitblock(104,104,128,128,p[30] ); w:=imagesize(104,130,128,154);getmem(p[31] ,w);getbitblock(104,130,128,154,p[31] ); w:=imagesize(130,104,154,128);getmem(p[32] ,w);getbitblock(130,104,154,128,p[32] ); w:=imagesize(52,104,76,128);getmem(p[33] ,w);getbitblock(52,104,76,128,p[33] ); {!!!!!!!!!!!!!!!!!NEW NEW NEW NEW NEW!!!!!!!!!!!!!!!!!!!!!!!!!} {DOB›VALKI}w:=imagesize(52,130,76,154);getmem(p[34] ,w);getbitblock(52,130,76,154,p[34] ); w:=imagesize(78,130,102,154);getmem(p[35] ,w);getbitblock(78,130,102,154,p[35] ); (*RIGHT*)w:=imagesize(182,52,206,76);getmem(p[36 ] ,w);getbitblock(182,52,206,76,p[36 ] ); {BATISKAF}(*DOWN*)w:=imagesize(208,52,232,76);getmem(p[37] ,w);getbitblock(208,52,232,76,p[37 ] ); (*left*)w:=imagesize(234,52,258,76);getmem(p[38 ] ,w);getbitblock(234,52,258,76,p[38 ] ); (*RIGHT*)w:=imagesize(26,0,50,24);getmem(p[39 ] ,w);getbitblock(26,0,50,24,p[39 ] ); {RED}(*DOWN*)w:=imagesize(52,0,76,24);getmem(p[40] ,w);getbitblock(52,0,76,24,p[40 ] ); (*left*)w:=imagesize(78,0,102,24);getmem(p[41 ] ,w);getbitblock(78,0,102,24,p[41 ] ); (*RIGHT*)w:=imagesize(26,26,50,50);getmem(p[42 ] ,w);getbitblock(26,26,50,50,p[42 ] ); {blue}(*DOWN*)w:=imagesize(52,26,76,50);getmem(p[43] ,w);getbitblock(52,26,76,50,p[43 ] ); (*left*)w:=imagesize(78,26,102,50);getmem(p[44 ] ,w);getbitblock(78,26,102,50,p[44 ] ); (*RIGHT*)w:=imagesize(26,52,50,76);getmem(p[45 ] ,w);getbitblock(26,52,50,76,p[45 ] ); {GREEN}(*DOWN*)w:=imagesize(52,52,76,76);getmem(p[46] ,w);getbitblock(52,52,76,76,p[46 ] ); (*left*)w:=imagesize(78,52,102,76);getmem(p[47 ] ,w);getbitblock(78,52,102,76,p[47 ] ); fifo:=47; bar(0,0,320,200,0); loadpcx('vars.pcx',false); for a:=0 to 5 do for b:=0 to 4 do begin fifo:=fifo+1; w:=imagesize(a*32+1+a,b*32+1+b,a*32+1+a+31,b*32+1+b +31); getmem(p[fifo],w); getbitblock(a*32+1+a,b*32+1+b,a*32+1+a+31,b*32+1+b+31,p[fifo]); end; w:=imagesize(6*32+1+6,0*32+1+0,6*32+1+6+31,0*32+1+0 +31); getmem(p[fifo+1],w); getbitblock(6*32+1+6,0*32+1+0,6*32+1+6+31,0*32+1+0+31,p[fifo+1]); w:=imagesize(6*32+1+6,1*32+1+1,6*32+1+6+31,1*32+1+1 +31); getmem(p[fifo+2],w); getbitblock(6*32+1+6,1*32+1+1,6*32+1+6+31,1*32+1+1+31,p[fifo+2]); w:=imagesize(6*32+1+6,2*32+1+2,6*32+1+6+31,2*32+1+2 +31); getmem(p[fifo+3],w); getbitblock(6*32+1+6,2*32+1+2,6*32+1+6+31,2*32+1+2+31,p[fifo+3]); bar(0,0,320,200,0); loadpcxfast('post.pcx'); for a:=0 to 136 do for b:=0 to 78 do airoport[a,b]:=getpixel(a,b+101); for a:=0 to 82 do for b:=0 to 36 do barak[a,b]:=getpixel(a+86,https://academ.club/html/emoticons/cool.gif; for a:=0 to 148 do for b:=0 to 105 do zavod[a,b]:=getpixel(a+140,b+75); w:=imagesize(170,0,206,30);getmem(gl,w);getbitblock(170,0,206,30,gl); w:=imagesize(206,0,242,30);getmem(kr,w);getbitblock(206,0,242,30,kr); w:=imagesize(242,0,278,30);getmem(cl,w);getbitblock(242,0,278,30,cl); bar(0,0,320,200,0); end; procedure wrpole(plx,ply,od:integer); label 1; begin if human=false then goto 1; for a:=1 to 9 do for b:=1 to 7 do for c:=1 to od do if pole[a+plx,b+ply]=c then begin storebitblock(a*25-22,b*25-9,p[c]); end; 1:end; procedure del; begin if port<>1000 then check:=1; port:=1000; pole[xtt,ytt]:=check; end; procedure www; label 1; begin if color=7 then begin if boat=false then begin if nap=1 then pole[xtt,ytt]:=7; if nap=2 then pole[xtt,ytt]:=39; if nap=3 then pole[xtt,ytt]:=40; if nap=4 then pole[xtt,ytt]:=41;end; if boat=true then begin if nap=1 then pole[xtt,ytt]:=26; if nap=2 then pole[xtt,ytt]:=36; if nap=3 then pole[xtt,ytt]:=37; if nap=4 then pole[xtt,ytt]:=38;end; end; if color=8 then begin if boat=false then begin if nap=1 then pole[xtt,ytt]:=8; if nap=2 then pole[xtt,ytt]:=42; if nap=3 then pole[xtt,ytt]:=43; if nap=4 then pole[xtt,ytt]:=44;end; if boat=true then begin if nap=1 then pole[xtt,ytt]:=26; if nap=2 then pole[xtt,ytt]:=36; if nap=3 then pole[xtt,ytt]:=37; if nap=4 then pole[xtt,ytt]:=38;end; end; if color=9 then begin if boat=false then begin if nap=1 then pole[xtt,ytt]:=9; if nap=2 then pole[xtt,ytt]:=45; if nap=3 then pole[xtt,ytt]:=46; if nap=4 then pole[xtt,ytt]:=47;end; if boat=true then begin if nap=1 then pole[xtt,ytt]:=26; if nap=2 then pole[xtt,ytt]:=36; if nap=3 then pole[xtt,ytt]:=37; if nap=4 then pole[xtt,ytt]:=38;end; end; xy:=0;yy:=0; if (xtt>4) and (xtt<61) and (ytt>3) and (ytt<63) then begin wrpole(xtt-5,ytt-4,ch);map(xtt-5,ytt-4); goto 1;end; if (xtt<6) and (ytt<63) and (ytt>4) then begin wrpole(0,ytt-4,ch);map(0,ytt-4);goto 1;end; if (xtt>60) and (ytt<63) and (ytt>4) then begin wrpole(56,ytt-4,ch);map(56,ytt-4);goto 1;end; if (xtt>5) and (xtt<61) and (ytt<5) then begin wrpole(xtt-5,0,ch);map(xtt-5,0);goto 1;end; if (xtt>5) and (xtt<61) and (ytt>62) then begin wrpole(xtt-5,58,ch);map(xtt-5,58);goto 1;end; if xtt>60 then xy:=56;if xtt<6 then xy:=0; if ytt>62 then yy:=58;if ytt<5 then yy:=0;wrpole(xy,yy,ch);map(xy,yy); 1:end; {----------------------------------------------------------------------------} {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{} procedure tovar(nunu:byte); var tow:byte; label 1; begin case nunu of 7:tow:=10; 8:tow:=14; 9:tow:=18; end; { \ / } for d:=1 to 65 do { O)(O } for e:=1 to 65 do { ДДДД } if pole[d,e]=tow then begin xy:=0;yy:=0; if (d>4) and (d<61) and (e>3) and (e<63) then begin wrpole(d-5,e-4,ch);map(d-5,e-4); goto 1;end; if (d<6) and (e<63) and (e>4) then begin wrpole(0,e-4,ch);map(0,e-4);goto 1;end; if (d>60) and (e<63) and (e>4) then begin wrpole(56,e-4,ch);map(56,e-4);goto 1;end; if (d>5) and (d<61) and (e<5) then begin wrpole(d-5,0,ch);map(d-5,0);goto 1;end; if (d>5) and (d<61) and (e>62) then begin wrpole(d-5,58,ch);map(d-5,58);goto 1;end; if d>60 then xy:=56;if d<6 then xy:=0; if e>62 then yy:=58;if e<5 then yy:=0;wrpole(xy,yy,ch);map(xy,yy); end; 1: (*(*(*(*(*(*((*(*(*(*(*(*(*) (*(*(*(*(*(*((*(*(*(*(*(*(*) end; procedure pir_kin1; begin case color of 7:begin writ(232,163,120,0,red.pir);writ(232,177,120,0,red.kin);end; 8:begin writ(232,163,120,0,blue.pir);writ(232,177,120,0,blue.kin);end; 9:begin writ(232,163,120,0,green.pir);writ(232,177,120,0,green.kin);end;end;end; procedure pir_kin2; begin case color of 7:begin writ(56,159,120,0,red.pir);writ(56,175,120,0,red.kin);end; 8:begin writ(56,159,120,0,blue.pir);writ(56,175,120,0,blue.kin);end; 9:begin writ(56,159,120,0,green.pir);writ(56,175,120,0,green.kin);end;end;end; {----------------------------------------------------------------------------} function zamokk(kox,koy:byte):byte; begin zamokk:=0; if pole[kox,koy]=10 then zamokk:=1; if pole[kox,koy]=11 then zamokk:=2; if pole[kox,koy]=12 then zamokk:=3; if pole[kox,koy]=13 then zamokk:=4; if pole[kox,koy]=14 then zamokk:=5; if pole[kox,koy]=15 then zamokk:=6; if pole[kox,koy]=16 then zamokk:=7; if pole[kox,koy]=17 then zamokk:=8; if pole[kox,koy]=18 then zamokk:=9; if pole[kox,koy]=19 then zamokk:=10; if pole[kox,koy]=20 then zamokk:=11; if pole[kox,koy]=21 then zamokk:=12; end; function tach(kox,koy:byte):byte; begin tach:=0; if pole[kox,koy]=7 then tach:=7; if pole[kox,koy]=39 then tach:=7; if pole[kox,koy]=40 then tach:=7; if pole[kox,koy]=41 then tach:=7; if pole[kox,koy]=8 then tach:=8; if pole[kox,koy]=42 then tach:=8; if pole[kox,koy]=43 then tach:=8; if pole[kox,koy]=44 then tach:=8; if pole[kox,koy]=9 then tach:=9; if pole[kox,koy]=45 then tach:=9; if pole[kox,koy]=46 then tach:=9; if pole[kox,koy]=47 then tach:=9; end; procedure castl(cl:byte); label 11; begin loadpcx('castle.pcx',true); case cl of 7:begin if red.zm[2]=1 then if pri<>2 then begin for a:=0 to 82 do for b:=0 to 36 do if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end; if red.zm[3]=1 then if pri<>3 then begin for a:=0 to 136 do for b:=0 to 78 do if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end; if red.zm[4]=1 then if pri<>4 then begin for a:=0 to 148 do for b:=0 to 105 do if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end; if pri=2 then if red.zm[2]=1 then begin for c:=1 to 2000 do begin a:=random(82);b:=random(36);if barak[a,b]<>0 then begin stro[a,b]:=barak[a,b];putpixel(a+170,b+69,barak[a,b]);delay(1);end;end;end; if pri=3 then if red.zm[3]=1 then begin for c:=1 to 5000 do begin a:=random(136);b:=random(78);if airoport[a,b]<>0 then begin stro[a,b]:=airoport[a,b];putpixel(a+75,b+66,stro[a,b]);delay(1);end;end;end; if pri=4 then if red.zm[4]=1 then begin for c:=1 to 7000 do begin a:=random(148);b:=random(105);if zavod[a,b]<>0 then begin stro[a,b]:=zavod[a,b];putpixel(a+155,b+40,stro[a,b]);delay(1);end;end;end; pri:=0; if red.zm[2]=1 then if pri<>2 then begin for a:=0 to 82 do for b:=0 to 36 do if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end; if red.zm[3]=1 then if pri<>3 then begin for a:=0 to 136 do for b:=0 to 78 do if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end; if red.zm[4]=1 then if pri<>4 then begin for a:=0 to 148 do for b:=0 to 105 do if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end; end; 8:begin if blue.zm[2]=1 then if pri<>2 then begin for a:=0 to 82 do for b:=0 to 36 do if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end; if blue.zm[3]=1 then if pri<>3 then begin for a:=0 to 136 do for b:=0 to 78 do if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end; if blue.zm[4]=1 then if pri<>4 then begin for a:=0 to 148 do for b:=0 to 105 do if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end; if pri=2 then if blue.zm[2]=1 then begin for c:=1 to 2000 do begin a:=random(82);b:=random(36);if barak[a,b]<>0 then begin stro[a,b]:=barak[a,b];putpixel(a+170,b+69,barak[a,b]);delay(1);end;end;end; if pri=3 then if blue.zm[3]=1 then begin for c:=1 to 5000 do begin a:=random(136);b:=random(78);if airoport[a,b]<>0 then begin stro[a,b]:=airoport[a,b];putpixel(a+75,b+66,stro[a,b]);delay(1);end;end;end; if pri=4 then if blue.zm[4]=1 then begin for c:=1 to 7000 do begin a:=random(148);b:=random(105);if zavod[a,b]<>0 then begin stro[a,b]:=zavod[a,b];putpixel(a+155,b+40,stro[a,b]);delay(1);end;end;end; pri:=0; if blue.zm[2]=1 then if pri<>2 then begin for a:=0 to 82 do for b:=0 to 36 do if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end; if blue.zm[3]=1 then if pri<>3 then begin for a:=0 to 136 do for b:=0 to 78 do if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end; if blue.zm[4]=1 then if pri<>4 then begin for a:=0 to 148 do for b:=0 to 105 do if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end; end; 9:begin if green.zm[2]=1 then if pri<>2 then begin for a:=0 to 82 do for b:=0 to 36 do if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end; if green.zm[3]=1 then if pri<>3 then begin for a:=0 to 136 do for b:=0 to 78 do if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end; if green.zm[4]=1 then if pri<>4 then begin for a:=0 to 148 do for b:=0 to 105 do if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end; if pri=2 then if green.zm[2]=1 then begin for c:=1 to 2000 do begin a:=random(82);b:=random(36);if barak[a,b]<>0 then begin stro[a,b]:=barak[a,b];putpixel(a+170,b+69,barak[a,b]);delay(1);end;end;end; if pri=3 then if green.zm[3]=1 then begin for c:=1 to 5000 do begin a:=random(136);b:=random(78);if airoport[a,b]<>0 then begin stro[a,b]:=airoport[a,b];putpixel(a+75,b+66,stro[a,b]);delay(1);end;end;end; if pri=4 then if green.zm[4]=1 then begin for c:=1 to 7000 do begin a:=random(148);b:=random(105);if zavod[a,b]<>0 then begin stro[a,b]:=zavod[a,b];putpixel(a+155,b+40,stro[a,b]);delay(1);end;end;end; pri:=0; if green.zm[2]=1 then if pri<>2 then begin for a:=0 to 82 do for b:=0 to 36 do if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end; if green.zm[3]=1 then if pri<>3 then begin for a:=0 to 136 do for b:=0 to 78 do if airoport[a,b]<>0 then putpixel(a+15,b+66,airoport[a,b]);end; if green.zm[4]=1 then if pri<>4 then begin for a:=0 to 148 do for b:=0 to 105 do if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end; end; end; pri:=0; end; procedure build; var a,b,c,d,e,by,by1:integer; pb,ccl:pointer; label s1,s2,s3; begin loadpcx('buil.pcx',true); for a:=0 to 148 do for b:=0 to 105 do stro[a,b]:=0; e:=imagesize(172,4,185,26);getmem(pb,e);getbitblock(172,4,185,26,pb); e:=imagesize(306,4,319,26);getmem(ccl,e);getbitblock(306,4,319,26,ccl);by:=7; case color of 7:begin if (red.pir>=pstbr)and(red.kin>=kstbr)and(red.zm[2]<>1)then storebitblock(224,106,cl);if (red.pir<pstbr)and (red.kin<kstbr)then storebitblock(224,106,kr);if (red.zm[2]=1)then storebitblock(224,106,gl);end; 8:begin if (blue.pir>=pstbr)and(blue.kin>=kstbr)and(blue.zm[2]<>1)then storebitblock(224,106,cl);if (blue.pir<pstbr)and (blue.kin<kstbr)then storebitblock(224,106,kr);if (blue.zm[2]=1)then storebitblock(224,106,gl);end; 9:begin if (green.pir>=pstbr)and(green.kin>=kstbr)and(green.zm[2]<>1)then storebitblock(224,106,cl);if (green.pir<pstbr)and (green.kin<kstbr)then storebitblock(224,106,kr);if (green.zm[2]=1)then storebitblock(224,106,gl);end; end; storebitblock(172,4,ccl);storebitblock(172,by,pb);writ(128,5,83,0,pstbr);writ(128,22,83,0,kstbr);writ(128,45,83,0,pstai); writ(128,71,83,0,kstai);writ(128,102,83,0,pstzv);writ(128,136,83,0,kstzv); pir_kin2; {---------------------------------ЊҐвЄ -s1:----------------------------------} s1: if not keypressed then goto s1 else begin case readkey of {----------------------Press-Enter-------------------------------------------} #13:begin if by=7 then begin if color=7 then if (red.pir>=pstbr)and(red.kin>=kstbr)and(red.zm[2]<>1) then begin red.zm[2]:=1;pri:=2; red.pir:=red.pir-pstbr;red.kin:=red.kin-kstbr;end else goto s1;if color=8 then if (blue.pir>=pstbr)and(blue.kin>=kstbr)and (blue.zm[2]<>1) then begin blue.zm[2]:=1;pri:=2;blue.pir:=blue.pir-pstbr;blue.kin:=blue.kin-kstbr; end else goto s1;if color=9 then if (green.pir>=pstbr)and(green.kin>=kstbr)and(green.zm[2]<>1) then begin green.zm[2]:=1;pri:=2;green.pir:=green.pir-pstbr; green.kin:=green.kin-kstbr;end else goto s1;bar(0,0,319,199,0);goto s2;end; if by=51 then begin if color=7 then if (red.pir>=pstai)and(red.kin>=kstai)and(red.zm[3]<>1) then begin red.zm[3]:=1; red.pir:=red.pir-pstai;red.kin:=red.kin-kstai;end else goto s1;if color=8 then if (blue.pir>=pstai)and(blue.kin>=kstai)and (blue.zm[3]<>1) then begin blue.zm[3]:=1;blue.pir:=blue.pir-pstai;blue.kin:=blue.kin-kstai;end else goto s1;if color=9 then if (green.pir>=pstai)and(green.kin>=kstai)and(green.zm[3]<>1) then begin green.zm[3]:=1;green.pir:=green.pir-pstai; green.kin:=green.kin-kstai;end else goto s1;bar(0,0,319,199,0);goto s2;end; if by=95 then begin if color=7 then if (red.pir>=pstzv)and(red.kin>=kstzv)and(red.zm[4]<>1) then begin red.zm[4]:=1; red.pir:=red.pir-pstzv;red.kin:=red.kin-kstzv;end else goto s1;if color=8 then if (blue.pir>=pstzv)and(blue.kin>=kstzv)and (blue.zm[4]<>1) then begin blue.zm[4]:=1;blue.pir:=blue.pir-pstzv;blue.kin:=blue.kin-kstzv;end else goto s1;if color=9 then if (green.pir>=pstzv)and(green.kin>=kstzv)and(green.zm[4]<>1) then begin green.zm[4]:=1;green.pir:=green.pir-pstzv; green.kin:=green.kin-kstzv;end else goto s1;bar(0,0,319,199,0);goto s2;end; end; {------------------end-Press-Enter-------------------------------------------} #72:begin if by>7 then begin storebitblock(172,by,ccl);by:=by-44;storebitblock(172,by,pb);end; end; #80:begin if by<95 then begin storebitblock(172,by,ccl);by:=by+44;storebitblock(172,by,pb);end; end; #27:begin bar(0,0,319,199,0);goto s2;end; end; {-------------------------Red-Plaer------------------------------------------} {------------------------------Barak-----------------------------------------} if color=7 then begin if by=7 then if (red.pir>=pstbr)and(red.kin>=kstbr)and(red.zm[2]<>1)then begin storebitblock(224,106,cl);pri:=2;end; if by=7 then if (red.pir<pstbr)or(red.kin<kstbr)then storebitblock(224,106,kr); if by=7 then if (red.zm[2]=1)then storebitblock(224,106,gl); {----------------------------Airoport----------------------------------------} if by=51 then if (red.pir>=pstai)and(red.kin>=kstai)and(red.zm[3]<>1)then begin storebitblock(224,106,cl);pri:=3;end; if by=51 then if (red.pir<pstai)or(red.kin<kstai)then storebitblock(224,106,kr); if by=51 then if (red.zm[3]=1)then storebitblock(224,106,gl); {----------------------------Zavod-------------------------------------------} if by=95 then if (red.pir>=pstzv)and(red.kin>=kstzv)and(red.zm[4]<>1)then begin storebitblock(224,106,cl);pri:=4;end; if by=95 then if (red.pir<pstzv)or(red.kin<kstzv)then storebitblock(224,106,kr); if by=95 then if (red.zm[4]=1)then storebitblock(224,106,gl); end; {----------------------------------------------------------------------------} {---------------------------Blue-Plaer---------------------------------------} {------------------------------Barak-----------------------------------------} if color=8 then begin if by=7 then if (blue.pir>=pstbr)and(blue.kin>=kstbr)and(blue.zm[2]<>1)then begin storebitblock(224,106,cl);pri:=2;end; if by=7 then if (blue.pir<pstbr)or(blue.kin<kstbr)then storebitblock(224,106,kr); if by=7 then if (blue.zm[2]=1)then storebitblock(224,106,gl); {----------------------------Airoport----------------------------------------} if by=51 then if (blue.pir>=pstai)and(blue.kin>=kstai)and(blue.zm[3]<>1)then begin storebitblock(224,106,cl);pri:=3;end; if by=51 then if (blue.pir<pstai)or(blue.kin<kstai)then storebitblock(224,106,kr); if by=51 then if (blue.zm[3]=1)then storebitblock(224,106,gl); {----------------------------Zavod-------------------------------------------} if by=95 then if (blue.pir>=pstzv)and(blue.kin>=kstzv)and(blue.zm[4]<>1)then begin storebitblock(224,106,cl);pri:=4;end; if by=95 then if (blue.pir<pstzv)or(blue.kin<kstzv)then storebitblock(224,106,kr); if by=95 then if (blue.zm[4]=1)then storebitblock(224,106,gl); end; {----------------------------------------------------------------------------} {--------------------------Green-Plaer---------------------------------------} {------------------------------Barak-----------------------------------------} if color=9 then begin if by=7 then if (green.pir>=pstbr)and(green.kin>=kstbr)and(green.zm[2]<>1)then begin storebitblock(224,106,cl);pri:=2;end; if by=7 then if (green.pir<pstbr)or(green.kin<kstbr)then storebitblock(224,106,kr); if by=7 then if (green.zm[2]=1)then storebitblock(224,106,gl); {----------------------------Airoport----------------------------------------} if by=51 then if (green.pir>=pstai)and(green.kin>=kstai)and(green.zm[3]<>1)then begin storebitblock(224,106,cl);pri:=3;end; if by=51 then if (green.pir<pstai)or(green.kin<kstai)then storebitblock(224,106,kr); if by=51 then if (green.zm[3]=1)then storebitblock(224,106,gl); {----------------------------Zavod-------------------------------------------} if by=95 then if (green.pir>=pstzv)and(green.kin>=kstzv)and(green.zm[4]<>1)then begin storebitblock(224,106,cl);pri:=4;end; if by=95 then if (green.pir<pstzv)or(green.kin<kstzv)then storebitblock(224,106,kr); if by=95 then if (green.zm[4]=1)then storebitblock(224,106,gl); end; {----------------------------------------------------------------------------} end; goto s1; {---------------Џ®¬«Ґ¤ЁҐ-ў®§ўа 饨Ґ- -¬ҐвЄг-s1:---------------------------} s2: end; procedure buy_mahina; label 1; var kiki,pipi:integer; xbt,ybt,tow:byte; begin case color of 7:begin red.pir:=red.pir+(red.shp*random(120)); red.kin:=red.kin+(red.shk*random(50)); writ(258,37,120,3,red.pir); writ(258,60,120,3,red.kin);end; 8:begin blue.pir:=blue.pir+(blue.shp*random(120)); blue.kin:=blue.kin+(blue.shk*random(50)); writ(258,37,120,3,blue.pir); writ(258,60,120,3,blue.kin);end; 9:begin green.pir:=green.pir+(green.shp*random(120)); green.kin:=green.kin+(green.shk*random(50)); writ(258,37,120,3,green.pir); writ(258,60,120,3,green.kin);end; end; kiki:=0;pipi:=0; tovar(color); okno5('•®зҐим ЄгЇЁвм ®ўго в зЄг','§ 3000ЇЁа. Ё 1000ЄЁ. ?','¤ -enter','','',2,253); if readkey=#13 then begin antiokno5; case color of 7:begin kiki:=red.kin;pipi:=red.pir;end; 8:begin kiki:=blue.kin;pipi:=blue.pir;end; 9:begin kiki:=green.kin;pipi:=green.pir;end;end; if (kiki<1000) or (pipi<3000) then begin okno5('Њ «®ў в® аҐбгаб®ў','г вҐЎп ¤«п','в Є®© ¬ еЁл.','','',2,232); readkey;antiokno5;goto 1;end; case color of 7:begin dec(red.kin,1000);dec(red.pir,3000);end; 8:begin dec(blue.kin,1000);dec(blue.pir,3000);end; 9:begin dec(green.kin,1000);dec(green.pir,3000);end; end; live:=true; case color of 7:tow:=10; 8:tow:=14; 9:tow:=18; end; for a:=1 to 65 do for b:=1 to 65 do if pole[a,b]=tow then begin check:=pole[a+1,b+2]; pole[a+1,b+2]:=color; power:=0; zas:=0; know:=0; spower:=0; case color of 7:begin writ(258,37,120,3,red.pir); writ(258,60,120,3,red.kin);end; 8:begin writ(258,37,120,3,blue.pir); writ(258,60,120,3,blue.kin);end; 9:begin writ(258,37,120,3,green.pir); writ(258,60,120,3,green.kin);end; end; end; end else antiokno5; 1:end; {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@} {} {} procedure Voina(ccc1,ccc2:byte;zam1,zam2:boolean); {THAT's ...WAR...} var ara,popa:array[1..9,1..5] of byte; {SECRET WEAPONS} trm,zmr,zl:array[1..9,1..5] of integer; ratt:array[1..9,1..5] of integer; mo:string[6]; xto,yto,cvx,cvy,l11,l22,ho,this,lok:integer; ppow,zass,spow,lift,blin:longint; sha,mode_comp:boolean; ku,hor:byte; boom:array[1..5,1..34,1..34] of byte; oli,la2:longint; sus:string; label 1,2,3,10,20,123,11,22,f1,f2,f3,a1,a2,a3,a4,a5,a6,a7,a8; function whoisit(cvet,lele,lor:byte):byte; var lkj:byte; begin if lor=1 then lor:=0 else lor:=1; case lele of 1:whoisit:=1+5*lor; {tu -tu} 2:whoisit:=2+5*lor; {tu -tu} 3:case cvet of {tu -tu} 7:whoisit:=3+5*lor; {tu -tu} 8:whoisit:=5+5*lor; {tu -tu} 9:whoisit:=4+5*lor; {tu -tu} end; {tu -tu} 4:whoisit:=11+5*lor; {tu -tu} 5:whoisit:=12+5*lor; {tu -tu} 6:case cvet of {tu -tu} 7:whoisit:=25+5*lor; {tu -tu} 8:whoisit:=13+5*lor; {tu -tu} 9:whoisit:=15+5*lor; {tu -tu} end; {tu -tu} 7:whoisit:=21+5*lor; {tu -tu} 8:whoisit:=24+5*lor; {tu -tu} 9:case cvet of 7:whoisit:=23+5*lor; {tu -tu} 8:whoisit:=22+5*lor; 9:whoisit:=14+5*lor; {tu -tu} end; end; {lor: 0 or 1} end; procedure wrata; begin for a:=0 to 8 do for b:=0 to 4 do begin storebitblock(a*32+1+16,b*32+1+10,p[popa[a+1,b+1]]); if popa[a+1,b+1]<78 then begin str(ratt[a+1,b+1],mo); writestr(a*32+1+16,b*32+1+10,224,0,mo); end; end; end; function levo(oler:byte) :boolean; begin levo:=false; if ((oler>5) and (oler<11)) or ((oler>15) and (oler<21)) or ((oler>25) and (oler<31)) then levo:=true; end; function pravo(oker:byte) :boolean; begin pravo:=false; if (oker<6) or ((oker>10) and (oker<16)) or ((oker>20) and (oker<26)) then pravo:=true; end; function hyper :byte; var y1,y2:boolean; label 1,2; begin hyper:=0; y1:=false;y2:=y1; for a:=1 to 9 do for b:=1 to 9 do if levo(popa[a,b]-47)=true then begin y1:=true;goto 1;end; 1: for a:=1 to 9 do for b:=1 to 9 do if pravo(popa[a,b]-47)=true then begin y2:=true;goto 2;end; 2: if y1=false then hyper:=1; if y2=false then hyper:=2; end; procedure findnow(lok:byte); label 1; begin if hyper=0 then for c:=1 to 9 do for d:=1 to 5 do if popa[c,d]=lok then begin xto:=c;yto:=d;goto 1;end; 1: end; procedure I_am_the_soldier(xc,wer,moon:integer); begin ppow:=0;zass:=0;lift:=0;spow:=0; case xc of 7:case wer of 1:begin ppow:=power[xc]+2;spow:=0;zass:=zas[xc]+1;lift:=8;end; 2:begin ppow:=power[xc]+3;spow:=0;zass:=zas[xc]+3;lift:=10;end; 3:begin ppow:=power[xc]+4;spow:=5;zass:=zas[xc]+3;lift:=15;end; 4:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+8;lift:=50;end; 5:begin ppow:=power[xc]+8;spow:=10;zass:=zas[xc]+6;lift:=40;end; 6:begin ppow:=power[xc]+10;spow:=13;zass:=zas[xc]+11;lift:=75;end; 7:begin ppow:=power[xc]+5;spow:=7;zass:=zas[xc]+3;lift:=25;end; 8:begin ppow:=power[xc]+6;spow:=8;zass:=zas[xc]+3;lift:=31;end; 9:begin ppow:=power[xc]+9;spow:=12;zass:=zas[xc]+9;lift:=50;end; end; 8:case wer of 1:begin ppow:=power[xc]+2;spow:=0;zass:=zas[xc]+1;lift:=8;end; 2:begin ppow:=power[xc]+3;spow:=0;zass:=zas[xc]+3;lift:=10;end; 3:begin ppow:=power[xc]+4;spow:=3;zass:=zas[xc]+4;lift:=18;end; 4:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+8;lift:=50;end; 5:begin ppow:=power[xc]+8;spow:=10;zass:=zas[xc]+6;lift:=40;end; 6:begin ppow:=power[xc]+8;spow:=13;zass:=zas[xc]+15;lift:=60;end; 7:begin ppow:=power[xc]+5;spow:=7;zass:=zas[xc]+3;lift:=25;end; 8:begin ppow:=power[xc]+6;spow:=8;zass:=zas[xc]+3;lift:=31;end; 9:begin ppow:=power[xc]+11;spow:=10;zass:=zas[xc]+10;lift:=45;end; end; 9:case wer of 1:begin ppow:=power[xc]+2;spow:=0;zass:=zas[xc]+1;lift:=9;end; 2:begin ppow:=power[xc]+3;spow:=0;zass:=zas[xc]+3;lift:=10;end; 3:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+5;lift:=22;end; 4:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+8;lift:=50;end; 5:begin ppow:=power[xc]+8;spow:=10;zass:=zas[xc]+6;lift:=40;end; 6:begin ppow:=power[xc]+9;spow:=15;zass:=zas[xc]+10;lift:=75;end; 7:begin ppow:=power[xc]+5;spow:=7;zass:=zas[xc]+3;lift:=25;end; 8:begin ppow:=power[xc]+6;spow:=8;zass:=zas[xc]+3;lift:=31;end; 9:begin ppow:=power[xc]+10;spow:=13;zass:=zas[xc]+12;lift:=50;end; end; end; ppow:=ppow*moon;spow:=spow*moon;zass:=zass*moon;end; function woda(axd,zvz:byte):byte; label 1,2; var aar,mnb,boon:byte; begin if hyper=0 then begin if axd=9 then mnb:=0 else mnb:=axd; 2:for aar:=(mnb+1) to 9 do if wt[zvz,aar]<>0 then begin woda:=aar;goto 1;end; mnb:=0; goto 2; 1: {if zvz=ccc1 then boon:=ccc2 else boon:=ccc1; if wt[boon,aar]=0 then goto 2; }end; end; procedure semena; label 1; begin if ku<>65 then if ku<>110 then ku:=110; if ku<>65 then begin l11:=woda(l11,ccc1); findnow(whoisit(ccc2,l22,1)+47);ku:=65;goto 1;end; l22:=woda(l22,ccc2); findnow(whoisit(ccc1,l11,0)+47);ku:=110; 1:end; procedure morgg1(x,y,cvb:byte); begin line((x-1)*30+142-x+1,(y-1)*30+53-y+1,(x)*30+142-x,(y-1)*30+53-y+1,cvb); line((x-1)*30+142-x+1,(y)*30+53-y,(x)*30+142-x,(y)*30+53-y,cvb); if y=1 then line((x-1)*30+142-x+1,(y-1)*30+53,(x-1)*30+142-x+1,(y)*30+53-y,cvb) else line((x-1)*30+142-x+1,(y-1)*30+53-1,(x-1)*30+142-x+1,(y)*30+53-y,cvb); if y=1 then line((x)*30+142-x,(y-1)*30+53,(x)*30+142-x,(y)*30+53-y,cvb) else line((x)*30+142-x,(y-1)*30+53-1,(x)*30+142-x,(y)*30+53-y,cvb) end; procedure morgg(x,y:byte); begin line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x)*32+1+16,(y-1)*32+1+10-1,3); line((x-1)*32+1+16-1,(y)*32+1+10,(x)*32+1+16,(y)*32+1+10,3); line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x-1)*32+1+16-1,(y)*32+1+10,3); line((x)*32+1+16,(y-1)*32+1+10-1,(x)*32+1+16,(y)*32+1+10,3);end; procedure amorgg(x,y:byte); begin line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x)*32+1+16,(y-1)*32+1+10-1,0); line((x-1)*32+1+16-1,(y)*32+1+10,(x)*32+1+16,(y)*32+1+10,0); line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x-1)*32+1+16-1,(y)*32+1+10,0); line((x)*32+1+16,(y-1)*32+1+10-1,(x)*32+1+16,(y)*32+1+10,0);end; procedure booom(ex,yx:byte); begin for a:=1 to 5 do begin for b:=2 to 32 do for c:=2 to 29 do if boom[a,b,c]<>0 then putpixel((ex-1)*32+1+16+b-2,(yx-1)*32+1+10+c-2,boom[a,b,c]); delay(50); storebitblock((ex-1)*32+1+16,(yx-1)*32+1+10,p[popa[ex,yx]]); end; morgg(xto,yto); str(ratt[ex,yx],mo); if ratt[ex,yx]<>0 then writestr((ex-1)*32+1+16,(yx-1)*32+1+10,224,0,mo); end; procedure kahod(coc,los:byte); begin if (los=1) or (los=2) then ho:=2; if los=4 then ho:=6; if los=5 then ho:=5; if (los=7) or (los=8) then ho:=1; case coc of 7:case los of 3:ho:=2; 6:ho:=5; 9:ho:=2; end; 8:case los of 3:ho:=4; 6:ho:=4; 9:ho:=2; end; 9:case los of 3:ho:=3; 6:ho:=5; 9:ho:=2; end;end;end; function ono(xr,yr:byte) :boolean; var q1,q2,q3:byte; lif1,lif2,la3:longint; label 1,2,756; begin oli:=0; ono:=false; zass:=0;ppow:=0;spow:=0;lift:=0; if popa[xr,yr]<>78 then ono:=true; if ((levo(popa[xto,yto]-47)=true) and (pravo(popa[xr,yr]-47)=true)) or ((pravo(popa[xto,yto]-47)=true) and (levo(popa[xr,yr]-47)=true)) then begin if pravo(popa[xr,yr]-47)=true then begin q1:=ccc1;q2:=0;end else begin q1:=ccc2;q2:=1;end; for a:=1 to 9 do if popa[xto,yto]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xto,yto]); la3:=lift; lif1:=lift*ratt[xto,yto]; lif1:=lif1-la3+ara[xto,yto]; oli:=ppow; if pravo(popa[xr,yr]-47)=true then begin q1:=ccc2;q2:=1;end else begin q1:=ccc1;q2:=0;end; for a:=1 to 9 do if popa[xr,yr]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xr,yr]); la2:=lift; lif2:=lift*ratt[xr,yr]; lif2:=lif2-la2+ara[xr,yr]; {OOOPPSSa-a-a-a-a-a--a-a-a-a-a-----------a-a-a-aaaaaaaaa-a-a-a--a-a !} lif2:=lif2-oli; if lif2 mod la2=0 then ara[xr,yr]:=la2 else ara[xr,yr]:=lif2 mod la2; ratt[xr,yr]:=lif2 div la2; if lif2 mod la2>0 then inc(ratt[xr,yr]); if (lif2<=0) or (ratt[xr,yr]<=0) then begin if levo(popa[xr,yr]-47)=true then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0; popa[xr,yr]:=78;ratt[xr,yr]:=0;ara[xr,yr]:=0;end; booom(xr,yr); {NA TEBE PO LBU !} if popa[xr,yr]<>78 then begin lif1:=lif1-zass; if lif1 mod la3=0 then ara[xto,yto]:=la3 else ara[xto,yto]:=lif1 mod la3; ratt[xto,yto]:=lif1 div la3; if lif1 mod la3>0 then inc(ratt[xto,yto]); if (lif1<=0) or (ratt[xto,yto]<=0) then begin if levo(popa[xr,yr]-47)=false then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0; popa[xto,yto]:=78;ratt[xto,yto]:=0;ara[xto,yto]:=0; end; booom(xto,yto); if ratt[xto,yto]=0 then begin writ(104,175,0,0,ho); this:=popa[xto,yto]; amorgg(xto,yto); 1: semena; if popa[xto,yto]=this then goto 1; wrata;morgg(xto,yto); 2:if levo(popa[xto,yto]-47)=true then kahod(ccc1,l11) else kahod(ccc2,l22); if ho=0 then goto 2; writ(104,175,3,0,ho); end; end; ho:=0; writ(104,175,3,0,ho); end; end; function energy(cvb,urv:byte): integer; begin energy:=0; if (urv=1) or (urv=2) then energy:=10; if urv=4 then energy:=25; if urv=5 then energy:=20; if urv=7 then energy:=15; if urv=8 then energy:=20; case cvb of 7:case urv of 3:energy:=13; 6:energy:=28; 9:energy:=25; end; 8:case urv of 3:energy:=12; 6:energy:=28; 9:energy:=26; end; 9:case urv of 3:energy:=13; 6:energy:=30; 9:energy:=30; end;end;end; {SHOT THIS PEARE !} procedure shot(xr,yr:byte); var q1,q2,q3:byte; lif1,lif2,la3:longint; label 1,2; begin oli:=0; zass:=0;ppow:=0;spow:=0;lift:=0; begin if pravo(popa[xr,yr]-47)=true then begin q1:=ccc1;q2:=0;end else begin q1:=ccc2;q2:=1;end; for a:=1 to 9 do if popa[xto,yto]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xto,yto]); la3:=lift; lif1:=lift*ratt[xto,yto]; lif1:=lif1-la3+ara[xto,yto]; oli:=spow; if pravo(popa[xr,yr]-47)=true then begin q1:=ccc2;q2:=1;end else begin q1:=ccc1;q2:=0;end; for a:=1 to 9 do if popa[xr,yr]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xr,yr]); la2:=lift; lif2:=lift*ratt[xr,yr]; lif2:=lif2-la2+ara[xr,yr]; {OOOPPSSa-a-a-a-a-a--a-a-a-a-a-----------a-a-a-aaaaaaaaa-a-a-a--a-a !} lif2:=lif2-oli; if lif2 mod la2=0 then ara[xr,yr]:=la2 else ara[xr,yr]:=lif2 mod la2; ratt[xr,yr]:=lif2 div la2; if lif2 mod la2>0 then inc(ratt[xr,yr]); if (lif2<=0) or (ratt[xr,yr]<=0) then begin if levo(popa[xr,yr]-47)=true then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0; popa[xr,yr]:=78;ratt[xr,yr]:=0;ara[xr,yr]:=0;end; booom(xr,yr); {NA TEBE PO LBU !} ho:=0; writ(104,175,3,0,ho); end; end; {THAT's for super weapon} procedure udar(xr,yr,ppw:byte); var q1,q2,q3:byte; lif1,lif2,la3:longint; label 1,2; begin oli:=0; zass:=0;ppow:=0;spow:=0;lift:=0; begin if pravo(popa[xr,yr]-47)=true then begin q1:=ccc1;q2:=0;end else begin q1:=ccc2;q2:=1;end; oli:=ppw; if pravo(popa[xr,yr]-47)=true then begin q1:=ccc2;q2:=1;end else begin q1:=ccc1;q2:=0;end; for a:=1 to 9 do if popa[xr,yr]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xr,yr]); la2:=lift; lif2:=lift*ratt[xr,yr]; lif2:=lif2-la2+ara[xr,yr]; {OOOPPSSa-a-a-a-a-a--a-a-a-a-a-----------a-a-a-aaaaaaaaa-a-a-a--a-a !} lif2:=lif2-oli; if lif2 mod la2=0 then ara[xr,yr]:=la2 else ara[xr,yr]:=lif2 mod la2; ratt[xr,yr]:=lif2 div la2; if lif2 mod la2>0 then inc(ratt[xr,yr]); if (lif2<=0) or (ratt[xr,yr]<=0) then begin if levo(popa[xr,yr]-47)=true then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0; popa[xr,yr]:=78;ratt[xr,yr]:=0;ara[xr,yr]:=0;end; {NA TEBE PO LBU !} end; end; function nearother:boolean; var kjh:boolean; begin nearother:=false; if levo(popa[xto,yto])=true then kjh:=false; if pravo(popa[xto,yto])=true then kjh:=true; if xto<>1 then if popa[xto-1,yto]<78 then if levo(popa[xto-1,yto]-47)=kjh then nearother:=true; if xto<>9 then if popa[xto+1,yto]<78 then if levo(popa[xto+1,yto]-47)=kjh then nearother:=true; if yto<>1 then if popa[xto,yto-1]<78 then if levo(popa[xto,yto-1]-47)=kjh then nearother:=true; if yto<>5 then if popa[xto,yto+1]<78 then if levo(popa[xto,yto+1]-47)=kjh then nearother:=true; if yto<>1 then if xto<>1 then if popa[xto-1,yto-1]<78 then if levo(popa[xto-1,yto-1]-47)=kjh then nearother:=true; if yto<>1 then if xto<>9 then if popa[xto+1,yto-1]<78 then if levo(popa[xto+1,yto-1]-47)=kjh then nearother:=true; if yto<>5 then if xto<>1 then if popa[xto-1,yto+1]<78 then if levo(popa[xto-1,yto+1]-47)=kjh then nearother:=true; if yto<>5 then if xto<>9 then if popa[xto+1,yto+1]<78 then if levo(popa[xto+1,yto+1]-47)=kjh then nearother:=true; end; function weapon(xw,yw:byte):byte; begin if (xw=1) and (yw=1) then weapon:=1; if (xw=2) and (yw=1) then weapon:=2; if (xw=3) and (yw=1) then weapon:=3; if (xw=4) and (yw=1) then weapon:=5; if (xw=1) and (yw=2) then weapon:=4; if (xw=2) and (yw=2) then weapon:=6; if (xw=3) and (yw=2) then weapon:=7; if (xw=4) and (yw=2) then weapon:=8; if (xw=1) and (yw=3) then weapon:=9; if (xw=2) and (yw=3) then weapon:=10; if (xw=3) and (yw=3) then weapon:=11; if (xw=4) and (yw=3) then weapon:=12; if (xw=1) and (yw=4) Жалоба
Опубликовано 4 марта, 200620 г. comment_1962227 Причём это обрезанный кусок полного исходника. Жалоба
Опубликовано 4 марта, 200620 г. comment_1962286 Только не говорите, что это винда https://academ.club/html/emoticons/laugh.gif Жалоба
Опубликовано 4 марта, 200620 г. comment_1962385 это бред https://academ.club/html/emoticons/dry.gif Жалоба
Опубликовано 4 марта, 200620 г. comment_1962593 QUOTE (_123_ @ Mar 4 2006, 20:45) это бред https://academ.club/html/emoticons/dry.gif Моё мнение:аналагично Жалоба
Опубликовано 4 марта, 200620 г. comment_1962606 паскаль одназначна https://academ.club/html/emoticons/laugh.gif Жалоба
Опубликовано 4 марта, 200620 г. comment_1963133 это Костик запостил . человек хороший , но не подумал =) Жалоба
Опубликовано 4 марта, 200620 г. comment_1963141 Неполный кусок какой-то проги на паскале. Ответ, скорее всего, что-нибудь вроде "Квейк на паскале" Жалоба
Опубликовано 4 марта, 200620 г. comment_1963189 QUOTE (Shryke @ Mar 4 2006, 22:45) Неполный кусок какой-то проги на паскале. Ответ, скорее всего, что-нибудь вроде "Квейк на паскале" С нетерпением ждем готового результата https://academ.club/html/emoticons/grin.gif Жалоба
Опубликовано 5 марта, 200620 г. comment_1964104 QUOTE (Bestia @ Mar 4 2006, 21:16) QUOTE (_123_ @ Mar 4 2006, 20:45) это бред https://academ.club/html/emoticons/dry.gif Моё мнение:аналагично И моё. Жалоба
Опубликовано 5 марта, 200620 г. Автор comment_1964892 мда, не влез почему-то, я вроде весь текст копировал- а тема это такая- типа беспонтовиньких самописных херОв - писал лет 6 назад- с удивлением вчера нашел Жалоба
Опубликовано 5 марта, 200620 г. comment_1966016 Это какая-то игра, или её часть на паскале, т.к. там присутствуйт Грин/рэд/блу плэер https://academ.club/html/emoticons/cbs_zz.gif Жалоба
https://academ.club/html/emoticons/biggrin.gif {$A+,B-,D+,E+,F-,G-,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+,Y+}
{$M 16384,0,655360}
uses crt,all256 ;
const ch=47;cc=15;
type har=record
hhod:byte;
zm:array[1..4] of byte;
shp:byte;
shk:byte;
pir:integer;
kin:integer;
end;
var cf,pri,xy,yy,by,by1,pb,ccl,hod,nap,port,a,b,pm,c,d,do1,do2,do3,do4,do5,do6:integer;
human,live,town:array[6..10] of boolean;
check,ly,lx:array[7..9] of byte;
shx,shy:array[7..9,0..100]of byte;
magic:array[7..9,1..25] of boolean;
len,xmm,ymm,e,x,y,pn,color,xtt,ytt,pstbr,pstai,pstzv,kstbr,kstai,kstzv:integer;
hasme,day,ned,mes,god:integer;
da,ne,me,go:string[4];
{THAT's WAR}
wt,wz,wn,per1,per2:array[7..9,1..9]of integer;
{KINSAMVAN}
f:file of byte;
pole:array[1..65,1..65]of byte;
p:array[1..79] of ^pointer;
p1,kr,gl,cl:^pointer;
point:^pointer;
were,w:word;
cur:boolean;
boat,polpit:array[7..9] of boolean;
dpi,dki:array[7..9] of integer;
zas,spower,power,know:array[7..9] of byte;
ener,pitan:array[7..9] of integer;
cccc:char;
red,blue,green:har;
stro:array[0..148,0..105] of byte;
airoport:array[0..136,0..78] of byte;
barak:array[0..82,0..36] of byte;
zavod:array[0..148,0..105] of byte;
var poi:pointer;
as1,xmd,ymd,but,xm,ym,xb,yb,xb1,yb1,lon,wer,ab,bb,bc,bd:integer;
co,cc1,coc,dv,no,con:integer;
label 1,2,3,4,st,hm,z1,z2,z3,prod1,prod2,nee,law;
procedure ylin(yyy,mlk:integer);
begin
line(100,yyy,220,yyy,mlk);
end;
function menu :byte;
var viy:integer;
label 1;
begin
viy:=1;
menu:=0;
initvga256;
loadpcx('menu.pcx',true);
ylin(60+viy*30,11);
ylin(85+viy*30,11);
repeat
case readkey of
#27:begin closevga256;halt;end;
#80:if viy<>3 then begin ylin(85+viy*30,0);ylin(60+viy*30,0);viy:=viy+1;ylin(85+viy*30,11);ylin(60+viy*30,11);end;
#72:if viy<>1 then begin ylin(85+viy*30,0);ylin(60+viy*30,0);viy:=viy-1;ylin(85+viy*30,11);ylin(60+viy*30,11);end;
#13:begin
if viy=3 then begin closevga256;halt;end else begin menu:=1;goto 1;end;
end;
end
until viy=100;
1:
end;
procedure antiokno5;begin storebitblock(xb,yb,poi);release(poi);end;
procedure okno5(sb1,sb2,sb3,sb4,sb5:string;fon,col:byte);
begin lon:=0;co:=5;cc1:=0;if length(sb1)>0 then cc1:=cc1+1;if length(sb2)>0 then cc1:=cc1+1;if length(sb3)>0 then cc1:=cc1+1;
if length(sb4)>0 then cc1:=cc1+1;if length(sb5)>0 then cc1:=cc1+1;if length(sb1)>lon then lon:=length(sb1);if length(sb2)>lon
then lon:=length(sb2);if length(sb3)>lon then lon:=length(sb3);if length(sb4)>lon then lon:=length(sb4);if length(sb5)>lon
then lon:=length(sb5);if length(sb1)=0 then co:=co-1;if length(sb2)=0 then co:=co-1;if length(sb3)=0 then co:=co-1;if
length(sb4)=0 then co:=co-1;if length(sb5)=0 then co:=co-1;xb:=((319-lon*8) div 2)-2;xb1:=((319-lon*8) div 2)+lon*8;yb:=74;
yb1:=126;wer:=imagesize(xb,yb,xb1,yb1);getmem(poi,wer);getbitblock(xb,yb,xb1,yb1,poi);coc:=6-cc1;if co=0 then co:=2;if co=1
then co:=2;no:=-1;dv:=50 div co;bar(xb,yb,xb1,yb1,fon);line(xb,yb,xb,yb1,col);line(xb,yb1,xb1,yb1,col);
line(xb1,yb1,xb1,yb,col);line(xb1,yb,xb,yb,col);if length(sb1)<>0 then begin no:=no+1;writestr(((319-length(sb1)*8) div 2),
round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb1);end;if length(sb2)<>0 then begin no:=no+1;writestr(((319-length(sb2)
*8)div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb2);end;if length(sb3)<>0 then begin no:=no+1;writestr(((319-
length(sb3)*8) div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb3);end;if length(sb4)<>0 then begin no:=no+1;
writestr(((319-length(sb4)*8) div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb4);end;if length(sb5)<>0 then
begin no:=no+1;writestr(((319-length(sb5)*8) div 2),round(dv/cc1+coc+yb+2+dv*no-coc*1.5+cc1-co*1.1),col,0,sb5);end;end;
procedure buy(col:integer);
var qp,q1p:pointer;
procedure zd;
begin
loadpcx('buy.pcx',true);
okno5('ќв® ¬Ґо Ї®§ў®«пҐв бЄгЇ вм','вҐеЁЄг, 室пйгобп ў','п祩Є е Їа®вЁў бв५ЄЁ.',
'‚ Ё¦Ёе п祩Є е 室Ёвбп','㦥 бЄгЇ«Ґ п вҐеЁЄ .',217,188);readkey;antiokno5;
readkey;
bar(0,0,320,200,0);
end;
begin
zd;
loadpcx('buypis.pcx',true);okno5('ќв® ¬Ґо Ї®§ў®«пҐв бЄгЇ вм','вҐеЁЄг, 室пйгобп ў','п祩Є е Їа®вЁў бв५ЄЁ.',
'‚ Ё¦Ёе п祩Є е 室Ёвбп','㦥 бЄгЇ«Ґ п вҐеЁЄ .',2,43);readkey;antiokno5;
bar(0,0,320,200,0);
end;
function cantmovmon(ve,ho,al,al1:byte) :boolean;
var nomm:byte;
begin
nomm:=0;
cantmovmon:=false;
if (pole[ve-1,ho]<>al) and (pole[ve-1,ho]<>al1)then nomm:=nomm+1;
if (pole[ve+1,ho]<>al) and (pole[ve+1,ho]<>al1)then nomm:=nomm+1;
if (pole[ve,ho-1]<>al) and (pole[ve,ho-1]<>al1)then nomm:=nomm+1;
if (pole[ve,ho+1]<>al) and (pole[ve,ho+1]<>al1)then nomm:=nomm+1;
if nomm=4 then cantmovmon:=true;
end;
procedure movemon(xtx,yty,num:byte);
var ran,na,nn,nn1:byte;
label 1,2;
begin
if (num=27) or (num=28) then begin nn:=1;nn1:=2;end;
if num=30 then begin nn1:=6;nn:=6;end;
if num=31 then begin nn1:=3;nn:=3;end;
1:
if cantmovmon(xtx,yty,nn,nn1)=true then goto 2;
na:=1+random(4);
case na of
1:if (pole[xtx-1,yty]<>nn) and (pole[xtx-1,yty]<>nn1) then goto 1;
3:if (pole[xtx+1,yty]<>nn) and (pole[xtx+1,yty]<>nn1) then goto 1;
2:if (pole[xtx,yty-1]<>nn) and (pole[xtx,yty-1]<>nn1) then goto 1;
4:if (pole[xtx,yty+1]<>nn) and (pole[xtx,yty+1]<>nn1) then goto 1;
end;
pole[xtx,yty]:=nn;
case na of
1:pole[xtx-1,yty]:=num;
3:pole[xtx+1,yty]:=num;
2:pole[xtx,yty-1]:=num;
4:pole[xtx,yty+1]:=num;
end;
2:end;
procedure antiokno;
begin
storebitblock(155-len*10 div 2,85,point);
release(point);
end;
procedure okno(s1,s2,s3:string; fon,col:byte);
begin
len:=0;
if length(s1)>len then len:=length(s1);
if length(s2)>len then len:=length(s2);
if length(s3)>len then len:=length(s3);
were:=imagesize(155-len*10 div 2,85,150+len*10 div 2+3,135);
getmem(point,were);
getbitblock(155-len*10 div 2,85,150+len*10 div 2+3,135,point);
bar(155-len*10 div 2,85,150+len*10 div 2+3,135,fon);
line(155-len*10 div 2,85,150+len*10 div 2+3,85,col);
line(155-len*10 div 2,135,150+len*10 div 2+3,135,col);
line(155-len*10 div 2,85,155-len*10 div 2,135,col);
line(150+len*10 div 2+3,85,150+len*10 div 2+3,135,col);
writestr(160-length(s1)*10 div 2+10,97,col,0,s1);
writestr(160-length(s2)*10 div 2+10,110,col,0,s2);
writestr(160-length(s3)*10 div 2+10,123,col,0,s3);
end;
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
procedure death_man;
var sus:string;
begin
sus:='';
if live[7]=false then if town[7]=false then sus:='ѓг¤®«мЈЁ©бЄЁ© Ї ⥮ !';
if live[8]=false then if town[8]=false then sus:='’гаЁдЁЄ бЄЁ© Ї ⥮ !';
if live[9]=false then if town[9]=false then sus:='Џ ⥮ зҐале вЁа ®ў !';
if sus<>'' then begin
okno5('...‘…Ќ‘Ђ–?џ...','‚묥а',sus,'','',7,232);readkey;antiokno5;
end;
end;
procedure givmagic(maks,ix,iy:byte);
var dg,nowe:integer;
as1,as2:string[70];
tru:array[1..65,1..65,7..9] of boolean;
label 1,2;
begin
if (cf=0) or ((day=1)and(ned>1)) then
for c:=7 to 9 do
for a:=1 to 65 do
for b:=1 to 65 do
begin
tru[a,b,c]:=false;
end;
2:
cf:=3;
if color<9 then if tru[ix,iy,9]=true then
begin
okno5('?®Ї« ҐвпҐ «Ґ¦Ёв',' Ї®«г Ё г ҐЈ® Ґ','ᢥвЁвбп ЇбҐў¤®Ј« §.','','',2,232);
readkey;antiokno5;goto 1;
end;
if color=9 then if tru[ix,iy,9]=true then
begin
okno5('‚ Їа®и«л© а § ўл аҐиЁ«Ё,','зв® ЇаЁиҐ«мж Ґ бв®Ёв','®бв ў«пвм ў ¦Ёўле...','','',2,232);
readkey;antiokno5;goto 1;
end;
if tru[ix,iy,color]=true then begin
case color of
7:okno5('‚л §¤Ґбм 㦥 Ўл«Ё','Ё Ї®¤г¬ «Ё,зв® Ґ бв®Ёв',
'«ЁиЁ© а § § 室Ёвм бо¤ .','','',2,232);
8:okno5('Љ®Ј¤ ўл § и«Ё ¤®¬ЁЄ,','Ё®Ї« ҐвпҐ Ї®б« « ў б',
'"Єг¤ Ї®¤ «миҐ".','','',2,232);
end;
readkey;antiokno5;goto 1;
end;
if maks=25 then as2:='...„®¬ЁЄ Ё®Ї« ҐвпЁ ...' else
as2:='...?®Ї« ҐвпбЄЁ© Ўг©...';
dg:=random(17);
nowe:=0;
if magic[color,dg]=true then nowe:=100;
case dg of
0:begin okno5(as2,'?¤Ё ®вбў ,','¬гв в Їа®Є«пвл©.','','',2,243);readkey;
antiokno5;tru[ix,iy,color]:=true;goto 1;end;
1:begin as1:='’®а¬®§Ё«®ўЄЁ.';magic[color,dg]:=true;end;
2:begin as1:='’®аЇҐ¤л.';magic[color,dg]:=true;end;
3:begin as1:='‚®¤®«Ґп.';magic[color,dg]:=true;end;
4:begin as1:='‡«®Ј® «гз .';magic[color,dg]:=true;end;
5:begin as1:='‡«®Ј® «гз .';magic[color,4]:=true;end;
6:begin as1:='’ҐЇ«®ў®Ј® «гз .';magic[color,dg]:=true;end;
7:begin as1:='‘®бг饣® «гз .';magic[color,dg]:=true;end;
8:begin as1:='Ќ Їа ў«Ґ®Ј® ў Єгг¬ .';magic[color,dg]:=true;end;
9:begin as1:='Ђ«ЁЄ®а®ў ᢥв .';magic[color,dg]:=true;end;
10:begin as1:='‚л§®ў †Ґ«Ґ§®Ј® §ўҐап.';magic[color,dg]:=true;end;
11:begin as1:='‚л§®ў Ў®Ґў®Ј® е¬лап.';magic[color,dg]:=true;end;
12:begin as1:='? а®ў®© ¬®«Ёп.';magic[color,dg]:=true;end;
13:begin as1:='Љ®ЈвҐ© ᬥавЁ.';magic[color,dg]:=true;end;
14:begin as1:='„®¦¤п ѓҐа®®ў®© ЄЁб«®вл.';magic[color,dg]:=true;end;
15:begin as1:='ќд䥪⠬Ґ¤г§л.';magic[color,dg]:=true;end;
16:begin as1:='ѓ«оЄ® в Є «мжЁп.';magic[color,dg]:=true;end;
17:begin as1:='ЂЇ®Є «ЁЇбЁб .';magic[color,dg]:=true;end;
end;
if nowe<>100 then okno5(as2,'ЋвЄа®о-Є п ⥡Ґ ᥪаҐв',as1,'','',2,48) else
okno5('?§ўЁЁ Ё¬ЇҐа в®а,','® в®,Ґ¤Ёб⢥®Ґ, зв®',
'п Ўл ⥡Ґ ¤®ўҐаЁ«','г ⥡п 㦥 Ґбвм...','', 2,243);
repeat until readkey=#32;
antiokno5;
if color=9 then begin
okno5('Ѓ®пбм ,зв® ЇаЁиҐ«Ґж ¬®¦Ґв','а ббЄ § вм зв®-«ЁЎ® ¤агЈЁ¬,','ўл ЇаЁЄ®зЁ«Ё ҐЈ®.','','',2,232);
readkey;antiokno5;
end;
tru[ix,iy,color]:=true;
if color=9 then tru[ix,iy,9]:=true;
1:
end;
procedure writ(xw,yw,cw,fn:integer;nw:longint);
var sw:string;
begin
writestr(xw,yw,fn,0,'ЫЫЫЫЫ');str(nw,sw);writestr(xw,yw,cw,0,sw);
end;
procedure zahvat(ixx,iyy:byte);
label 1;
var zx,xz:string;
vv:char;
begin
xz:='';
zx:='';
for a:=1 to 100 do if (shx[color,a]=ixx) and (shy[color,a]=iyy) then goto 1;
if pole[ixx,iyy]=34 then begin xz:='? ев ЇЁаЁв ';end
else if pole[ixx,iyy]=35 then begin xz:='? ев ЄЁ®ў ап';end;
for a:=1 to 100 do if (shx[7,a]=ixx) and (shy[7,a]=iyy) then begin
zx:='ѓг¤®«мЈЁ©бЄ®Ј® Ї ⥮ ';okno5(xz,zx,'‡ еў вЁвм? ¤ -enter','','',2,223);
vv:=readkey;antiokno5;if vv<>#13 then goto 1;
if xz='? ев ЇЁаЁв ' then begin shx[7,a]:=0;shy[7,a]:=0;red.shp:=red.shp-1;
case color of
8:begin blue.shp:=blue.shp+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
9:begin green.shp:=green.shp+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
end;goto 1;end else if xz='? ев ЄЁ®ў ап' then begin shx[7,a]:=0;shy[7,a]:=0;red.shk:=red.shk-1;
case color of
8:begin blue.shk:=blue.shk+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
9:begin green.shk:=green.shk+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
end;goto 1;
end;
end;
{!!!!!!!!!!!!!!!!!!}
for a:=1 to 100 do if (shx[8,a]=ixx) and (shy[8,a]=iyy) then begin
zx:='’гаЁдЁЄ бЄ®Ј® Ї ⥮ ';okno5(xz,zx,'‡ еў вЁвм? ¤ -enter','','',2,223);
vv:=readkey;antiokno5;if vv<>#13 then goto 1;
if xz='? ев ЇЁаЁв ' then begin shx[8,a]:=0;shy[8,a]:=0;blue.shp:=blue.shp-1;
case color of
7:begin red.shp:=red.shp+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
9:begin green.shp:=green.shp+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
end;goto 1;end else if xz='? ев ЄЁ®ў ап' then begin shx[8,a]:=0;shy[8,a]:=0;blue.shk:=blue.shk-1;
case color of
7:begin blue.shk:=blue.shk+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
9:begin green.shk:=green.shk+1;shx[9,a]:=ixx;shy[9,a]:=iyy;okno5('','? ев § еў зe !!!','','','',2,223);readkey;antiokno5;end;
end;goto 1; end; end;
{!!!!!!!!!!!!!!!!!!}
for a:=1 to 100 do if (shx[9,a]=ixx) and (shy[9,a]=iyy) then begin
zx:='Џ ⥮ зҐале вЁа ®ў';okno5(xz,zx,'‡ еў вЁвм? ¤ -enter','','',2,223);
vv:=readkey;antiokno5;if vv<>#13 then goto 1;
if xz='? ев ЇЁаЁв ' then begin shx[9,a]:=0;shy[9,a]:=0;green.shp:=green.shp-1;
case color of
7:begin red.shp:=red.shp+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end;
8:begin blue.shp:=blue.shp+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end;
end;goto 1; end else if xz='? ев ЄЁ®ў ап' then begin shx[9,a]:=0;shy[9,a]:=0;blue.shk:=blue.shk-1;
case color of
7:begin red.shk:=red.shk+1;shx[7,a]:=ixx;shy[7,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end;
8:begin blue.shk:=blue.shk+1;shx[8,a]:=ixx;shy[8,a]:=iyy;okno5('','? ев § еў зҐ !!!','','','',2,223);readkey;antiokno5;end;
end;goto 1; end;end;
{!!!!!!!!!!!!!!!!!!}
1:end;
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
procedure givartifakt;
var art,arup:string[70];
pii,kii,ra,arti,ra1:integer;
label 1;
begin
pii:=0;
kii:=0;
ra1:=random(3);
if ra=1 then ra:=17+random(12) else ra:=1+random(17);
case ra of
{I}
1:begin art:='Ѓа®п ¤аҐўҐЈ® ®ЎЁв ⥫п.';arup:='(§ йЁв +1)';zas:=zas+1;end;
2:begin art:='ЊҐз вЁв ®ў.';arup:='( в Є +1)';power:=power+1;end;
3:begin art:='„ॢпп Ў в ३Є .';arup:='(нҐаЈЁп+1)';spower:=spower+1;end;
4:begin art:='„ॢЁ© б«®ў ам.';arup:='(§ Ёп+1)';know:=know+1;end;
{II}
5:begin art:='?Єга ЇҐб®з®Ј® зҐаўп.';arup:='(§ йЁв +2)';zas:=zas+2;end;
6:begin art:='ЊҐ¤ «м ўҐвҐа .';arup:='( в Є +2)';power:=power+2;end;
7:begin art:='ќҐаЈҐвЁзҐбЄЁ© ўЁЎаЁ®.';arup:='(нҐаЈЁп+2)';spower:=spower+2;end;
8:begin art:='‡ ¬лб«®ў в п ЇҐад®Є ав .';arup:='(§ Ёп+2)';know:=know+2;end;
{III}
9:begin art:='Џ®ЄалвЁҐ §ўҐ¤®«Ґв ЇаЁиҐ«м楢.';arup:='(§ йЁв +3)';zas:=zas+3;end;
10:begin art:='Ћ§ўҐаЁ.';arup:='( в Є +3)';power:=power+3;end;
11:begin art:='ќҐаЈ® б®б.';arup:='(нҐаЈЁп+3)';spower:=spower+3;end;
12:begin art:='„ЁбЄ,®бв ў«Ґл© ЇаЁиҐ«мж ¬Ё.';arup:='(§ Ёп+3)';know:=know+3;end;
{IV}
13:begin art:='Ђ¬Ґ§Ґа.';arup:='(§ Ёп=0)';know:=0;end;
14:begin art:='Љ ¬Ґм —Ґа®© ‹Ёе®а ¤ЄЁ.';arup:='( в Є =0,§ йЁв =0)';power:=0;zas:=0;end;
15:begin art:='ќ«ҐЄва®л© ў ¬ЇЁа.';arup:='(нҐаЈЁп=0)';spower:=0;end;
16:begin art:='Kackzor.';arup:='(§ йЁв =0)';zas:=0;end;
17:begin art:='Љ ¬Ґм ѓҐа® .';arup:='( в Є =0)';power:=0;end;
{V}
18:begin art:='Price by Mr.RandoM.';arup:='(‚ᥠЇгЄвл+5)';
inc(know,5);inc(spower,5);inc(power,5);inc(zas,5);end;
19:begin art:='Џ гЄ ЂЎ®е ЎЁб .';arup:='(‚ᥠЇгЄвл=0)';
know:=0;spower:=0;power:=0;zas:=0;end;
20:begin art:='‚®а,бЎҐ¦ ўиЁ© c Ђа ЄЁб .';arup:='(ЇЁаЁв+1000,ЄЁ®ў ам+1000)';
pii:=1000;kii:=1000;end;
21:begin art:='‚ ааоЈ .';arup:='(ЇЁаЁв=0,ЄЁ®ў ам=0)';
pii:=1;kii:=1;end;
22:begin art:=' «мд -ЈҐҐа в®а ЇЁаЁв .';arup:='(ЇЁаЁв+150 ў ¤Ґм)';
dpi:=dpi+150;end;
23:begin art:=' «мд -ЈҐҐа в®а ЄЁ®ў ап.';arup:='(ЄЁ®ў ам+75 ў ¤Ґм)';
dki:=dki+75;end;
24:begin art:='ЎҐвв -ЈҐҐа в®а ЇЁаЁв .';arup:='(ЇЁаЁв+250 ў ¤Ґм)';
dpi:=dpi+250;end;
25:begin art:='ЎҐвв -ЈҐҐа в®а ЄЁ®ў ап.';arup:='(ЄЁ®ў ам+130 ў ¤Ґм)';
dki:=dki+130;end;
26:begin art:='ЈҐҐа в®а ЇЁв Ёп.';arup:='(ЇЁв ЁҐ Ї®«ҐҐв ў Ґ¤.)';
polpit:=true;end;
27:begin art:='„®Ї®«ЁвҐ«м п вгаЎЁ .';arup:='(室л+5)';if color=7 then red.hhod:=red.hhod+5;
if color=8 then blue.hhod:=blue.hhod+5;
if color=9 then green.hhod:=green.hhod+5;end;
28:begin art:='ѓҐҐа в®а ўаҐ¬ҐЁ.';arup:='(室л+10)';if color=7 then red.hhod:=red.hhod+10;
if color=8 then blue.hhod:=blue.hhod+10;
if color=9 then green.hhod:=green.hhod+10;end;
end;
okno5('...Ђђ’?”ЂЉ’...',art,arup,'','',2,31);
if (pii=0) and (kii=0) then goto 1;
if (pii=1) and (kii=1) then
case color of
7:begin red.pir:=0;red.kin:=0;end;
8:begin blue.pir:=0;blue.kin:=0;end;
9:begin green.pir:=0;green.kin:=0;end;
end;
if (pii<>1) and (kii<>1) then
case color of
7:begin red.pir:=red.pir+pii;red.kin:=red.kin+kii;end;
8:begin blue.pir:=blue.pir+pii;blue.kin:=blue.kin+kii;end;
9:begin green.pir:=green.pir+pii;green.kin:=green.kin+kii;end;
end;
1:repeat until readkey=#32;antiokno5;
case color of
7:begin writ(258,37,120,3,red.pir);
writ(258,60,120,3,red.kin);end;
8:begin writ(258,37,120,3,blue.pir);
writ(258,60,120,3,blue.kin);end;
9:begin writ(258,37,120,3,green.pir);
writ(258,60,120,3,green.kin);end;
end;
end;
procedure oknod(s1,s2,d3,d4,d5:string; fon,col:byte);
var data:string;
begin
data:=s2+':'+d3+':'+d4+':'+d5+'Ј.';
len:=0;
if length(s1)>len then len:=length(s1);
if length(s2)>len then len:=length(s2);
were:=imagesize(155-len*10 div 2,85,150+len*10 div 2+3,135);
getmem(point,were);
getbitblock(155-len*10 div 2,85,150+len*10 div 2+3,135,point);
bar(155-len*10 div 2,85,150+len*10 div 2+3,135,fon);
line(155-len*10 div 2,85,150+len*10 div 2+3,85,col);
line(155-len*10 div 2,135,150+len*10 div 2+3,135,col);
line(155-len*10 div 2,85,155-len*10 div 2,135,col);
line(150+len*10 div 2+3,85,150+len*10 div 2+3,135,col);
writestr(160-length(s1)*10 div 2+10,90,col,0,s1);
writestr(160-length(data)*10 div 2+10,110,col,0,data);
end;
procedure map(x1,y1:integer);
var px,py:integer;
label 1;
begin
if human=false then goto 1;
px:=250;py:=130;
for a:=1 to 65 do
for b:=1 to 65 do
case pole[a,b] of
1:putpixel(a-1+px,b-1+py,29);
2:putpixel(a-1+px,b-1+py,30);
3:putpixel(a-1+px,b-1+py,249);
4:putpixel(a-1+px,b-1+py,46);
5:putpixel(a-1+px,b-1+py,177);
6:putpixel(a-1+px,b-1+py,2);
7:putpixel(a-1+px,b-1+py,224);
{---Machines--Red---------}
39:putpixel(a-1+px,b-1+py,224);
40:putpixel(a-1+px,b-1+py,224);
41:putpixel(a-1+px,b-1+py,224);
{---Machines--Blue---------}
8:putpixel(a-1+px,b-1+py,3);
42:putpixel(a-1+px,b-1+py,3);
43:putpixel(a-1+px,b-1+py,3);
44:putpixel(a-1+px,b-1+py,3);
{---Machines--Green---------}
9:putpixel(a-1+px,b-1+py,223);
45:putpixel(a-1+px,b-1+py,223);
46:putpixel(a-1+px,b-1+py,223);
47:putpixel(a-1+px,b-1+py,223);
10:putpixel(a-1+px,b-1+py,224);
11:putpixel(a-1+px,b-1+py,224);
12:putpixel(a-1+px,b-1+py,224);
13:putpixel(a-1+px,b-1+py,224);
14:putpixel(a-1+px,b-1+py,3);
15:putpixel(a-1+px,b-1+py,3);
16:putpixel(a-1+px,b-1+py,3);
17:putpixel(a-1+px,b-1+py,3);
18:putpixel(a-1+px,b-1+py,223);
19:putpixel(a-1+px,b-1+py,223);
20:putpixel(a-1+px,b-1+py,223);
21:putpixel(a-1+px,b-1+py,223);
22:putpixel(a-1+px,b-1+py,103);
25:putpixel(a-1+px,b-1+py,112);
23:putpixel(a-1+px,b-1+py,138);
24:putpixel(a-1+px,b-1+py,145);
{---Batiskaf----------------}
26:putpixel(a-1+px,b-1+py,1);
36:putpixel(a-1+px,b-1+py,1);
37:putpixel(a-1+px,b-1+py,1);
38:putpixel(a-1+px,b-1+py,1);
27:putpixel(a-1+px,b-1+py,225);
28:putpixel(a-1+px,b-1+py,245);
29:putpixel(a-1+px,b-1+py,42);
30:putpixel(a-1+px,b-1+py,250);
30:putpixel(a-1+px,b-1+py,99);
31:putpixel(a-1+px,b-1+py,210);
32:putpixel(a-1+px,b-1+py,100);
33:putpixel(a-1+px,b-1+py,111);
end;
putpixel(x1-1+px,y1-1+py,0);
line(x1+px,y1-1+py,x1+9+px,y1-1+py,0);
line(x1+px,y1+7+py,x1+9+px,y1+7+py,0);
line(x1-1+px,y1+py,x1-1+px,y1+7+py,0);
line(x1+9+px,y1+py,x1+9+px,y1+7+py,0);
1:
end;
procedure freemems;
begin
for a:=1 to 80 do release(p[a]);
end;
procedure load;
var fifo:byte;
begin
loadpcx('cls.pcx',true);
bar(0,0,320,200,0);
loadpcx('game.pcx',false);
w:=imagesize(0,78,24,102);getmem(p[1] ,w);getbitblock(0,78,24,102,p[1] );
w:=imagesize(26,78,51,102);getmem(p[2] ,w);getbitblock(26,78,50,102,p[2] );
w:=imagesize(78,78,102,102);getmem(p[3] ,w);getbitblock(78,78,102,102,p[3] );
{-------------mashines--------------------}
w:=imagesize(0,0,24,24);getmem(p[7] ,w);getbitblock(0,0,24,24,p[7] );
w:=imagesize(0,26,24,50);getmem(p[8] ,w);getbitblock(0,26,24,50,p[8] );
w:=imagesize(0,52,24,76);getmem(p[9] ,w);getbitblock(0,52,24,76,p[9] );
{#@$%%##^@$#%^^$@%#}
w:=imagesize(0,104,24,128);getmem(p[4] ,w);getbitblock(0,104,24,128,p[4] );
w:=imagesize(26,104,50,128);getmem(p[5] ,w);getbitblock(26,104,50,128,p[5] );
w:=imagesize(52,78,76,102);getmem(p[6] ,w);getbitblock(52,78,76,102,p[6] );
{-----------------RED----------------}
w:=imagesize(104,0,128,24);getmem(p[10] ,w);getbitblock(104,0,128,24,p[10] );
w:=imagesize(130,0,154,24);getmem(p[11] ,w);getbitblock(130,0,154,24,p[11] );
w:=imagesize(130,26,154,50);getmem(p[12] ,w);getbitblock(130,26,154,50,p[12] );
w:=imagesize(104,26,128,50);getmem(p[13] ,w);getbitblock(104,26,128,50,p[13] );
{-----------------BLUE----------------}
w:=imagesize(156,0,180,24);getmem(p[14] ,w);getbitblock(156,0,180,24,p[14] );
w:=imagesize(182,0,206,24);getmem(p[15] ,w);getbitblock(182,0,206,24,p[15] );
w:=imagesize(182,26,206,50);getmem(p[16] ,w);getbitblock(182,26,206,50,p[16] );
w:=imagesize(156,26,180,50);getmem(p[17] ,w);getbitblock(156,26,180,50,p[17] );
{-----------------GREEN----------------}
w:=imagesize(208,0,232,24);getmem(p[18] ,w);getbitblock(208,0,232,24,p[18] );
w:=imagesize(234,0,258,24);getmem(p[19] ,w);getbitblock(234,0,258,24,p[19] );
w:=imagesize(234,26,258,50);getmem(p[20] ,w);getbitblock(234,26,258,50,p[20] );
w:=imagesize(208,26,232,50);getmem(p[21] ,w);getbitblock(208,26,232,50,p[21] );
w:=imagesize(0,130,24,154);getmem(p[22] ,w);getbitblock(0,130,24,154,p[22] );
w:=imagesize(26,130,50,154);getmem(p[23] ,w);getbitblock(26,130,50,154,p[23] );
w:=imagesize(78,104,102,128);getmem(p[24] ,w);getbitblock(78,104,102,128,p[24] );
w:=imagesize(130,52,154,76);getmem(p[25] ,w);getbitblock(130,52,154,76,p[25] );
{UP}w:=imagesize(156,52,180,76);getmem(p[26] ,w);getbitblock(156,52,180,76,p[26] );
w:=imagesize(104,52,128,76);getmem(p[27] ,w);getbitblock(104,52,128,76,p[27] );
w:=imagesize(104,78,128,102);getmem(p[28] ,w);getbitblock(104,78,128,102,p[28] );
w:=imagesize(130,78,154,102);getmem(p[29] ,w);getbitblock(130,78,154,102,p[29] );
w:=imagesize(104,104,128,128);getmem(p[30] ,w);getbitblock(104,104,128,128,p[30] );
w:=imagesize(104,130,128,154);getmem(p[31] ,w);getbitblock(104,130,128,154,p[31] );
w:=imagesize(130,104,154,128);getmem(p[32] ,w);getbitblock(130,104,154,128,p[32] );
w:=imagesize(52,104,76,128);getmem(p[33] ,w);getbitblock(52,104,76,128,p[33] );
{!!!!!!!!!!!!!!!!!NEW NEW NEW NEW NEW!!!!!!!!!!!!!!!!!!!!!!!!!}
{DOB›VALKI}w:=imagesize(52,130,76,154);getmem(p[34] ,w);getbitblock(52,130,76,154,p[34] );
w:=imagesize(78,130,102,154);getmem(p[35] ,w);getbitblock(78,130,102,154,p[35] );
(*RIGHT*)w:=imagesize(182,52,206,76);getmem(p[36 ] ,w);getbitblock(182,52,206,76,p[36 ] );
{BATISKAF}(*DOWN*)w:=imagesize(208,52,232,76);getmem(p[37] ,w);getbitblock(208,52,232,76,p[37 ] );
(*left*)w:=imagesize(234,52,258,76);getmem(p[38 ] ,w);getbitblock(234,52,258,76,p[38 ] );
(*RIGHT*)w:=imagesize(26,0,50,24);getmem(p[39 ] ,w);getbitblock(26,0,50,24,p[39 ] );
{RED}(*DOWN*)w:=imagesize(52,0,76,24);getmem(p[40] ,w);getbitblock(52,0,76,24,p[40 ] );
(*left*)w:=imagesize(78,0,102,24);getmem(p[41 ] ,w);getbitblock(78,0,102,24,p[41 ] );
(*RIGHT*)w:=imagesize(26,26,50,50);getmem(p[42 ] ,w);getbitblock(26,26,50,50,p[42 ] );
{blue}(*DOWN*)w:=imagesize(52,26,76,50);getmem(p[43] ,w);getbitblock(52,26,76,50,p[43 ] );
(*left*)w:=imagesize(78,26,102,50);getmem(p[44 ] ,w);getbitblock(78,26,102,50,p[44 ] );
(*RIGHT*)w:=imagesize(26,52,50,76);getmem(p[45 ] ,w);getbitblock(26,52,50,76,p[45 ] );
{GREEN}(*DOWN*)w:=imagesize(52,52,76,76);getmem(p[46] ,w);getbitblock(52,52,76,76,p[46 ] );
(*left*)w:=imagesize(78,52,102,76);getmem(p[47 ] ,w);getbitblock(78,52,102,76,p[47 ] );
fifo:=47;
bar(0,0,320,200,0);
loadpcx('vars.pcx',false);
for a:=0 to 5 do
for b:=0 to 4 do
begin
fifo:=fifo+1;
w:=imagesize(a*32+1+a,b*32+1+b,a*32+1+a+31,b*32+1+b +31);
getmem(p[fifo],w);
getbitblock(a*32+1+a,b*32+1+b,a*32+1+a+31,b*32+1+b+31,p[fifo]);
end;
w:=imagesize(6*32+1+6,0*32+1+0,6*32+1+6+31,0*32+1+0 +31);
getmem(p[fifo+1],w);
getbitblock(6*32+1+6,0*32+1+0,6*32+1+6+31,0*32+1+0+31,p[fifo+1]);
w:=imagesize(6*32+1+6,1*32+1+1,6*32+1+6+31,1*32+1+1 +31);
getmem(p[fifo+2],w);
getbitblock(6*32+1+6,1*32+1+1,6*32+1+6+31,1*32+1+1+31,p[fifo+2]);
w:=imagesize(6*32+1+6,2*32+1+2,6*32+1+6+31,2*32+1+2 +31);
getmem(p[fifo+3],w);
getbitblock(6*32+1+6,2*32+1+2,6*32+1+6+31,2*32+1+2+31,p[fifo+3]);
bar(0,0,320,200,0);
loadpcxfast('post.pcx');
for a:=0 to 136 do
for b:=0 to 78 do
airoport[a,b]:=getpixel(a,b+101);
for a:=0 to 82 do
for b:=0 to 36 do
barak[a,b]:=getpixel(a+86,https://academ.club/html/emoticons/cool.gif;
for a:=0 to 148 do
for b:=0 to 105 do
zavod[a,b]:=getpixel(a+140,b+75);
w:=imagesize(170,0,206,30);getmem(gl,w);getbitblock(170,0,206,30,gl);
w:=imagesize(206,0,242,30);getmem(kr,w);getbitblock(206,0,242,30,kr);
w:=imagesize(242,0,278,30);getmem(cl,w);getbitblock(242,0,278,30,cl);
bar(0,0,320,200,0);
end;
procedure wrpole(plx,ply,od:integer);
label 1;
begin
if human=false then goto 1;
for a:=1 to 9 do
for b:=1 to 7 do
for c:=1 to od do
if pole[a+plx,b+ply]=c then
begin
storebitblock(a*25-22,b*25-9,p[c]);
end;
1:end;
procedure del;
begin
if port<>1000 then check:=1;
port:=1000;
pole[xtt,ytt]:=check;
end;
procedure www;
label 1;
begin
if color=7 then begin
if boat=false then begin
if nap=1 then pole[xtt,ytt]:=7;
if nap=2 then pole[xtt,ytt]:=39;
if nap=3 then pole[xtt,ytt]:=40;
if nap=4 then pole[xtt,ytt]:=41;end;
if boat=true then begin
if nap=1 then pole[xtt,ytt]:=26;
if nap=2 then pole[xtt,ytt]:=36;
if nap=3 then pole[xtt,ytt]:=37;
if nap=4 then pole[xtt,ytt]:=38;end;
end;
if color=8 then begin
if boat=false then begin
if nap=1 then pole[xtt,ytt]:=8;
if nap=2 then pole[xtt,ytt]:=42;
if nap=3 then pole[xtt,ytt]:=43;
if nap=4 then pole[xtt,ytt]:=44;end;
if boat=true then begin
if nap=1 then pole[xtt,ytt]:=26;
if nap=2 then pole[xtt,ytt]:=36;
if nap=3 then pole[xtt,ytt]:=37;
if nap=4 then pole[xtt,ytt]:=38;end;
end;
if color=9 then begin
if boat=false then begin
if nap=1 then pole[xtt,ytt]:=9;
if nap=2 then pole[xtt,ytt]:=45;
if nap=3 then pole[xtt,ytt]:=46;
if nap=4 then pole[xtt,ytt]:=47;end;
if boat=true then begin
if nap=1 then pole[xtt,ytt]:=26;
if nap=2 then pole[xtt,ytt]:=36;
if nap=3 then pole[xtt,ytt]:=37;
if nap=4 then pole[xtt,ytt]:=38;end;
end;
xy:=0;yy:=0;
if (xtt>4) and (xtt<61) and (ytt>3) and (ytt<63) then begin wrpole(xtt-5,ytt-4,ch);map(xtt-5,ytt-4);
goto 1;end;
if (xtt<6) and (ytt<63) and (ytt>4) then begin wrpole(0,ytt-4,ch);map(0,ytt-4);goto 1;end;
if (xtt>60) and (ytt<63) and (ytt>4) then begin wrpole(56,ytt-4,ch);map(56,ytt-4);goto 1;end;
if (xtt>5) and (xtt<61) and (ytt<5) then begin wrpole(xtt-5,0,ch);map(xtt-5,0);goto 1;end;
if (xtt>5) and (xtt<61) and (ytt>62) then begin wrpole(xtt-5,58,ch);map(xtt-5,58);goto 1;end;
if xtt>60 then xy:=56;if xtt<6 then xy:=0;
if ytt>62 then yy:=58;if ytt<5 then yy:=0;wrpole(xy,yy,ch);map(xy,yy);
1:end;
{----------------------------------------------------------------------------}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}
procedure tovar(nunu:byte);
var tow:byte;
label 1;
begin
case nunu of 7:tow:=10; 8:tow:=14; 9:tow:=18; end;
{ \ / }
for d:=1 to 65 do { O)(O }
for e:=1 to 65 do { ДДДД }
if pole[d,e]=tow then
begin
xy:=0;yy:=0;
if (d>4) and (d<61) and (e>3) and (e<63) then begin wrpole(d-5,e-4,ch);map(d-5,e-4);
goto 1;end;
if (d<6) and (e<63) and (e>4) then begin wrpole(0,e-4,ch);map(0,e-4);goto 1;end;
if (d>60) and (e<63) and (e>4) then begin wrpole(56,e-4,ch);map(56,e-4);goto 1;end;
if (d>5) and (d<61) and (e<5) then begin wrpole(d-5,0,ch);map(d-5,0);goto 1;end;
if (d>5) and (d<61) and (e>62) then begin wrpole(d-5,58,ch);map(d-5,58);goto 1;end;
if d>60 then xy:=56;if d<6 then xy:=0;
if e>62 then yy:=58;if e<5 then yy:=0;wrpole(xy,yy,ch);map(xy,yy);
end;
1:
(*(*(*(*(*(*((*(*(*(*(*(*(*)
(*(*(*(*(*(*((*(*(*(*(*(*(*)
end;
procedure pir_kin1;
begin case color of
7:begin writ(232,163,120,0,red.pir);writ(232,177,120,0,red.kin);end;
8:begin writ(232,163,120,0,blue.pir);writ(232,177,120,0,blue.kin);end;
9:begin writ(232,163,120,0,green.pir);writ(232,177,120,0,green.kin);end;end;end;
procedure pir_kin2;
begin case color of
7:begin writ(56,159,120,0,red.pir);writ(56,175,120,0,red.kin);end;
8:begin writ(56,159,120,0,blue.pir);writ(56,175,120,0,blue.kin);end;
9:begin writ(56,159,120,0,green.pir);writ(56,175,120,0,green.kin);end;end;end;
{----------------------------------------------------------------------------}
function zamokk(kox,koy:byte):byte;
begin
zamokk:=0;
if pole[kox,koy]=10 then zamokk:=1;
if pole[kox,koy]=11 then zamokk:=2;
if pole[kox,koy]=12 then zamokk:=3;
if pole[kox,koy]=13 then zamokk:=4;
if pole[kox,koy]=14 then zamokk:=5;
if pole[kox,koy]=15 then zamokk:=6;
if pole[kox,koy]=16 then zamokk:=7;
if pole[kox,koy]=17 then zamokk:=8;
if pole[kox,koy]=18 then zamokk:=9;
if pole[kox,koy]=19 then zamokk:=10;
if pole[kox,koy]=20 then zamokk:=11;
if pole[kox,koy]=21 then zamokk:=12;
end;
function tach(kox,koy:byte):byte;
begin
tach:=0;
if pole[kox,koy]=7 then tach:=7;
if pole[kox,koy]=39 then tach:=7;
if pole[kox,koy]=40 then tach:=7;
if pole[kox,koy]=41 then tach:=7;
if pole[kox,koy]=8 then tach:=8;
if pole[kox,koy]=42 then tach:=8;
if pole[kox,koy]=43 then tach:=8;
if pole[kox,koy]=44 then tach:=8;
if pole[kox,koy]=9 then tach:=9;
if pole[kox,koy]=45 then tach:=9;
if pole[kox,koy]=46 then tach:=9;
if pole[kox,koy]=47 then tach:=9;
end;
procedure castl(cl:byte);
label 11;
begin
loadpcx('castle.pcx',true);
case cl of
7:begin
if red.zm[2]=1 then if pri<>2 then begin
for a:=0 to 82 do
for b:=0 to 36 do
if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end;
if red.zm[3]=1 then if pri<>3 then begin
for a:=0 to 136 do
for b:=0 to 78 do
if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end;
if red.zm[4]=1 then if pri<>4 then begin
for a:=0 to 148 do
for b:=0 to 105 do
if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end;
if pri=2 then if red.zm[2]=1 then begin for c:=1 to 2000 do begin a:=random(82);b:=random(36);if barak[a,b]<>0 then
begin stro[a,b]:=barak[a,b];putpixel(a+170,b+69,barak[a,b]);delay(1);end;end;end;
if pri=3 then if red.zm[3]=1 then begin for c:=1 to 5000 do begin a:=random(136);b:=random(78);if airoport[a,b]<>0 then
begin stro[a,b]:=airoport[a,b];putpixel(a+75,b+66,stro[a,b]);delay(1);end;end;end;
if pri=4 then if red.zm[4]=1 then begin for c:=1 to 7000 do begin a:=random(148);b:=random(105);if zavod[a,b]<>0 then
begin stro[a,b]:=zavod[a,b];putpixel(a+155,b+40,stro[a,b]);delay(1);end;end;end;
pri:=0;
if red.zm[2]=1 then if pri<>2 then begin
for a:=0 to 82 do
for b:=0 to 36 do
if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end;
if red.zm[3]=1 then if pri<>3 then begin
for a:=0 to 136 do
for b:=0 to 78 do
if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end;
if red.zm[4]=1 then if pri<>4 then begin
for a:=0 to 148 do
for b:=0 to 105 do
if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end;
end;
8:begin
if blue.zm[2]=1 then if pri<>2 then begin
for a:=0 to 82 do
for b:=0 to 36 do
if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end;
if blue.zm[3]=1 then if pri<>3 then begin
for a:=0 to 136 do
for b:=0 to 78 do
if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end;
if blue.zm[4]=1 then if pri<>4 then begin
for a:=0 to 148 do
for b:=0 to 105 do
if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end;
if pri=2 then if blue.zm[2]=1 then begin for c:=1 to 2000 do begin a:=random(82);b:=random(36);if barak[a,b]<>0 then
begin stro[a,b]:=barak[a,b];putpixel(a+170,b+69,barak[a,b]);delay(1);end;end;end;
if pri=3 then if blue.zm[3]=1 then begin for c:=1 to 5000 do begin a:=random(136);b:=random(78);if airoport[a,b]<>0 then
begin stro[a,b]:=airoport[a,b];putpixel(a+75,b+66,stro[a,b]);delay(1);end;end;end;
if pri=4 then if blue.zm[4]=1 then begin for c:=1 to 7000 do begin a:=random(148);b:=random(105);if zavod[a,b]<>0 then
begin stro[a,b]:=zavod[a,b];putpixel(a+155,b+40,stro[a,b]);delay(1);end;end;end;
pri:=0;
if blue.zm[2]=1 then if pri<>2 then begin
for a:=0 to 82 do
for b:=0 to 36 do
if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end;
if blue.zm[3]=1 then if pri<>3 then begin
for a:=0 to 136 do
for b:=0 to 78 do
if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end;
if blue.zm[4]=1 then if pri<>4 then begin
for a:=0 to 148 do
for b:=0 to 105 do
if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end;
end;
9:begin
if green.zm[2]=1 then if pri<>2 then begin
for a:=0 to 82 do
for b:=0 to 36 do
if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end;
if green.zm[3]=1 then if pri<>3 then begin
for a:=0 to 136 do
for b:=0 to 78 do
if airoport[a,b]<>0 then putpixel(a+75,b+66,airoport[a,b]);end;
if green.zm[4]=1 then if pri<>4 then begin
for a:=0 to 148 do
for b:=0 to 105 do
if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end;
if pri=2 then if green.zm[2]=1 then begin for c:=1 to 2000 do begin a:=random(82);b:=random(36);if barak[a,b]<>0 then
begin stro[a,b]:=barak[a,b];putpixel(a+170,b+69,barak[a,b]);delay(1);end;end;end;
if pri=3 then if green.zm[3]=1 then begin for c:=1 to 5000 do begin a:=random(136);b:=random(78);if airoport[a,b]<>0 then
begin stro[a,b]:=airoport[a,b];putpixel(a+75,b+66,stro[a,b]);delay(1);end;end;end;
if pri=4 then if green.zm[4]=1 then begin for c:=1 to 7000 do begin a:=random(148);b:=random(105);if zavod[a,b]<>0 then
begin stro[a,b]:=zavod[a,b];putpixel(a+155,b+40,stro[a,b]);delay(1);end;end;end;
pri:=0;
if green.zm[2]=1 then if pri<>2 then begin
for a:=0 to 82 do
for b:=0 to 36 do
if barak[a,b]<>0 then putpixel(a+170,b+69,barak[a,b]);end;
if green.zm[3]=1 then if pri<>3 then begin
for a:=0 to 136 do
for b:=0 to 78 do
if airoport[a,b]<>0 then putpixel(a+15,b+66,airoport[a,b]);end;
if green.zm[4]=1 then if pri<>4 then begin
for a:=0 to 148 do
for b:=0 to 105 do
if zavod[a,b]<>0 then putpixel(a+155,b+40,zavod[a,b]);end;
end;
end;
pri:=0;
end;
procedure build;
var a,b,c,d,e,by,by1:integer;
pb,ccl:pointer;
label s1,s2,s3;
begin
loadpcx('buil.pcx',true);
for a:=0 to 148 do
for b:=0 to 105 do stro[a,b]:=0;
e:=imagesize(172,4,185,26);getmem(pb,e);getbitblock(172,4,185,26,pb);
e:=imagesize(306,4,319,26);getmem(ccl,e);getbitblock(306,4,319,26,ccl);by:=7;
case color of
7:begin if (red.pir>=pstbr)and(red.kin>=kstbr)and(red.zm[2]<>1)then storebitblock(224,106,cl);if (red.pir<pstbr)and
(red.kin<kstbr)then storebitblock(224,106,kr);if (red.zm[2]=1)then storebitblock(224,106,gl);end;
8:begin if (blue.pir>=pstbr)and(blue.kin>=kstbr)and(blue.zm[2]<>1)then storebitblock(224,106,cl);if (blue.pir<pstbr)and
(blue.kin<kstbr)then storebitblock(224,106,kr);if (blue.zm[2]=1)then storebitblock(224,106,gl);end;
9:begin if (green.pir>=pstbr)and(green.kin>=kstbr)and(green.zm[2]<>1)then storebitblock(224,106,cl);if (green.pir<pstbr)and
(green.kin<kstbr)then storebitblock(224,106,kr);if (green.zm[2]=1)then storebitblock(224,106,gl);end;
end;
storebitblock(172,4,ccl);storebitblock(172,by,pb);writ(128,5,83,0,pstbr);writ(128,22,83,0,kstbr);writ(128,45,83,0,pstai);
writ(128,71,83,0,kstai);writ(128,102,83,0,pstzv);writ(128,136,83,0,kstzv);
pir_kin2;
{---------------------------------ЊҐвЄ -s1:----------------------------------}
s1:
if not keypressed then goto s1 else begin
case readkey of
{----------------------Press-Enter-------------------------------------------}
#13:begin
if by=7 then begin if color=7 then if (red.pir>=pstbr)and(red.kin>=kstbr)and(red.zm[2]<>1) then begin red.zm[2]:=1;pri:=2;
red.pir:=red.pir-pstbr;red.kin:=red.kin-kstbr;end else goto s1;if color=8 then if (blue.pir>=pstbr)and(blue.kin>=kstbr)and
(blue.zm[2]<>1) then begin blue.zm[2]:=1;pri:=2;blue.pir:=blue.pir-pstbr;blue.kin:=blue.kin-kstbr;
end else goto s1;if color=9 then
if (green.pir>=pstbr)and(green.kin>=kstbr)and(green.zm[2]<>1) then begin green.zm[2]:=1;pri:=2;green.pir:=green.pir-pstbr;
green.kin:=green.kin-kstbr;end else goto s1;bar(0,0,319,199,0);goto s2;end;
if by=51 then begin if color=7 then if (red.pir>=pstai)and(red.kin>=kstai)and(red.zm[3]<>1) then begin red.zm[3]:=1;
red.pir:=red.pir-pstai;red.kin:=red.kin-kstai;end else goto s1;if color=8 then if (blue.pir>=pstai)and(blue.kin>=kstai)and
(blue.zm[3]<>1) then begin blue.zm[3]:=1;blue.pir:=blue.pir-pstai;blue.kin:=blue.kin-kstai;end else goto s1;if color=9 then
if (green.pir>=pstai)and(green.kin>=kstai)and(green.zm[3]<>1) then begin green.zm[3]:=1;green.pir:=green.pir-pstai;
green.kin:=green.kin-kstai;end else goto s1;bar(0,0,319,199,0);goto s2;end;
if by=95 then begin if color=7 then if (red.pir>=pstzv)and(red.kin>=kstzv)and(red.zm[4]<>1) then begin red.zm[4]:=1;
red.pir:=red.pir-pstzv;red.kin:=red.kin-kstzv;end else goto s1;if color=8 then if (blue.pir>=pstzv)and(blue.kin>=kstzv)and
(blue.zm[4]<>1) then begin blue.zm[4]:=1;blue.pir:=blue.pir-pstzv;blue.kin:=blue.kin-kstzv;end else goto s1;if color=9 then
if (green.pir>=pstzv)and(green.kin>=kstzv)and(green.zm[4]<>1) then begin green.zm[4]:=1;green.pir:=green.pir-pstzv;
green.kin:=green.kin-kstzv;end else goto s1;bar(0,0,319,199,0);goto s2;end;
end;
{------------------end-Press-Enter-------------------------------------------}
#72:begin if by>7 then
begin storebitblock(172,by,ccl);by:=by-44;storebitblock(172,by,pb);end;
end;
#80:begin if by<95 then
begin storebitblock(172,by,ccl);by:=by+44;storebitblock(172,by,pb);end;
end;
#27:begin bar(0,0,319,199,0);goto s2;end;
end;
{-------------------------Red-Plaer------------------------------------------}
{------------------------------Barak-----------------------------------------}
if color=7 then begin
if by=7 then if (red.pir>=pstbr)and(red.kin>=kstbr)and(red.zm[2]<>1)then begin storebitblock(224,106,cl);pri:=2;end;
if by=7 then if (red.pir<pstbr)or(red.kin<kstbr)then storebitblock(224,106,kr);
if by=7 then if (red.zm[2]=1)then storebitblock(224,106,gl);
{----------------------------Airoport----------------------------------------}
if by=51 then if (red.pir>=pstai)and(red.kin>=kstai)and(red.zm[3]<>1)then begin storebitblock(224,106,cl);pri:=3;end;
if by=51 then if (red.pir<pstai)or(red.kin<kstai)then storebitblock(224,106,kr);
if by=51 then if (red.zm[3]=1)then storebitblock(224,106,gl);
{----------------------------Zavod-------------------------------------------}
if by=95 then if (red.pir>=pstzv)and(red.kin>=kstzv)and(red.zm[4]<>1)then begin storebitblock(224,106,cl);pri:=4;end;
if by=95 then if (red.pir<pstzv)or(red.kin<kstzv)then storebitblock(224,106,kr);
if by=95 then if (red.zm[4]=1)then storebitblock(224,106,gl);
end;
{----------------------------------------------------------------------------}
{---------------------------Blue-Plaer---------------------------------------}
{------------------------------Barak-----------------------------------------}
if color=8 then begin
if by=7 then if (blue.pir>=pstbr)and(blue.kin>=kstbr)and(blue.zm[2]<>1)then begin storebitblock(224,106,cl);pri:=2;end;
if by=7 then if (blue.pir<pstbr)or(blue.kin<kstbr)then storebitblock(224,106,kr);
if by=7 then if (blue.zm[2]=1)then storebitblock(224,106,gl);
{----------------------------Airoport----------------------------------------}
if by=51 then if (blue.pir>=pstai)and(blue.kin>=kstai)and(blue.zm[3]<>1)then begin storebitblock(224,106,cl);pri:=3;end;
if by=51 then if (blue.pir<pstai)or(blue.kin<kstai)then storebitblock(224,106,kr);
if by=51 then if (blue.zm[3]=1)then storebitblock(224,106,gl);
{----------------------------Zavod-------------------------------------------}
if by=95 then if (blue.pir>=pstzv)and(blue.kin>=kstzv)and(blue.zm[4]<>1)then begin storebitblock(224,106,cl);pri:=4;end;
if by=95 then if (blue.pir<pstzv)or(blue.kin<kstzv)then storebitblock(224,106,kr);
if by=95 then if (blue.zm[4]=1)then storebitblock(224,106,gl);
end;
{----------------------------------------------------------------------------}
{--------------------------Green-Plaer---------------------------------------}
{------------------------------Barak-----------------------------------------}
if color=9 then begin
if by=7 then if (green.pir>=pstbr)and(green.kin>=kstbr)and(green.zm[2]<>1)then begin storebitblock(224,106,cl);pri:=2;end;
if by=7 then if (green.pir<pstbr)or(green.kin<kstbr)then storebitblock(224,106,kr);
if by=7 then if (green.zm[2]=1)then storebitblock(224,106,gl);
{----------------------------Airoport----------------------------------------}
if by=51 then if (green.pir>=pstai)and(green.kin>=kstai)and(green.zm[3]<>1)then begin storebitblock(224,106,cl);pri:=3;end;
if by=51 then if (green.pir<pstai)or(green.kin<kstai)then storebitblock(224,106,kr);
if by=51 then if (green.zm[3]=1)then storebitblock(224,106,gl);
{----------------------------Zavod-------------------------------------------}
if by=95 then if (green.pir>=pstzv)and(green.kin>=kstzv)and(green.zm[4]<>1)then begin storebitblock(224,106,cl);pri:=4;end;
if by=95 then if (green.pir<pstzv)or(green.kin<kstzv)then storebitblock(224,106,kr);
if by=95 then if (green.zm[4]=1)then storebitblock(224,106,gl);
end;
{----------------------------------------------------------------------------}
end;
goto s1;
{---------------Џ®¬«Ґ¤ЁҐ-ў®§ўа 饨Ґ- -¬ҐвЄг-s1:---------------------------}
s2:
end;
procedure buy_mahina;
label 1;
var kiki,pipi:integer;
xbt,ybt,tow:byte;
begin
case color of
7:begin red.pir:=red.pir+(red.shp*random(120));
red.kin:=red.kin+(red.shk*random(50));
writ(258,37,120,3,red.pir);
writ(258,60,120,3,red.kin);end;
8:begin blue.pir:=blue.pir+(blue.shp*random(120));
blue.kin:=blue.kin+(blue.shk*random(50));
writ(258,37,120,3,blue.pir);
writ(258,60,120,3,blue.kin);end;
9:begin green.pir:=green.pir+(green.shp*random(120));
green.kin:=green.kin+(green.shk*random(50));
writ(258,37,120,3,green.pir);
writ(258,60,120,3,green.kin);end;
end;
kiki:=0;pipi:=0;
tovar(color);
okno5('•®зҐим ЄгЇЁвм ®ўго в зЄг','§ 3000ЇЁа. Ё 1000ЄЁ. ?','¤ -enter','','',2,253);
if readkey=#13 then begin
antiokno5;
case color of
7:begin kiki:=red.kin;pipi:=red.pir;end;
8:begin kiki:=blue.kin;pipi:=blue.pir;end;
9:begin kiki:=green.kin;pipi:=green.pir;end;end;
if (kiki<1000) or (pipi<3000) then begin
okno5('Њ «®ў в® аҐбгаб®ў','г вҐЎп ¤«п','в Є®© ¬ еЁл.','','',2,232);
readkey;antiokno5;goto 1;end;
case color of
7:begin dec(red.kin,1000);dec(red.pir,3000);end;
8:begin dec(blue.kin,1000);dec(blue.pir,3000);end;
9:begin dec(green.kin,1000);dec(green.pir,3000);end;
end;
live:=true;
case color of 7:tow:=10; 8:tow:=14; 9:tow:=18; end;
for a:=1 to 65 do
for b:=1 to 65 do
if pole[a,b]=tow then
begin
check:=pole[a+1,b+2];
pole[a+1,b+2]:=color;
power:=0;
zas:=0;
know:=0;
spower:=0;
case color of
7:begin writ(258,37,120,3,red.pir);
writ(258,60,120,3,red.kin);end;
8:begin writ(258,37,120,3,blue.pir);
writ(258,60,120,3,blue.kin);end;
9:begin writ(258,37,120,3,green.pir);
writ(258,60,120,3,green.kin);end;
end;
end;
end else
antiokno5;
1:end;
{@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
{}
{}
procedure Voina(ccc1,ccc2:byte;zam1,zam2:boolean); {THAT's ...WAR...}
var ara,popa:array[1..9,1..5] of byte;
{SECRET WEAPONS}
trm,zmr,zl:array[1..9,1..5] of integer;
ratt:array[1..9,1..5] of integer;
mo:string[6];
xto,yto,cvx,cvy,l11,l22,ho,this,lok:integer;
ppow,zass,spow,lift,blin:longint;
sha,mode_comp:boolean;
ku,hor:byte;
boom:array[1..5,1..34,1..34] of byte;
oli,la2:longint;
sus:string;
label 1,2,3,10,20,123,11,22,f1,f2,f3,a1,a2,a3,a4,a5,a6,a7,a8;
function whoisit(cvet,lele,lor:byte):byte;
var lkj:byte;
begin
if lor=1 then lor:=0 else lor:=1;
case lele of
1:whoisit:=1+5*lor; {tu -tu}
2:whoisit:=2+5*lor; {tu -tu}
3:case cvet of {tu -tu}
7:whoisit:=3+5*lor; {tu -tu}
8:whoisit:=5+5*lor; {tu -tu}
9:whoisit:=4+5*lor; {tu -tu}
end; {tu -tu}
4:whoisit:=11+5*lor; {tu -tu}
5:whoisit:=12+5*lor; {tu -tu}
6:case cvet of {tu -tu}
7:whoisit:=25+5*lor; {tu -tu}
8:whoisit:=13+5*lor; {tu -tu}
9:whoisit:=15+5*lor; {tu -tu}
end; {tu -tu}
7:whoisit:=21+5*lor; {tu -tu}
8:whoisit:=24+5*lor; {tu -tu}
9:case cvet of
7:whoisit:=23+5*lor; {tu -tu}
8:whoisit:=22+5*lor;
9:whoisit:=14+5*lor; {tu -tu}
end;
end; {lor: 0 or 1}
end;
procedure wrata;
begin
for a:=0 to 8 do
for b:=0 to 4 do
begin
storebitblock(a*32+1+16,b*32+1+10,p[popa[a+1,b+1]]);
if popa[a+1,b+1]<78 then begin
str(ratt[a+1,b+1],mo);
writestr(a*32+1+16,b*32+1+10,224,0,mo);
end;
end;
end;
function levo(oler:byte) :boolean;
begin
levo:=false;
if ((oler>5) and (oler<11)) or ((oler>15) and (oler<21)) or
((oler>25) and (oler<31)) then levo:=true;
end;
function pravo(oker:byte) :boolean;
begin
pravo:=false;
if (oker<6) or ((oker>10) and (oker<16)) or
((oker>20) and (oker<26)) then pravo:=true;
end;
function hyper :byte;
var y1,y2:boolean;
label 1,2;
begin
hyper:=0;
y1:=false;y2:=y1;
for a:=1 to 9 do
for b:=1 to 9 do if levo(popa[a,b]-47)=true then begin y1:=true;goto 1;end;
1:
for a:=1 to 9 do
for b:=1 to 9 do if pravo(popa[a,b]-47)=true then begin y2:=true;goto 2;end;
2:
if y1=false then hyper:=1;
if y2=false then hyper:=2;
end;
procedure findnow(lok:byte);
label 1;
begin
if hyper=0 then
for c:=1 to 9 do
for d:=1 to 5 do
if popa[c,d]=lok then begin xto:=c;yto:=d;goto 1;end;
1:
end;
procedure I_am_the_soldier(xc,wer,moon:integer);
begin
ppow:=0;zass:=0;lift:=0;spow:=0;
case xc of
7:case wer of
1:begin ppow:=power[xc]+2;spow:=0;zass:=zas[xc]+1;lift:=8;end;
2:begin ppow:=power[xc]+3;spow:=0;zass:=zas[xc]+3;lift:=10;end;
3:begin ppow:=power[xc]+4;spow:=5;zass:=zas[xc]+3;lift:=15;end;
4:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+8;lift:=50;end;
5:begin ppow:=power[xc]+8;spow:=10;zass:=zas[xc]+6;lift:=40;end;
6:begin ppow:=power[xc]+10;spow:=13;zass:=zas[xc]+11;lift:=75;end;
7:begin ppow:=power[xc]+5;spow:=7;zass:=zas[xc]+3;lift:=25;end;
8:begin ppow:=power[xc]+6;spow:=8;zass:=zas[xc]+3;lift:=31;end;
9:begin ppow:=power[xc]+9;spow:=12;zass:=zas[xc]+9;lift:=50;end;
end;
8:case wer of
1:begin ppow:=power[xc]+2;spow:=0;zass:=zas[xc]+1;lift:=8;end;
2:begin ppow:=power[xc]+3;spow:=0;zass:=zas[xc]+3;lift:=10;end;
3:begin ppow:=power[xc]+4;spow:=3;zass:=zas[xc]+4;lift:=18;end;
4:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+8;lift:=50;end;
5:begin ppow:=power[xc]+8;spow:=10;zass:=zas[xc]+6;lift:=40;end;
6:begin ppow:=power[xc]+8;spow:=13;zass:=zas[xc]+15;lift:=60;end;
7:begin ppow:=power[xc]+5;spow:=7;zass:=zas[xc]+3;lift:=25;end;
8:begin ppow:=power[xc]+6;spow:=8;zass:=zas[xc]+3;lift:=31;end;
9:begin ppow:=power[xc]+11;spow:=10;zass:=zas[xc]+10;lift:=45;end;
end;
9:case wer of
1:begin ppow:=power[xc]+2;spow:=0;zass:=zas[xc]+1;lift:=9;end;
2:begin ppow:=power[xc]+3;spow:=0;zass:=zas[xc]+3;lift:=10;end;
3:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+5;lift:=22;end;
4:begin ppow:=power[xc]+7;spow:=0;zass:=zas[xc]+8;lift:=50;end;
5:begin ppow:=power[xc]+8;spow:=10;zass:=zas[xc]+6;lift:=40;end;
6:begin ppow:=power[xc]+9;spow:=15;zass:=zas[xc]+10;lift:=75;end;
7:begin ppow:=power[xc]+5;spow:=7;zass:=zas[xc]+3;lift:=25;end;
8:begin ppow:=power[xc]+6;spow:=8;zass:=zas[xc]+3;lift:=31;end;
9:begin ppow:=power[xc]+10;spow:=13;zass:=zas[xc]+12;lift:=50;end;
end;
end;
ppow:=ppow*moon;spow:=spow*moon;zass:=zass*moon;end;
function woda(axd,zvz:byte):byte;
label 1,2;
var aar,mnb,boon:byte;
begin
if hyper=0 then begin
if axd=9 then mnb:=0 else mnb:=axd;
2:for aar:=(mnb+1) to 9 do if wt[zvz,aar]<>0 then begin woda:=aar;goto 1;end;
mnb:=0;
goto 2;
1:
{if zvz=ccc1 then boon:=ccc2 else boon:=ccc1;
if wt[boon,aar]=0 then goto 2;
}end; end;
procedure semena;
label 1;
begin
if ku<>65 then if ku<>110 then ku:=110;
if ku<>65 then
begin
l11:=woda(l11,ccc1);
findnow(whoisit(ccc2,l22,1)+47);ku:=65;goto 1;end;
l22:=woda(l22,ccc2);
findnow(whoisit(ccc1,l11,0)+47);ku:=110;
1:end;
procedure morgg1(x,y,cvb:byte);
begin
line((x-1)*30+142-x+1,(y-1)*30+53-y+1,(x)*30+142-x,(y-1)*30+53-y+1,cvb);
line((x-1)*30+142-x+1,(y)*30+53-y,(x)*30+142-x,(y)*30+53-y,cvb);
if y=1 then line((x-1)*30+142-x+1,(y-1)*30+53,(x-1)*30+142-x+1,(y)*30+53-y,cvb) else
line((x-1)*30+142-x+1,(y-1)*30+53-1,(x-1)*30+142-x+1,(y)*30+53-y,cvb);
if y=1 then line((x)*30+142-x,(y-1)*30+53,(x)*30+142-x,(y)*30+53-y,cvb) else
line((x)*30+142-x,(y-1)*30+53-1,(x)*30+142-x,(y)*30+53-y,cvb)
end;
procedure morgg(x,y:byte);
begin
line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x)*32+1+16,(y-1)*32+1+10-1,3);
line((x-1)*32+1+16-1,(y)*32+1+10,(x)*32+1+16,(y)*32+1+10,3);
line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x-1)*32+1+16-1,(y)*32+1+10,3);
line((x)*32+1+16,(y-1)*32+1+10-1,(x)*32+1+16,(y)*32+1+10,3);end;
procedure amorgg(x,y:byte);
begin
line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x)*32+1+16,(y-1)*32+1+10-1,0);
line((x-1)*32+1+16-1,(y)*32+1+10,(x)*32+1+16,(y)*32+1+10,0);
line((x-1)*32+1+16-1,(y-1)*32+1+10-1,(x-1)*32+1+16-1,(y)*32+1+10,0);
line((x)*32+1+16,(y-1)*32+1+10-1,(x)*32+1+16,(y)*32+1+10,0);end;
procedure booom(ex,yx:byte);
begin
for a:=1 to 5 do
begin
for b:=2 to 32 do
for c:=2 to 29 do
if boom[a,b,c]<>0 then
putpixel((ex-1)*32+1+16+b-2,(yx-1)*32+1+10+c-2,boom[a,b,c]);
delay(50);
storebitblock((ex-1)*32+1+16,(yx-1)*32+1+10,p[popa[ex,yx]]);
end;
morgg(xto,yto);
str(ratt[ex,yx],mo);
if ratt[ex,yx]<>0 then writestr((ex-1)*32+1+16,(yx-1)*32+1+10,224,0,mo);
end;
procedure kahod(coc,los:byte);
begin
if (los=1) or (los=2) then ho:=2;
if los=4 then ho:=6;
if los=5 then ho:=5;
if (los=7) or (los=8) then ho:=1;
case coc of
7:case los of
3:ho:=2;
6:ho:=5;
9:ho:=2;
end;
8:case los of
3:ho:=4;
6:ho:=4;
9:ho:=2;
end;
9:case los of
3:ho:=3;
6:ho:=5;
9:ho:=2;
end;end;end;
function ono(xr,yr:byte) :boolean;
var q1,q2,q3:byte;
lif1,lif2,la3:longint;
label 1,2,756;
begin
oli:=0;
ono:=false;
zass:=0;ppow:=0;spow:=0;lift:=0;
if popa[xr,yr]<>78 then ono:=true;
if ((levo(popa[xto,yto]-47)=true) and (pravo(popa[xr,yr]-47)=true))
or ((pravo(popa[xto,yto]-47)=true) and (levo(popa[xr,yr]-47)=true)) then
begin
if pravo(popa[xr,yr]-47)=true then begin q1:=ccc1;q2:=0;end else begin q1:=ccc2;q2:=1;end;
for a:=1 to 9 do
if popa[xto,yto]=whoisit(q1,a,q2)+47 then
I_am_the_soldier(q1,a,ratt[xto,yto]);
la3:=lift;
lif1:=lift*ratt[xto,yto];
lif1:=lif1-la3+ara[xto,yto];
oli:=ppow;
if pravo(popa[xr,yr]-47)=true then begin q1:=ccc2;q2:=1;end else begin q1:=ccc1;q2:=0;end;
for a:=1 to 9 do
if popa[xr,yr]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xr,yr]);
la2:=lift;
lif2:=lift*ratt[xr,yr];
lif2:=lif2-la2+ara[xr,yr];
{OOOPPSSa-a-a-a-a-a--a-a-a-a-a-----------a-a-a-aaaaaaaaa-a-a-a--a-a !}
lif2:=lif2-oli;
if lif2 mod la2=0 then ara[xr,yr]:=la2 else ara[xr,yr]:=lif2 mod la2;
ratt[xr,yr]:=lif2 div la2;
if lif2 mod la2>0 then inc(ratt[xr,yr]);
if (lif2<=0) or (ratt[xr,yr]<=0) then begin
if levo(popa[xr,yr]-47)=true then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0;
popa[xr,yr]:=78;ratt[xr,yr]:=0;ara[xr,yr]:=0;end;
booom(xr,yr);
{NA TEBE PO LBU !}
if popa[xr,yr]<>78 then
begin
lif1:=lif1-zass;
if lif1 mod la3=0 then ara[xto,yto]:=la3 else ara[xto,yto]:=lif1 mod la3;
ratt[xto,yto]:=lif1 div la3;
if lif1 mod la3>0 then inc(ratt[xto,yto]);
if (lif1<=0) or (ratt[xto,yto]<=0) then begin
if levo(popa[xr,yr]-47)=false then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0;
popa[xto,yto]:=78;ratt[xto,yto]:=0;ara[xto,yto]:=0;
end;
booom(xto,yto);
if ratt[xto,yto]=0 then begin
writ(104,175,0,0,ho);
this:=popa[xto,yto];
amorgg(xto,yto);
1:
semena;
if popa[xto,yto]=this then goto 1;
wrata;morgg(xto,yto);
2:if levo(popa[xto,yto]-47)=true then kahod(ccc1,l11) else kahod(ccc2,l22);
if ho=0 then goto 2;
writ(104,175,3,0,ho);
end;
end;
ho:=0;
writ(104,175,3,0,ho);
end;
end;
function energy(cvb,urv:byte): integer;
begin
energy:=0;
if (urv=1) or (urv=2) then energy:=10;
if urv=4 then energy:=25;
if urv=5 then energy:=20;
if urv=7 then energy:=15;
if urv=8 then energy:=20;
case cvb of
7:case urv of
3:energy:=13;
6:energy:=28;
9:energy:=25;
end;
8:case urv of
3:energy:=12;
6:energy:=28;
9:energy:=26;
end;
9:case urv of
3:energy:=13;
6:energy:=30;
9:energy:=30;
end;end;end;
{SHOT THIS PEARE !}
procedure shot(xr,yr:byte);
var q1,q2,q3:byte;
lif1,lif2,la3:longint;
label 1,2;
begin
oli:=0;
zass:=0;ppow:=0;spow:=0;lift:=0;
begin
if pravo(popa[xr,yr]-47)=true then begin q1:=ccc1;q2:=0;end else begin q1:=ccc2;q2:=1;end;
for a:=1 to 9 do
if popa[xto,yto]=whoisit(q1,a,q2)+47 then
I_am_the_soldier(q1,a,ratt[xto,yto]);
la3:=lift;
lif1:=lift*ratt[xto,yto];
lif1:=lif1-la3+ara[xto,yto];
oli:=spow;
if pravo(popa[xr,yr]-47)=true then begin q1:=ccc2;q2:=1;end else begin q1:=ccc1;q2:=0;end;
for a:=1 to 9 do
if popa[xr,yr]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xr,yr]);
la2:=lift;
lif2:=lift*ratt[xr,yr];
lif2:=lif2-la2+ara[xr,yr];
{OOOPPSSa-a-a-a-a-a--a-a-a-a-a-----------a-a-a-aaaaaaaaa-a-a-a--a-a !}
lif2:=lif2-oli;
if lif2 mod la2=0 then ara[xr,yr]:=la2 else ara[xr,yr]:=lif2 mod la2;
ratt[xr,yr]:=lif2 div la2;
if lif2 mod la2>0 then inc(ratt[xr,yr]);
if (lif2<=0) or (ratt[xr,yr]<=0) then begin
if levo(popa[xr,yr]-47)=true then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0;
popa[xr,yr]:=78;ratt[xr,yr]:=0;ara[xr,yr]:=0;end;
booom(xr,yr);
{NA TEBE PO LBU !}
ho:=0;
writ(104,175,3,0,ho);
end;
end;
{THAT's for super weapon}
procedure udar(xr,yr,ppw:byte);
var q1,q2,q3:byte;
lif1,lif2,la3:longint;
label 1,2;
begin
oli:=0;
zass:=0;ppow:=0;spow:=0;lift:=0;
begin
if pravo(popa[xr,yr]-47)=true then begin q1:=ccc1;q2:=0;end else begin q1:=ccc2;q2:=1;end;
oli:=ppw;
if pravo(popa[xr,yr]-47)=true then begin q1:=ccc2;q2:=1;end else begin q1:=ccc1;q2:=0;end;
for a:=1 to 9 do
if popa[xr,yr]=whoisit(q1,a,q2)+47 then I_am_the_soldier(q1,a,ratt[xr,yr]);
la2:=lift;
lif2:=lift*ratt[xr,yr];
lif2:=lif2-la2+ara[xr,yr];
{OOOPPSSa-a-a-a-a-a--a-a-a-a-a-----------a-a-a-aaaaaaaaa-a-a-a--a-a !}
lif2:=lif2-oli;
if lif2 mod la2=0 then ara[xr,yr]:=la2 else ara[xr,yr]:=lif2 mod la2;
ratt[xr,yr]:=lif2 div la2;
if lif2 mod la2>0 then inc(ratt[xr,yr]);
if (lif2<=0) or (ratt[xr,yr]<=0) then begin
if levo(popa[xr,yr]-47)=true then wt[ccc1,l11]:=0 else wt[ccc2,l22]:=0;
popa[xr,yr]:=78;ratt[xr,yr]:=0;ara[xr,yr]:=0;end;
{NA TEBE PO LBU !}
end;
end;
function nearother:boolean;
var kjh:boolean;
begin
nearother:=false;
if levo(popa[xto,yto])=true then kjh:=false;
if pravo(popa[xto,yto])=true then kjh:=true;
if xto<>1 then if popa[xto-1,yto]<78 then if levo(popa[xto-1,yto]-47)=kjh then nearother:=true;
if xto<>9 then if popa[xto+1,yto]<78 then if levo(popa[xto+1,yto]-47)=kjh then nearother:=true;
if yto<>1 then if popa[xto,yto-1]<78 then if levo(popa[xto,yto-1]-47)=kjh then nearother:=true;
if yto<>5 then if popa[xto,yto+1]<78 then if levo(popa[xto,yto+1]-47)=kjh then nearother:=true;
if yto<>1 then if xto<>1 then if popa[xto-1,yto-1]<78 then
if levo(popa[xto-1,yto-1]-47)=kjh then nearother:=true;
if yto<>1 then if xto<>9 then if popa[xto+1,yto-1]<78 then
if levo(popa[xto+1,yto-1]-47)=kjh then nearother:=true;
if yto<>5 then if xto<>1 then if popa[xto-1,yto+1]<78 then
if levo(popa[xto-1,yto+1]-47)=kjh then nearother:=true;
if yto<>5 then if xto<>9 then if popa[xto+1,yto+1]<78 then
if levo(popa[xto+1,yto+1]-47)=kjh then nearother:=true;
end;
function weapon(xw,yw:byte):byte;
begin
if (xw=1) and (yw=1) then weapon:=1;
if (xw=2) and (yw=1) then weapon:=2;
if (xw=3) and (yw=1) then weapon:=3;
if (xw=4) and (yw=1) then weapon:=5;
if (xw=1) and (yw=2) then weapon:=4;
if (xw=2) and (yw=2) then weapon:=6;
if (xw=3) and (yw=2) then weapon:=7;
if (xw=4) and (yw=2) then weapon:=8;
if (xw=1) and (yw=3) then weapon:=9;
if (xw=2) and (yw=3) then weapon:=10;
if (xw=3) and (yw=3) then weapon:=11;
if (xw=4) and (yw=3) then weapon:=12;
if (xw=1) and (yw=4)