-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
' Oh Rats! v1.0 | ||
#DEFINE O(V) FOR Y=1 TO E:FOR X=1 TO W:V:NEXT:NEXT | ||
#DEFINE N RND | ||
#DEFINE T THEN | ||
#DEFINE EI END IF | ||
#DEFINE C CASE | ||
#DEFINE 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Oh Rats! | ||
|
||
Try to stay alive as long as possible amidst a horde of ravenous rats. These | ||
rats will stop at nothing to take a bite out of you, even resorting to | ||
cannibalism if the situation is right. Your only hope is to stomp on them | ||
before they get you. | ||
|
||
Use the number pad to move around in the 4 cardinal directions. The rats have | ||
the added ability to move in 8 directions, but their movements are very | ||
predictable. Pressing 5 will descend down stairs to the next level, where even | ||
more rats are waiting for your tasty flesh. Every hit from a rat will take | ||
away 1 HP, and the rat, now gnawing on a chuck of your flesh, will no longer be | ||
a threat and will disappear from the view. If you move onto a rat, you will | ||
kill it, increase your score, and the rat will disappear. |