17
THE ASIMOVIAN LISTING

Remember, this program is based on the first, unelaborated version of WEREWOLVES AND WANDERER. You can simply load up the very first program, and then work through it-section by section-to create the new program.

Note that in all cases FOOD is changed to OXY, AXE becomes ION, SWORD is changed to LASER, and AMULET becomes TRANSPORTER. The command "B" (related to your oxygen use) has been added to your vocabulary.

10 REM AFTERMATH OF THE ASIMOVIAN DISASTER
20 GOSUB 2600:REM INITIALISE
30 GOSUB 160
35 IF RO=13 THEN QQ=QQ+1:IF QQ=2 THEN 1385
40 GOTO 30
150 **************************
160 REM MAJOR HANDLING ROUTINE
170 STRENGTH = STRENGTH - 5
180 IF STRENGTH<10 THEN PRINT "WARNING,
CAPTAIN ";NS;", YOUR
STRENGTH":PRINT "IS RUNNING
LOW":PRINT"YOU NEED AN OXYGEN
BOOST"
190 IF STRENGTH < 1 THEN 2300:REM DEATH
200 TALLY = TALLY + 1
210 PRINT "CAPTAIN ";N$;", YOUR
STRENGTH IS" ;STRENGTH
220 IF WEALTH > 0 THEN PRINT "YOU HAVE
$";WEALTH;"IN SOLARIAN CREDITS"
230 IF OXY>0 THEN PRINT "YOUR RESERVE
TANKS HOLD";OXY;"UNITS OF OXYGEN"
240 IF SUIT = 1 THEN PRINT "YOU ARE WEARING
BATTLE ARMOR"
250 IF ION=0 AND LASER=0 AND TRANSPORTER=0 THEN
320
260 PRINT "YOU ARE CARRYING ";
270 IF ION=1 THEN PRINT "AN ION GUN ";
280 IF LASER=1 THEN PRINT "A LASER ";
290 IF LASER + ION > 0 AND TRANSPORTER=1 THEN
PRINT "AND ";
300 IF TRANSPORTER=1 THEN PRINT "THE MATTER
TRANSPORTER"
310 PRINT
320 IF LIGHT=0 THEN PRINT "IT IS TOO DARK TO
SEE ANYTHING"
330 IF LIGHT=1 THEN GOSUB 990:REM ROOM DESCRIPTION
340 K = A(RO,7):REM K IS SET TO CONTENTS OF ROOM
350 IF K=0 THEN 440:REM ROOM IS EMPTY
360 IF K>9 THEN PRINT "THERE IS TREASURE
HERE WORTH $";K:GOTO 440
370 PRINT:PRINT:PRINT "DANGER...THERE IS
DANGER HERE....":GOSUB 3520
380 IF K=-1 THEN M$="BERSERK
ANDROID":FF=5
390 IF K=-2 THEN M$="DERANGED
DEL-FIEVIAN":FF=10
400 IF K=-3 THEN M$="RAMPAGING ROBOTIC
DEVICE":FF=15
410 IF K=-4 THEN M$="SNIGGERING GREEN
ALIEN":FF=20
420 PRINT:PRINT "IT IS A ";M$
430 PRINT:PRINT "YOUR PERSONAL DANGER METER
REGISTERS";FF;"!!"
440 GOSUB 3520
450 PRINT:PRINT:PRINT "WHAT DO YOU WANT TO
DO";
460 INPUT A$:A$=LEFT$(A$,1)
470 IF K<0 AND A$<>"F" AND
A$<>"R" THEN 460
480 PRINT:PRINT:PRINT
"------------------------------------":PRINT
490 IF A$="Q" THEN 120
500 IF A$="N" AND A(RO,1)=0 THEN PRINT
"NO EXIT THAT WAY":GOTO 440
510 IF A$="S" AND A(RO,2)=0 THEN PRINT
"THERE IS NO EXIT SOUTH":GOTO 440
520 IF A$="E" AND A(RO,3)=0 THEN PRINT
"YOU CANNOT GO IN THAT DIRECTION":GOTO
440
530 IF A$="W" AND A(RO,4)=0 THEN PRINT
"YOU CANNOT MOVE THROUGH SOLID
WALLS":GOTO 440
540 IF A$="U" AND A(RO,5)=0 THEN PRINT
"THERE IS NO WAY UP FROM HERE":GOTO 440
550 IF A$="D" AND A(RO,6)=0 THEN PRINT
"YOU CANNOT DESCEND FROM HERE":GOTO 440
560 IF A$="R" AND RND(1)>.7 THEN 2420
570 IF A$="R" THEN K=0:PRINT "WHICH
WAY DO YOU WANT TO RUN";:GOTO 460
580 IF A$="F" AND A(RO,7)>-1 THEN
PRINT "THERE IS NOTHING TO FIGHT
HERE":GOTO 440
590 IF A$="I" THEN GOSUB 3010:RETURN
600 IF A$="B" AND OXY=0 THEN PRINT
"YOU HAVE NO OXYGEN":GOTO 440
610 IF A$="P" THEN GOSUB 2350:RETURN
620 IF A$="F" THEN 730
625 IF A$='M" AND RO=13 THEN PRINT "THAT
IS NOT POSSIBLE":GOSUB 3520:GOTO 1150
630 IF A$="M" THEN RO=INT(RND(1)*19)+1:
IF RO=6 OR RO=11 THEN 630 ELSE 710
640 IF A$="B" THEN GOSUB 2480:RETURN
650 IF A$="N" THEN RO=A(RO,1)
660 IF A$="S" THEN RO=A(RO,2)
670 IF A$="E" THEN RO=A(RO,3)
680 IF A$="W" THEN RO=A(RO,4)
690 IF A$="U" THEN RO=A(RO,5)
700 IF A$="D" THEN RO=A(RO,6)
710 RETURN
720 REM **************************
730 REM FIGHT
740 IF INKEY$<>"" THEN 740
750 PRINT "PRESS ANY KEY TO FIGHT"
760 IF INKEY$="" THEN 760
770 IF SUIT=1 THEN PRINT "YOUR SPACE-ARMOR
INCREASES YOUR CHANCE OF
SUCCESS":FF=3*(INT(FF/4)):GOSUB 3520
780 CLS:FOR J=1 TO INT(RND(1)*6)+1:PRINT
"*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*":NEXT
J
785 PRINT
790 IF ION=0 AND LASER=0 THEN PRINT "YOU HAVE
NO WEAPONS":PRINT "YOU MUST FIGHT WITH
BARE HANDS":FF=INT(FF + FF/5):GOTO 870
800 IF ION=1 AND LASER=0 THEN PRINT "YOU HAVE
ONLY THE ION GUN TO FIGHT
WITH":FF=4*INT(FF/5):GOTO 870
810 IF ION=0 AND LASER=1 THEN PRINT "YOU MUST
FIGHT WITH YOUR LASER":FF=3*INT(FF/4):GOTO
870
820 INPUT "WHICH WEAPON? 1 - ION GUN, 2 -
LASER";Z
830 IF Z<1 OR Z>2 THEN 820
840 IF Z=1 THEN FF=4*INT(FF/5)
850 IF Z=2 THEN FF=3*INT(FF/4)
860 REM *************************
870 REM THE BATTLE
880 PRINT:PRINT
890 IF RND(1)>.5 THEN PRINT M$;"
ATTACKS" ELSE PRINT "YOU ATTACK"
900 GOSUB 3520
910 IF RND(1)>.5 THEN PRINT:PRINT "YOU GET
THE ";M$;" A GLANCING
BLOW":FF=INT(5*FF/6)
920 GOSUB 3520
930 IF RND(1)>.5 THEN PRINT:PRINT "THE
" ;M$;" WOUNDS
YOU!":STRENGTH=STRENGTH-5
940 IF RND(1)>.35 THEN 890
950 IF RND(1)*16>FF THEN PRINT:PRINT "AND
YOU MANAGE TO KILL THE ";M$:MK=MK+1:GOTO 970
960 PRINT:PRINT "THE ";M$;"
SERIOUSLY WOUNDS
YOU":STRENGTH=INT(STRENGTH/2)
970 A(RO,7)=0:GOSUB 3410:PRINT:PRINT:GOSUB
3520:RETURN
980 REM *****************
990 REM ROON DESCRIPTIONS
1000 PRINT:PRINT
"******************************":PRINT:PRINT
1010 ON RO GOSUB 1040,1100,1170,1230,1280,1360,1410,1470,
1540,1620,1700, 1730,1790,1860,1960,2030,2100,2160,2230
1020 RETURN
1030 REM ************
1040 REM ROOM 1
1050 PRINT "YOU ARE IN THE FORMER
RECREATION"
1060 PRINT "CENTER. EQUIPMENT FOR
MUSCLE-TRAINING"
1070 PRINT "IN ZERO GRAVITY LITTERS THE
AREA"
1080 RETURN
1090 REM ************
1100 REM ROOM 2
1110 PRINT "THIS WAS THE REPAIR AND
MAINTENANCE"
1120 PRINT "HOLD OF THE SHIP. YOU CAN ONLY
LEAVE IT"
1130 PRINT "VIA THE GIANT HANGAR DOOR TO THE
WEST"
1150 RETURN
1160 REM ************
1170 REM ROOM 3
1180 PRINT "YOU ARE IN THE WRECKED HOLD OF A
SPACESHIP"
1190 PRINT "THE CAVERNOUS INTERIOR IS
LITTERED WITH"
1200 PRINT "FLOATING WRECKAGE, AS IF FROM
SOME"
1205 PRINT "TERRIBLE EXPLOSION EONS
AGO......"
1210 RETURN
1220 REM ************
1230 REM ROOM 4
1240 IF RND>.6 THEN PRINT "WHAT A SUPERB
SIGHT......."
1242 PRINT "THE VIEW OF THE STARS FROM THIS
OBSERVATION"
1245 PRINT "PLATFORM IS MAGNIFICENT, AS FAR
AS THE EYE"
1246 PRINT "CAN SEE. THE SINGLE EXIT IS BACK
WHERE YOU"
1250 PRINT "CAME FROM"
1260 RETURN
1270 REM ************
1280 REM ROOM 5
1290 PRINT "ACRE UPON ACRE OF DRIED-UP
HYDROPONIC"
1300 PRINT "PLANT BEDS STRETCH AROUND YOU.
ONCE THIS"
1310 PRINT "AREA FED THE THOUSAND ON BOARD
THE SHIP"
1320 IF RND>.5 THEN PRINT "THE SOLAR LAMPS
ARE STILL SHINING"
1330 IF RND>.5 THEN PRINT "A FEW PLANTS
ARE STILL ALIVE TO THE EAST"
1340 RETURN
1350 REM ************
1360 REM ROOM 6
1370 PRINT "YOU ARE FREE. YOU HAVE MADE IT.
YOUR"
1380 PRINT "POD SAILS FREE INTO
SPACE..........."
1385 PRINT "YOUR SCORE WAS";3*TALLY +
5*STRENGTH + 2*WEALTH + 10*OXY + 30*MK
1390 END
1400 REM ************
1410 REM ROOM 7
1420 PRINT "YOU ARE IN THE CREW'S SLEEPING
QUARTERS"
1430 IF RND >.5 THEN PRINT "MOST OF THE
SLEEPING SHELLS ARE EMPTY"
1440 IF RND >.5 THEN PRINT "THE FEW
REMAINING CREW STIR FITFULLY":PRINT "IN
THEIR ENDLESS, DREAMLESS SLEEP"
1445 IF RND>.7 THEN PRINT "THERE ARE EXITS
TO THE NORTH, EAST AND WEST"
1450 RETURN
1460 REM **************
1470 REM ROOM 8
1480 PRINT "THE FORMER PASSENGER SUSPENDED
ANIMATION DORMITORY..."
1490 IF RND>.5 THEN PRINT "PASSENGERS
FLOAT BY AT RANDOM"
1500 IF RND>.5 THEN PRINT "IT IS ENORMOUS,
IT SEEMS TO GO ON FOREVER"
1510 IF RND>.9 THEN PRINT "THE ONLY EXITS
ARE TO THE WEST AND SOUTH"
1520 RETURN
1530 REM **************
1540 REM ROOM 9
1550 PRINT "THIS IS THE SHIP'S HOSPITAL,
WHITE AND STERILE."
1560 PRINT "A BUZZING SOUND, AND A STRANGE
WARMTH COME FROM"
1570 PRINT "THE SOUTH, WHILE A CHILL IS FELT
TO THE NORTH"
1600 RETURN
1610 REM ************************
1620 REM ROOM 10
1630 PRINT "FOOD FOR ALL THE CREW WAS
PREPARED IN THIS"
1640 PRINT "GALLEY. THE REMAINS FROM
PREPARATIONS OF"
1650 PRINT "FINAL MEAL CAN BE SEEN. DOORS
LEAVE THE"
1660 PRINT "GALLEY TO THE SOUTH AND TO THE
WEST"
1680 RETURN
1690 REM *****************
1700 REM ROOM 11
1701 PRINT "AHA...THAT LOOKS LIKE THE SPACE
POD"
1702 PRINT "NOW, AND ITS OUTSIDE DIALS"
1703 PRINT "INDICATE IT IS STILL IN PERFECT
CONDITION."
1710 RETURN
1720 REM ****************
1730 REM ROOM 12
1740 IF RND>.5 THEN PRINT "THIS IS THE
SHIP'S MAIN NAVIGATION ROOM"
1750 PRINT "STRANGE MACHINERY LINES THE
WALLS, WHILE"
1760 PRINT "OVERHEAD, A HOLOGRAPHIC STAR MAP
SLOWLY TURNS"
1765 PRINT "BY THE FLICKERING GREEN LIGHT YOU
CAN JUST"
1766 PRINT "MAKE OUT EXITS":IF RND>.8
THEN PRINT "TO THE SOUTH AND TO THE
EAST"
1770 RETURN
1780 REM ****************
1790 REM ROOM 13
1800 IF RND>.5 THEN PRINT "YOUR BODY
TWISTS AND BURNS..."
1810 PRINT "YOU ARE CAUGHT IN A DEADLY
RADIATION FIELD"
1820 PRINT "SLOWLY YOU REALISE THIS IS THE
END"
1830 IF RND>.5 THEN PRINT "NO MATTER WHAT
YOU DO"
1835 IF RND>.5 THEN PRINT "YOU ARE DOOMED
TO DIE HERE"
1840 RETURN
1850 REM ****************
1860 REM ROOM 14
1870 PRINT "THIS IS THE POWER CENTER OF THE
SHIP"
1880 PRINT "THE CHARACTERISTIC BLUE METAL
LIGHT"
1890 PRINT "OF THE STILL-FUNCTIONING ION
DRIVE"
1900 PRINT "FILLS THE ENGINE ROOM. THROUGH
THE"
1910 PRINT "HAZE YOU CAN SEE DOORS"
1920 IF RND>.9 THEN PRINT "TO THE NORTH
AND WEST"
1930 IF RND>.6 THEN PRINT "A SHAFT LEADS
DOWNWARDS TO THE REPAIR CENTER"
1940 RETURN
1950 REM ***************
1960 REM ROOM 15
1970 PRINT "YOU ARE STANDING IN THE ANDROID
STORAGE HOLD"
1980 PRINT "ROW UPON ROW OF METAL MEN STAND
STIFFLY AT"
1990 PRINT "ATTENTION, AWAITING THE
DISTINCTIVE SOUND OF"
2000 PRINT "THEIR LONG-DEAD CAPTAIN TO SET
THEM INTO MOTION"
2010 PRINT "A LIGHT COMES FROM THE WEST AND
THROUGH THE"
2015 PRINT "GRAVITY WELL SET INTO THE
FLOOR"
2016 RETURN
2020 REM ****************
2030 REM ROOM 16
2040 PRINT "ANOTHER CAVERNOUS, SEEMINGLY
ENDLESS HOLD,"
2050 PRINT "THIS ONE CRAMMED WITH GOODS FOR
TRADING..."
2060 IF RND>.7 THEN PRINT "RARE METALS AND
VENUSIAN SCULPTURES"
2065 IF RND>.8 THEN PRINT "PRESERVED
SCALAPIAN DESERT FISH"
2066 IF RND>.7 THEN PRINT "FLASHING EBONY
SCITH STONES FROM XARIAX IV"
2067 IF RND>.8 THEN PRINT "AWESOME TRADER
ANT EFIGIES FROM THE QWERTYIOPIAN EMPIRE"
2070 IF RND>.9 THEN PRINT "THE LIGHT IS
STRONGER TO THE WEST"
2080 RETURN
2090 REM **************
2100 REM ROOM 17
2110 PRINT "A STARK, METALLIC ROOM, REEKING
OF LUBRICANTS"
2120 PRINT "WEAPONS LINE THE WALL, RANK UPON
RANK. EXITS FOR"
2130 PRINT "SOLDIER ANDROIDS ARE TO THE NORTH
AND THE EAST"
2140 RETURN
2150 REM ***************
2160 REM ROOM 18
2170 PRINT "ABOVE YOU IS THE GRAVITY SHAFT
LEADING TO"
2180 PRINT "THE ENGINE ROOM. THIS IS THE SHIP
REPAIR"
2190 PRINT "CENTER WITH EMERGENCY EXITS TO
THE SOLDIER"
2200 PRINT "ANDROIDS STORAGE AND TO THE
TRADING GOODS HOLD"
2210 RETURN
2220 REM *************
2230 REM ROOM 19
2240 PRINT "YOU'VE STUMBLED ON THE SECRET
COMMAND CENTER"
2250 PRINT "WHERE SCREENS BRING VIEWS FROM
ALL AROUND"
2260 PRINT "THE SHIP. THERE ARE TWO
EXITS........"
2270 IF RND>.5 THEN PRINT "ONE OF WHICH IS
THE GRAVITY WELL" ELSE PRINT "ONE OF
WHICH LEADS TO THE GOODS HOLD"
2280 RETURN
2290 REM **************
2300 REM DEAD END
2310 PRINT "YOU HAVE RUN OUT OF
OXYGEN...."
2320 GOSUB 3520
2330 GOTO 1385
2340 REM **************
2350 REM PICK UP TREASURE
2360 IF A(RO,7)<10 THEN PRINT "THERE IS
NOTHING OF VALUE HERE":GOSUB 3520:RETURN
2370 IF LIGHT=0 THEN PRINT "YOU CANNOT SEE
WHERE IT IS":GOSUB 3520:RETURN
2380 WEALTH=WEALTH + A(RO,7)
2390 A(RO,7)=0
2400 RETURN
2410 REM **************
2420 REM UNSUCCESSFUL ATTEMPT TO RUN
2430 PRINT "NO YOU MUST STAND AND FIGHT"
2440 A$="F"
2450 GOSUB 3520
2460 GOTO 620
2470 REM **************
2480 REM REPLENISH OXYGEN
2490 CLS
2500 IF OXY<1 THEN RETURN
2510 PRINT "YOU HAVE";OXY;"UNITS OF
OXYGEN LEFT"
2520 PRINT "HOW MANY DO YOU WANT TO ADD TO
YOUR TANKS";
2530 INPUT Z
2540 IF Z>OXY THEN 2530
2550 OXY=INT(OXY-Z)
2560 STRENGTH=INT(STRENGTH+5*Z)
2570 GOSUB 3410:CLS
2580 RETURN
2590 REM ***********
2600 REM INITIALISE
2610 CLS
2620 STRENGTH=INT(RND(1)*50) + 75
2630 WEALTH=INT(RND(1)*50) + 50
2640 OXY=INT(RND(1)*16)
2650 TALLY=0
2655 QQ=0
2660 MK=0:REM NO. OF ANDROIDS/ALIENS DESTROYED
2670 REM **************
2680 REM SET UP SPACE SHIP
2690 DIM A(19,7)
2700 FOR B=1 TO 19
2710 FOR C=1 TO 7
2720 READ A(B,C)
2730 NEXT C
2740 NEXT B
2750 INPUT "WHAT IS YOUR NAME, SPACE
HERO";N$
2760 CLS
2770 RO=3:REM STARTING POSITION (RO=ROOM NUMBER)
2780 LASER=0
2790 TRANSPORTER=0
2800 ION=0
2810 SUIT=0
2820 LIGHT=0
2830 REM **************
2840 REM ALLOT VALUABLES
2850 FOR J = 1 TO 7
2860 M=INT(RND(1)*19)+1
2870 IF M=6 OR M=11 OR RO=13 OR A(M,7)<>0
THEN 2860
2880 A(M,7)=INT(RND(1)*100)+10
2890 NEXT J
2900 REM **************
2910 REM ALLOT ALIENS/ANDROIDS
2915 FOR T=1 TO 2
2920 FOR J = 1 TO 4
2930 M=INT(RND(1)*18)+1
2940 IF M=6 OR M=11 OR M=13 OR A(M,7)<>0
THEN 2930
2950 A(M,7)= -J
2960 NEXT J
2965 NEXT T
2990 RETURN
3000 REM ****************************
3010 REM SUPPLY ANDROID
3020 PRINT "A SUPPLY ANDROID HAS
ARRIVED"
3030 GOSUB 3260
3040 IF WEALTH<.1 THEN Z=0:GOTO 3130
3050 PRINT "YOU CAN BUY 1 - NUCLEONIC LIGHT ($15)"
3060 PRINT "            2 - ION GUN ($10)"
3070 PRINT "            3 - LASER ($20)"
3080 PRINT "            4 - OXYGEN ($2 PER UNIT)"
3090 PRINT "            5 - MATTER TRANSPORTER ($30)"
3100 PRINT "            6 - COMBAT SUIT ($50)"
3110 PRINT "            0 - TO CONTINUE EXPLORATION"
3120 INPUT "ENTER NO. OF ITEM
REQUIRED";Z
3130 IF Z=0 THEN CLS:RETURN
3140 IF Z=1 THEN LIGHT=1:WEALTH=WEALTH-15
3150 IF Z=2 THEN ION=1:WEALTH=WEALTH-10
3160 IF Z=3 THEN LASER=1:WEALTH=WEALTH-20
3170 IF Z=5 THEN TRANSPORTER=1:WEALTH= WEALTH-30
3180 IF Z=6 THEN SUIT=1:WEALTH=WEALTH-50
3190 IF WEALTH<0 THEN PRINT "YOU HAVE TRIED
TO CHEAT ME!":WEALTH=0:SUIT=0:LIGHT=0:ION=0:LASER=0:
TRANSPORTER=0:OXY=INT(OXY/4):GOSUB 3520
3200 IF Z<>4 THEN 3030
3210 INPUT "HOW MANY UNITS OF OXYGEN";Q:Q=INT(Q)
3220 IF 2*Q>WEALTH THEN PRINT "YOU HAVEN'T
GOT ENOUGH MONEY":GOTO 3210
3230 OXY=OXY+Q
3240 WEALTH=WEALTH-2*Q
3250 GOTO 3030
3260 IF WEALTH>0 THEN PRINT:PRINT:PRINT
"YOU HAVE $";WEALTH;"IN SOLARIAN
CREDITS"
3270 IF WEALTH=0 THEN PRINT "YOU HAVE NO
SOLARIAN CREDITS LEFT":GOSUB 3520:RETURN
3280 FOR J=1 TO 4:PRINT:NEXT J
3290 RETURN
3300 REM ******************
3310 DATA 0,5,2,0,0,0,0:REM ROOM 1
3320 DATA 0,0,0,1,0,0,0:REM ROOM 2
3330 DATA 3,7,4,3,3,3,0:REM ROOM 3
3340 DATA 0,0,0,3,0,0,0:REM ROOM 4
3350 DATA 1,5,7,5,5,5,0:REM ROOM 5
3360 DATA 6,6,6,6,6,6,0: REM ROOM 6
3370 DATA 3,0,8,5,0,0,0: REM ROOM 7
3380 DATA 8,12,8,7,8,8,0: REM ROOM 8
3390 DATA 11,13,10,0,0,0,0:REM ROOM 9
3400 DATA 0,14,0,9,0,0,0:REM ROOM 10
3410 DATA 9,6,6,6,6,6,0:REM ROOM 11
3420 DATA 8,16,19,0,0,0,0:REM ROOM 12
3430 DATA 13,0,0,13,0,13,0:REM ROOM 13
3440 DATA 10,0,15,17,0,18,0:REM ROOM 14
3450 DATA 0,0,0,14,0,19,0:REM ROOM 15
3460 DATA 12,16,16,18,16,16,0:REM ROOM 16
3470 DATA 14,0,18,0,0,0,0:REM ROOM 17
3480 DATA 0,0,16,17,14,0,0:REM ROOM 18
3490 DATA 0,12,0,0,15,0,0:REM ROOM 19
3500 REM ******************
3510 REM ADJUST LOOP BELOW TO YOUR SYSTEM
3520 FOR T=1 TO 900:NEXT T
3530 RETURN


Return to Table of Contents | Previous Chapter | Next Chapter