level 4
骑小猪追星星
楼主
uses crt; type list=record ty,ax:integer; end; xy=record bx,by:integer; end; l1=array[1..4,1..5]of char; l2=array[1..5,1..6]of char; l3=array[1..8,1..5]of char; const my:l1=(('0','0','A','0','0'), ('A','0','H','0','A'), ('b','H','H','H','d'), ('0','T','U','T','0')); pl:l3=(('0','H','0','H','0'), ('p','H','I','H','q'), ('0','H','X','H','0'), ('0','V','0','V','0'), ('0','H','H','H','0'), ('0','H','O','H','0'), ('0','H','H','H','0'), ('0','0','V','0','0')); boss:l2=(('0','T','H','H','T','0'), ('X','H','I','I','H','X'), ('X','H','X','X','H','X'), ('H','0','H','H','0','H'), ('V','0','V','V','0','V')); var ix,hp,bshp,box,i,j,k,t,sum,every:integer; enlist:array[1..30]of list; ch:char; nowen:array[1..3]of list; bom,boe:array[1..25]of xy; procedure myij(x:integer); begin for k:=1 to 4 do begin if x>=2 then gotoxy(x-1,21+k) else gotoxy(x,21+k); write(' '); for t:=1 to 5 do if my[k,t]<>'0' then write(my[k,t]) else write(' '); if x+4<80 then write(' '); end; end; procedure now(enemy:integer); begin gotoxy(1,1); delline; gotoxy(1,1); insline; gotoxy(1,1); textcolor(black); write(' Hp:',hp,' Remain enemy:',enemy,' Boss Hp:',bshp); textcolor(red); end; function hiten(s:integer):integer; begin hiten:=0; for t:=1 to 3 do if (bom[s].by<=6)and(bom[s].bx-nowen[t].ax>=0) and(bom[s].bx-nowen[t].ax<=4)then hiten:=t; end; function hitmy(s:integer):boolean; begin hitmy:=false; if (boe[s].by>=21)and(boe[s].bx-ix>=0) and(boe[s].bx-ix<=4)then hitmy:=true; end; function hitbo(s:integer):boolean; begin hitbo:=false; if (bom[s].by<=7)and(bom[s].bx-box>=0) and(bom[s].bx-box<=5)then hitbo:=true; end; procedure clear(s:integer); begin for t:=1 to 4 do begin gotoxy(nowen[s].ax,t+1); write(' '); end; end; procedure win; begin clrscr; gotoxy(28,12); writeln('Congratulations,You win!'); write(' Press Enter to exit...'); readln; halt; end; procedure plij(s,x:integer); begin for k:=1 to 4 do begin if x>=2 then gotoxy(x-1,1+k) else gotoxy(x,1+k); write(' '); for t:=1 to 5 do if pl[s+k-1,t]<>'0' then write(pl[s+k-1,t]) else write(' '); if x+4<80 then write(' '); end; end; procedure lost; begin clrscr; gotoxy(32,12); writeln('Sorry,You lost!'); write(' Press Enter to exit...'); readln;
2008年02月28日 04点02分
1