diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..442b78a --- /dev/null +++ b/changelog.txt @@ -0,0 +1,11 @@ +1.0.2 2008-08-09 +* Fixed only known issue (There was a small possibility that there wouldn't be +a path from @ to the stairs. Now there will always be a path) +* Changed rat color to gray +* Changed starting HP to 50 + +1.0.1 2008-08-09 +* Reduced code to 934 bytes + +1.0.0 2008-08-08 +* Initial Version \ No newline at end of file diff --git a/ohrats.bas b/ohrats.bas index 7c1802a..4d9eadc 100644 --- a/ohrats.bas +++ b/ohrats.bas @@ -5,5 +5,7 @@ D T THEN D EI END IF D C CASE D Z(V) COLOR(V,0) -SCREEN 9:RANDOMIZE TIMER:DIM SHARED AS SHORT W=80,E=23,A,B,Y,X,M(W,E),I,J,L=0,H=100,Q=0,F=46,S=62,P,R=114,G=0:SUB NL:O(M(X,Y)=F):O(IF X=1 OR X=W OR Y=1 OR Y=E OR INT(N*20)=1 T M(X,Y)=35:EI):B=L+10+N*10:FOR A=1 TO B:M(2+N*(W-3),2+N*(E-3))=R:NEXT:M(2+N*(W-3),2+N*(E-3))=S:I=2+N*(W-3):J=2+N*(E-3):L+=1:END SUB:SUB HK:A=I:B=J:SELECT C GETKEY:C 53 AND M(A,B)=S:NL:RETURN:C 52:A-=1:C 56:B-=1:C 54:A+=1:C 50:B+=1:C 27:Q=1:END SELECT:P=M(A,B):IF(P=F OR P=S OR P=R)T I=A:J=B:IF P=R T M(A,B)=F:G+=L EI:O(IF M(X,Y)=R T:A=(X+SGN(I-X)):B=(Y+SGN(J-Y)):P=M(A,B):IF P=F OR P=R T:M(X,Y)=F:M(A,B)=5:IF A=I AND B=J T H-=1:M(A,B)=F EI:EI:EI):O(IF M(X,Y)=5 T M(X,Y)=R:EI):IF H<=0 T Q=1 -END SUB:NL:DO:CLS:O(P=M(X,Y):IF P=R T Z(14) ELSE Z(15):EI:? CHR(P);):? "HP";H;" LVL";L;" SCORE";G:Z(9):LOCATE J,I:? "@":Z(15):HK:LOOP UNTIL Q=1:CLS:? "Level";L;" Score";G:GETKEY \ No newline at end of file +D K M(X,Y) +D M3(V) 2+N*(V-3) +SCREEN 9:RANDOMIZE TIMER:DIM SHARED AS SHORT W=80,E=23,A,B,Y,X,M(W,E),I,J,L=0,H=50,Q=0,F=46,S=62,P,R=114,G=0:SUB NL:O(K=F):O(IF X=1 OR X=W OR Y=1 OR Y=E OR INT(N*20)=1 T K=35:EI):B=L+10+N*10:FOR A=1 TO B:M(M3(W),M3(E))=R:NEXT:A=M3(W):B=M3(E):M(A,B)=S:I=M3(W):J=M3(E):O(IF X>1 AND Y>1 AND XA AND K=35 AND(X=I OR Y=B)T:K=F:EI):L+=1:END SUB:SUB HK:A=I:B=J:SELECT C GETKEY:C 53 AND M(A,B)=S:NL:RETURN:C 52:A-=1:C 56:B-=1:C 54:A+=1:C 50:B+=1:C 27:Q=1:END SELECT:P=M(A,B):IF(P=F OR P=S OR P=R)T I=A:J=B:IF P=R T M(A,B)=F:G+=L EI:O(IF K=R T:A=(X+SGN(I-X)):B=(Y+SGN(J-Y)):P=M(A,B):IF P=F OR P=R T:K=F:M(A,B)=5:IF A=I AND B=J T H-=1:M(A,B)=F EI:EI:EI):O(IF K=5 T K=R:EI):IF H<=0 T Q=1 +END SUB:NL:DO:CLS:O(P=K:A=IIF(P=R,Z(7),Z(15)):? CHR(P);):? "HP";H;" LVL";L;" SCORE";G:Z(9):LOCATE J,I:? "@":Z(15):HK:LOOP UNTIL Q=1:CLS:? "Level";L;" Score";G:GETKEY \ No newline at end of file