diff --git a/basic/rpg.bas b/basic/rpg.bas index e6d95c0..9666b5b 100644 --- a/basic/rpg.bas +++ b/basic/rpg.bas @@ -1,30 +1,61 @@ -10 ' -20 ' MY BIG RPG PROJECT -30 ' by @FranGallegoBR -40 ' July 2019 -50 ' - -100 ' INITIALIZE -110 DEFINT a-z -120 energy=100:attack=30:defense=15 -130 energyen=90:attacken=20:defenseen=10:a$="" - -200 ' PRESENTATION -210 MODE 1:PRINT"RPG GAME" -220 PRINT"PRESS ENTER TO START" -230 INPUT"",a$ - -300 ' PRINT GAME STATUS -310 CLS -320 PRINT"PLAYER ["energy"](a"attack")(d"defense")" -330 PRINT"ENEMY ["energyen"](a"attacken")(d"defenseen")" - -400 ' PLAYER ACTIONS -410 INPUT"ACTION";a$ -420 IF a$="A" THEN energyen=energyen-attack:GOTO 500 -430 IF a$="D" THEN energy=energy+defense:GOTO 500 -440 GOTO 400 - -500 ' ENEMY ACTIONS -510 IF RND>0.25 THEN energy=energy-attacken:GOTO 300 -520 energyen=energyen+defenseen:GOTO 300 +1 ' +1 ' MY BIG RPG PROJECT +1 ' by @FranGallegoBR +1 ' July 2019 +1 ' + +1 ' INITIALIZE +100 DEFINT a-z +110 e=100:a=30:d=15:x=5 +120 ee=90:ea=20:ed=10:ex=7:a$="" + +1 ' PRESENTATION +200 MODE 1:PRINT"RPG GAME" +210 GOSUB 10000 + +1 ' PRINT GAME STATUS +300 WHILE 1:CLS +310 PRINT"PLAYER ["e"](a"a")(d"d")" +320 PRINT"ENEMY ["ee"](a"ea")(d"ed")" +330 LOCATE x,6:PRINT CHR$(249) +340 LOCATE ex,6:PRINT CHR$(225) +350 PRINT STRING$(10,143):PRINT STRING$(10,127) + +1 ' PLAYER ACTIONS +400 INPUT"ACTION";a$ +410 IF a$="O" THEN GOSUB 1000:GOTO 500 +420 IF a$="P" THEN GOSUB 1100:GOTO 500 +430 IF a$="D" THEN GOSUB 1400:GOTO 500 +450 GOTO 400 + +1 ' ENEMY ACTIONS +500 IF ex=x+1THEN GOSUB 1200 ELSE GOSUB 1300 + +900 GOSUB 10000:WEND + +1 ' MOVE PLAYER LEFT +1000 x=x-1:IF x=0THEN x=1 +1010 RETURN + +1 ' MOVE PLAYER RIGHT +1100 x=x+1:IF x=ex THEN x=x-1:ee=ee-a:PRINT"PLAYER ATTACKS WITH FORCE:"a +1110 RETURN + +1 ' ENEMY ATTACKS +1200 e=e-ea:PRINT"ENEMY ATTACKS WITH FORCE:"ea +1210 RETURN + +1 ' ENEMY DEFENDS +1300 ee=ee+ed:PRINT"ENEMY RELOADS:"ed +1310 RETURN + +1 ' PLAYER DEFENDS +1400 e=e+d:PRINT"PLAYER RELOADS:"d +1410 RETURN + +1 ' PRESS ENTER TO CONTINUE +10000 PRINT"PRESS ENTER TO CONTINUE" +10010 INPUT"",a$ +10020 RETURN + +1