10  INPUT "ENTER A NUMBER";I3
20  PRINT "SWORDS AND SORCERY"
30  REM  FROM AUG 1978 KILOBAUD MAGAZINE
40  PRINT 
50  PRINT "You are a gallant but broke hero attempting to "
60  PRINT "rescue an elfin princess from the Necromancer's"
70  PRINT "dungeon located within a dark forest.  In order to"
80  PRINT "accomplish the rescue you must pass safely thru"
90  PRINT "the forest to the dungeon, release the princess"
100  PRINT "and escort her to safety.  You must also pick up"
110  PRINT "enough gold along the way to pay your creditors."
120  PRINT 
130  PRINT "GOOD LUCK, You'll need it!"
140  GOSUB 2680
150  GOSUB 1610
160  IF RND(I3)>.7 THEN 240
170  INPUT "A DRYAD WISHES TO GUIDE YOU. WILL YOU LET HER";A$
180  IF LEFT$(A$,1)="Y" THEN 230
190  F1=0
200  IF RND(1)<.2 THEN 240
210  GOSUB 1550
220  GOTO 240
230  F1=1
240  W1=F1
250  PRINT "There are three paths into the Forest."
260  PRINT "ONE IS CORRECT."
270  C1=INT(3*RND(1)+1)
280  Y1=INT(3*RND(1)+1)
290  IF RND(1)<.4 THEN 310
300  Y1=C1
310  INPUT "DO YOU WISH TO CONSULT AN ORACLE";A$
320  IF LEFT$(A$,1)="N" THEN 460
330  INPUT "HOW MANY MAIDENS SHOULD BE SACRIFICED";V1
340  V1=INT(V1)
350  IF V1>2*RND(1) THEN 380
360  PRINT "THE ORACLE IS OFFENDED"
370  C2=C2-1
380  IF V1*F1<10*RND(1) THEN 400
390  GOSUB 1550
400  IF C2<0 THEN 450
410  IF RND(1)<.4-(V1/10) THEN 450
420  PRINT "THE ORACLE SAYS PATH";Y1
430  P1=1
440  GOTO 460
450  PRINT "THE SIGNS ARE UNCLEAR."
460  INPUT "CHOOSE PATH 1,2 OR 3";X1
470  X1=INT(X1)
480  IF X1>3 THEN 460
490  IF X1<1 THEN 460
500  L1=100*(RND(1)+1)
510  IF X1=C1 THEN 540
520  C2=C2-2
530  L1=L1+50
540  C2=C2+1
550  T1=0
560  C2=C2+.5*RND(1)+F1+P1+.2*V1*SGN(5.1-V1)
570  IF C2>1 THEN 610
580  IF C2>-1 THEN 620
590  PRINT "A Black Cat has crossed your path."
600  GOTO 620
610  PRINT "You have chosen well, but"
620  PRINT "Beware.... Many dangers lie ahead."
630  PRINT 
640  R1=0
650  C3=0
660  PRINT "You have come to a fork in the path."
670  C1=INT(2*RND(1)+1)
680  Z1=W1-F1
690  S1=8-Z1-G1/(1+Z1)
700  IF S1>4 THEN 720
710  S1=4
720  IF 3.5*RND(1)<C2 THEN 740
730  L1=L1+1
740  L2=7+20*RND(1)
750  L0=L2
760  IF F1=0 THEN 830
770  INPUT "Do you want to ask the Nymph which one";A$
780  IF LEFT$(A$,1)="N" THEN 830
790  IF RND(1)>.5+C2/50 THEN 820
800  PRINT "She says";C1
810  GOTO 910
820  PRINT "She doesn't know."
830  INPUT "Will you cast lots to decide";A$
840  IF LEFT$(A$,1)="N" THEN 910
850  PRINT "The lot says";
860  IF RND(1)>.5+C2/10 THEN 890
870  X1=C1
880  GOTO 900
890  X1=3-C1
900  PRINT X1
910  INPUT "DO YOU CHOOSE 1 OR 2";X1
920  X1=INT(X1+.0001)
930  IF X1>2 OR X1<1 THEN PRINT "1 OR 2, PLEASE":GOTO 910
940  D0=0
950  IF X1<>C1 THEN 990
960  C2=C2+RND(1)*SGN(.5-RND(1))
970  C3=0
980  GOTO 1010
990  C2=C2-.2
1000  C3=-1
1010  IF T1=0 THEN 1020
1020  L2=L2-S1
1030  S2=S2+S1
1040  I2=I2+1
1050  IF E1<>0 THEN 1100
1060  IF RND(1)>.15+.2*F1 THEN 1100
1070  PRINT "You find an enchanted sword."
1080  C2=C2+.2
1090  E1=1
1100  IF RND(1)-.5*(F1+C3)<.95 THEN 1130
1110  PRINT "SNAKE!!!"
1120  GOSUB 1650
1130  T1=T1+1
1140  IF RND(1)<.8+(C2+C3/30) THEN 1170
1150  GOSUB 2380
1160  PRINT "You travel on ....                       "
1170  IF RND(1)<.95 THEN 1190
1180  GOSUB 3450
1190  IF RND(1)>.03 THEN 1210
1200  GOSUB 2990
1210  P3=0
1220  IF RND(1)<.99+(C2-I2/10)/100 THEN 1240
1230  GOSUB 3290
1240  IF W1=0 THEN 1270
1250  IF RND(1)<.95+(C2+C3)/50 THEN 1270
1260  GOSUB 2710
1270  IF RND(1)<.95 THEN 1310
1280  INPUT "GOLD! How many sacks will you take";X1
1290 IF X1>20 THEN PRINT "Oh, come now!";X1;"sacks??":GOTO 1280
1300  G1=G1+INT(X1)
1310  IF T1<10-2*F1 THEN 1330
1320  GOSUB 1660
1330  IF RND(1)>.05 THEN 1370
1340  PRINT "You meet an escaped slave girl."
1350  W1=W1+1
1360  GOTO 1160
1370  IF L2>0 THEN 1010
1380  L1=L1-L0*.85
1390  IF L1>20 THEN 1410
1400  GOSUB 2110
1410  IF C3<>-1 THEN 660
1420  IF RND(1)<.9 THEN 660
1430  IF RND(1)<.5 THEN 1450
1440  GOSUB 2990
1450  PRINT "DEAD END"
1460  L2=L2+L0
1470  L1=L1+L0
1480  C3=0
1490  PRINT "You must retrace your path."
1500  GOTO 1010
1510  PRINT 
1520  INPUT "Try again";A$
1530  IF LEFT$(A$,1)="Y" THEN 120
1540 GOTO 4210
1550  PRINT "THE NYMPH IS VERY OFFENDED."
1560  PRINT "SHE CURSES YOU AND GOES."
1570  F1=0
1580  W1=0
1590  C2=C2-1
1600  RETURN 
1610  READ D1,S2,D2,D3,X1,V1,F1,C1,C2,D4,F5,E1,F8,G1,I2,P1,P3
1620  RESTORE 
1630  DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1640  RETURN 
1650  PRINT "YOU ARE HURT."
1660  PRINT "You must rest."
1670  IF P3=1 THEN 1690
1680  PRINT "You have gone";S2;"km."
1690  T1=0
1700  GOSUB 2680
1710  D3=D3+1+W1-F1
1720  IF D3<4-W1+F1 THEN 1820
1730  IF D4<>0 THEN 1780
1740  PRINT "You are out of food."
1750  D4=1
1760  C2=C2-RND(1)
1770  GOTO 1820
1780  F5=F5+1
1790  IF F5<2 THEN 1810
1800  PRINT "You have gone";F5;"days without food."
1810  C2=C2-RND(1)+.2*F1
1820  IF RND(1)>1-(I2+F8)/100 THEN 1880
1830  IF F5>7 THEN 1860
1840  PRINT "Time to move on."
1850  RETURN 
1860  PRINT "YOU STARVE TO DEATH."
1870  GOTO 1510
1880  IF P3=1 THEN 1850
1890  PRINT "YOU ARE CAPTURED BY GOBLINS."
1900  IF E1 <> 1 THEN 1990
1910  PRINT "THEY WANT YOUR SWORD."
1920  INPUT "Will you trade it for freedom";A$
1930  IF LEFT$(A$,1)="N" THEN 1990
1940  PRINT "AGREED..."
1950  E1=-.8
1960  IF P3<>1 THEN 1830
1970  PRINT " THEY THROW YOU BACK IN THE PIT."
1980  GOTO 1830
1990  D9=INT(3*RND(1)+1)
2000  IF G1<D9 THEN 2050
2010  PRINT "The Goblin Lord frees you"
2020  PRINT "for ";D9;" bags of Gold."
2030  G1=G1-D9
2040  RETURN 
2050  IF W1>0 THEN 2080
2060  PRINT "YOU ARE ENSLAVED."
2070  GOTO 1510
2080  PRINT "YOU ARE SOLD TO THE SATYRS."
2090  GOSUB 2760
2100  GOTO 1960
2110  IF R1=0 THEN 2130
2120  GOTO 2190
2130  PRINT "You are at the entrance to the Dungeon. There is a guard."
2140  GOSUB 3480
2150  R1=1
2160  W1=W1+1
2170  PRINT "You have released the Princess!"
2180  GOSUB 1660
2190  IF L1>0 THEN 2290
2200  IF R1=1 THEN 2240
2210  IF R1=-2 THEN 2330
2220  PRINT "You have FAILED"
2230  GOTO 2310
2240  PRINT "You made it!!"
2250  PRINT "You are a Hero!"
2260  IF G1<2 THEN 2300
2270  PRINT "You marry the princess."
2280  GOTO 1510
2290  RETURN 
2300  PRINT "Too bad, you are too poor to marry the princess."
2310  PRINT "You live the rest of your life in quiet poverty."
2320  GOTO 1510
2330  PRINT "You are out of the Forest."
2340  PRINT 
2350  PRINT "You let the Princess be taken alive by SATYRS."
2360  PRINT "You are justifiably tortured to death."
2370  GOTO 1510
2380  PRINT "TROLL!"
2390  INPUT "Will you Fight";A$
2400  IF LEFT$(A$,1)="Y" THEN 2430
2410  GOSUB 2570
2420  RETURN 
2430  IF E1=0 THEN 2470
2440  IF RND(1)>.2 THEN 2470
2450  PRINT "The Troll runs."
2460  RETURN 
2470  IF RND(1)+.3*E1>.5 THEN 2530
2480  IF RND(1)>.3 THEN 2510
2490  GOSUB 1650
2500  RETURN 
2510  PRINT "YOU ARE KILLED."
2520  GOTO 1510
2530  PRINT "THE TROLL IS DEAD."
2540  IF RND(1)+.05*E1>.4 THEN 2560
2550  GOSUB 1650
2560  RETURN 
2570  PRINT "RUN!!"
2580  L1=L1+4*S1*(RND(1)-.7)
2590  T1=T1+1
2600  IF RND(1)>.7 THEN 2990
2610  PRINT "You got away that time."
2620  IF G1<2 THEN 2670
2630  IF RND(1)>.3-C2/10 THEN 2670
2640  PRINT "But you dropped a sack of gold."
2650  PRINT 
2660  G1=G1-1
2670  RETURN 
2680  PRINT "                                               "
2690  X1=RND(1)
2700  RETURN 
2710  PRINT "OH NO!  SATYRS."
2720  IF E1<>1 THEN 2760
2730  IF RND(1)<.5 THEN 2760
2740  PRINT "They run from your sword."
2750  RETURN 
2760  PRINT "They will let you go if you fight their champion."
2770  INPUT "Will you";A$
2780  IF LEFT$(A$,1)="N" THEN 2820
2790  GOSUB 3480
2800  IF RND(1)<.2 THEN 2820
2810  RETURN 
2820  PRINT "The Satyrs want the females."
2830  W1=0
2840  F1=0
2850  IF R1<>1 THEN 2870
2860  R1=-2
2870  INPUT "Will you allow this";A$
2880  IF LEFT$(A$,1)="Y" THEN 2910
2890  PRINT "They kill you and take the women."
2900  GOTO 1510
2910  PRINT "The women are taken."
2920  IF RND(1)<.05 THEN 2950
2930  PRINT "They curse you."
2940  C2=-5
2950  IF RND(1)<.3 THEN 2970
2960  RETURN 
2970  PRINT "The Satyrs kill you anyway."
2980  GOTO 1510
2990  PRINT "YOU HAVE FALLEN INTO A PIT!"
3000  P3=1
3010  IF RND(1)>.5 THEN 1650
3020  PRINT "You must escape. Will you try to climb out (1) or"
3030  INPUT "yell for help (2) ";X1
3040  P7=0
3050  IF X1=2 THEN 3170
3060  IF RND(1)<.5-P7/10 THEN 3150
3070  PRINT "You fall while trying to climb."
3080  PRINT 
3090  IF RND(1)>.2 THEN 3110
3100  GOSUB 1650
3110  P7=P7+1
3120  IF P7<5 THEN 3060
3130  PRINT "It's too deep.  Yell for help."
3140  GOTO 3170
3150  PRINT "You're out!"
3160  RETURN 
3170  FOR I=1 TO 5
3180  PRINT "HELP!                                     "
3190  NEXT I
3200  IF RND(1)<.3 THEN 3170
3210  PRINT "A rope has been lowered."
3220  P3=0
3230  Y1=INT(3*RND(1)+.9999)
3240  IF Y1=1 THEN 2380
3250  IF Y1=2 THEN 1880
3260  PRINT "You are rescued by a woman."
3270  W1=W1+1
3280  RETURN 
3290  PRINT "It's the NECROMANCER....."
3300  IF RND(1)>.6 THEN 2570
3310  IF F1<>1 THEN 3350
3320  PRINT "The Nymph goes mad."
3330  F1=0
3340  W1=W1-1
3350  IF E1=1 THEN 3410
3360  IF W1=0 THEN 3380
3370  PRINT "The women are sent to his undead as playthings."
3380  PRINT "You are transformed into a gelded water buffalo"
3390  PRINT "and driven into a pit. Boy, did you lose!"
3400  GOTO 1510
3410  PRINT "He takes your sword."
3420  E1=-1.5
3430  PRINT "You are cast into a pit."
3440  GOTO 3020
3450  PRINT "UGH!  RATS, MILLIONS OF THEM."
3460  GOSUB 2570
3470  RETURN 
3480  W3=2
3490  H1=1
3500  H2=1
3510  W2=1+.3*RND(1)
3520  H3=2+SGN(E1)
3530  PRINT "It's a large troll!"
3540  PRINT "THE BATTLE BEGINS."
3550  PRINT "You circle for position."
3560  PRINT "                                            "
3570  W3=W3-.05
3580  H1=H1-.05
3590  H2=H2-.05
3600  PRINT "He Attacks!"
3610  X1=1+INT(2.9999*RND(1))
3620  IF X1=2 THEN 3660
3630  IF X1=3 THEN 3680
3640  PRINT "He takes a wild cut."
3650  GOTO 3690
3660  PRINT "He thrusts at your body."
3670  GOTO 3690
3680  PRINT "He tries a head cut."
3690  IF RND(1)>.5+.3*H2/W2 THEN 4060
3700  X1=1+INT(2.5*RND(1))
3710  IF X1=2 THEN 3750
3720  IF X1=3 THEN 3770
3730  PRINT "You stop his blow on your sword`and back away."
3740  GOTO 3550
3750  PRINT "You duck under his sword to attack."
3760  GOTO 3780
3770  PRINT "You parry, then attack."
3780  FOR I1=1 TO H3
3790  IF I1=1 THEN 3810
3800  PRINT "You try again..."
3810  IF RND(1)>.3 THEN 3840
3820  PRINT "You missed him!"
3830  GOTO 3980
3840  X1=1+INT(2.999*RND(1))
3850  IF X1=2 THEN 3910
3860  IF X1=3 THEN 3950
3870  PRINT "You got his leg."
3880  W2=W2-H2/5
3890  W3=W3-H2/5
3900  GOTO 3980
3910  PRINT "You've slashed his arm."
3920  W3=W3-H2/5
3930  W2=W2-H2/3
3940  GOTO 3980
3950  PRINT "You score to his body."
3960  W2=W2-.1
3970  W3=W3-.25
3980  NEXT I1
3990  IF W2>.1 THEN 4010
4000  W2=.1
4010  IF W3>.05 THEN 3550
4020  PRINT "He's down!!"
4030  PRINT "You've finished him off."
4040  PRINT 
4050  RETURN 
4060  PRINT "You're hit!"
4070  H1=H1-.2
4080  H2=H2-.2
4090  IF H1<.05 THEN 4120
4100  PRINT "You stagger away."
4110  GOTO 3550
4120  PRINT "You're down."
4130  PRINT "He closes for the kill."
4140  IF RND(1)>.1+E1/10 THEN 4190
4150  PRINT "You make a lucky thrust!!"
4160  PRINT "He's dead!!!!"
4170  PRINT 
4180  RETURN 
4190  PRINT "You are killed."
4200  GOTO 1510
4210 FILES
4220 END
160  PRINT "He's dead!!!!"
4170  PRINT 
4180  RETURN 
4190  PRINT "You are killed."
4200  GOTO 1