home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 May
/
Ahoy_Magazine_86-05_1986_Double_L.d64
/
alchemist's
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
297 lines
900 print "[147]
910 [153] " alchemist's apprentice"
920 [153] " copyright"
930 [153] " cheryl cox peterson"
940 [153] " 1986"
950 [153]:[153]:[153]:[153]
960 [133]"do you need instructions";x$
970 [139] x$[178]"n" [167] [137] 1500
980 [153]"load"
990 i[178]1
1000 [153]"the game's objective is to create"
1005 [153]"and hide as much gold as you can"
1010 [153]"before your master, the alchemist"
1015 [153]"returns from the alchemist's"
1020 [153]"association's annual convention."
1030 [153]"the boss may call to let you"
1035 [153]"know when he's returning."
1040 [153]"then again, he may not. if you"
1045 [153]"don't have the shop cleaned"
1050 [153]"before he returns, you'll get a beating."
1060 [141] 10100
1065 [153]"load"
1070 [153]"there are dangers involved."
1075 [153]"though you've learned much, even slight"
1080 [153]"changes in incantations or ingredients"
1085 [153]"can cause unpredictable results."
1100 [153]"once you have the right combination"
1103 [153] "of incantations and ingredients,"
1105 [153]"it can only change 10 stones at a time."
1200 [153]"you may use up your ingredients"
1203 [153]"and have to fetch more."
1205 [153]"even the weather can change a spell's"
1208 [153]"effectiveness."
1210 [153]"if the alchemist returns before you get your gold hidden"
1220 [153]"you lose your gold and get whipped."
1230 [153]" good luckwait."
1300 [141] 10100
1500 [143] setup
1550 [153]"load"
1560 [134] a(17), m1(17), m2(9), wt(10), r(11), rc(10)
1570 i[178]0
1900 cs[178]0:sb[178]0:y[178]0:tl[178]0:g[178]0
1910 [153]"load"
2000 [143] main routine
2002 [139] tl[177]0 [167] 2010
2005 t[178][181]([187](1)[172]10[170]1)
2010 r[178][181]([187](1)[172]10[170]1)
2015 [139] tl[177]0 [167] tl[178]tl[170]1
2045 [143] print"load"
2050 [145] r [141] 4000,4500,5000,6000,7000,7000,8000,8000,9000,6000,4000
3000 [143] clock routine
3005 [139] t[179][177]1 [167] 2000
3006 [139] tl[178]0 [167] tl[178]1
3010 [139] tl[178]60 [167] [137] 3500
3020 [139] tl[179][177]45 [167] 3030
3025 [153]"the alchemist will return in 15 minutes.
3030 if tl<>30 then 3040
3035 print"the alchemist will return in 30 minutes."
3040 if tl<>15 then 3050
3045 print"the alchemist will return in 45 minutes"
3050 goto 2000
3500 rc=int(rnd(1)*15+1)
3501 print"game over"
3510 goto 20000
4000 rem found it subroutine
4020 if y=1 then return
4030 print"hey wow you found it!"
4032 print"that's 10 pieces of gold."
4034 if tl>0 then tl=tl+1
4040 g=g+10
4050 gosub 10010
4100 rc=int(rnd(1)*15+1)
4110 if rc>14 then gosub 20500
4120 if rc>11 then goto 4200
4130 g=g+10:print"you changed another 10 stones."
4140 print "you now have ";g; "gold nuggets.":gosub 10010
4150 goto 4100
4200 print "the weather changed and"
4210 print "your spell no longer works. too bad."
4220 gosub 10010
4499 return
4500 rem partly successful subroutine
4600 g1=int(rnd(1)*6+1)
4610 print"congratulations! you managed to"
4620 print"change ";g1; "of the stones into gold.":g=g+g1:gosub 10010
4625 tl=tl+1
4630 print"do you want to use the s[146]ame spell"
4640 input"or try something d[146]ifferent";x$
4645 print"[147]"
4650 if x$="d" then return
4660 if x$<>"s" then 4630
4700 y=int(rnd(1)*15+1)
4710 if y>14 then goto 5000
4720 if y<13 then 4800
4740 print"too bad. the weather changed, so you're"
4750 print"spell isn't working any more."
4760 y=1
4780 gosub 10010
4790 return
4800 print"you've turned ";g1;" more of the stones to gold.":g=g+g1
4810 tl=tl+1:gosub 10010
4820 goto 4630
5000 rem early subroutine
5010 if tl<20 then return
5100 goto 20510
6000 rem counterspell routine
6010 if cs=1 then return
6100 print"you stumble across a counterspell"
6110 print"that reverses the last spell made."
6120 print"it must be repeated exactly as written"
6130 print"in the book in order to work."
6140 print"you memorize it!":cs=1
6150 gosub 10010
6999 return
7000 rem wasted time subroutine
7010 wt=int(rnd(1)*9+1):if y=3 then return
7020 on wt gosub 7100,7200,7300,7400,7500,7600,7700,7800,7900,7960
7030 gosub 10010
7040 return
7100 if sb=1 then return
7110 print"you found the alchemist's spell book,"
7120 print"but the spell you want isn't in it."
7130 print"you wasted 20 minutes looking for it!"
7135 print"tough luck!"
7140 if tl>40 then gosub 20010
7150 tl=tl+20:sb=1:return
7200 print"you can't seem to find that"
7210 print"ingredient you want."
7220 print"you waste 6 minutes looking for it."
7250 tl=tl+6:return
7300 print"a friend calls you up. you waste 10"
7310 print"minutes trying to get rid of him."
7320 tl=tl+10
7350 tl=tl+10:return
7400 print"delivery man brings supplies."
7410 print"you waste 7 minutes checking contents"
7420 print"and signing for it."
7450 tl=tl+7:return
7500 print"you misplaced the mortar and pestle,"
7510 print"and you need to grind some ingredients."
7520 print"you spend 3 minutes locating them."
7550 tl=tl+3:return
7600 print"there's never a lighter when you"
7610 print"need one. you spend 2 minutes looking."
7650 tl=tl+2:return
7700 print"everything is so confusing."
7710 print"take a minute to stop and think."
7750 tl=tl+1:return
7800 print"you remember something the alchemist"
7810 print"wanted you to do."
7820 print"you take 5 minutes to do it."
7850 tl=tl+5:return
7900 print"you need some more distilled water."
7910 print"you spend 4 minutes setting it up."
7950 tl=tl+4:return
7960 print"you'll need more stones soon."
7970 print"collecting more takes you 8 minutes."
7980 tl=tl+8:return
7999 return
8000 rem monster subroutine
8010 m1=int(rnd(1)*9+1)
8100 print"oh no! you created a ";
8200 on m1 gosub 8310,8320,8330,8340,8350,8360,8370,8380,8390
8300 goto 8400
8310 print"small dragon ":return
8320 print"chimera ":return
8330 print"hydra ":return
8340 print"lion ":return
8350 print"bear ":return
8360 print"tiger ":return
8370 print"harpy ":return
8380 print"wolf ":return
8390 print"alligator":return
8400 print"and it looks hungry!"
8410 print"do something quick!"
8415 gosub 10100
8420 if cs=0 goto 8600
8430 print"use the counterspell."
8435 gosub 10100
8440 gosub 10010
8450 return
8600 m2=int(rnd(1)*09+1)
8610 on m2 gosub 8650,8700,8750,8700,8850,8700,8750,8700,8650,8800
8620 return
8650 print"oh no! you made another one!"
8660 print"you'd better try again."
8663 gosub 10100
8665 tl=tl+1
8670 goto 8600
8675 tl=tl+1:goto 8600
8700 print"would you be more careful?"
8710 gosub 10010
8720 return
8750 print"that didn't work. the situation's"
8760 print"getting desperate. hurry!"
8765 gosub 10100
8800 print"what are you doing? turning yourself "
8810 print"into a chicken won't help!"
8820 print"change back and try again."
8825 gosub 10100
8830 tl=tl+1:goto 8600
8850 print"too late. at least you were tasty."
8855 print"you had ";g;" gold pieces when you died."
8860 goto 10070
8999 return
9000 rem animal subroutine
9100 a=int(rnd(1)*12+1)
9200 print"you've changed yourself into a ";
9210 onagosub 9310,9320,9340,9350,9360,9370,9380,9390,9400,9410,9420,9430,9440
9290 goto 9500
9310 print"dog. ":return
9320 print"pig. ":return
9330 print"cat. ":return
9340 print"turkey. ":return
9350 print"fox. ":return
9360 print"cow. ":return
9370 print"duck. ":return
9380 print"goat. ":return
9390 print"frog. ":return
9400 print"lizard. ":return
9410 print"newt":return
9420 print"snake. ":return
9430 print"turtle. ":return
9440 print"goldfish. ":return
9500 if a>12 then goto 9900
9510 if a>7 then goto 9700
9600 print"even if you know the counterspell, "
9610 print"you can't use it. try swishing"
9620 print"your tail or something."
9630 gosub 10100
9650 f=int(rnd(1)*2+1)
9660 if f=2 then goto 9685
9670 print"that did it!"
9675 gosub 10010
9680 return
9685 print"that didn't work. try again."
9690 gosub 10100
9695 tl=tl+1:goto 9650
9700 print"what a predicament! try flicking "
9710 print"your tongue or wiggling something."
9715 gosub 10100
9720 f=int(rnd(1)*2+1)
9730 if f=1 then gosub 9980
9740 if f=1 then goto 9720
9750 print"that's an improvement. at least, "
9760 print"you're warm-blooded."
9765 gosub 10100
9770 a=int(rnd(1)-5+12)
9780 goto 9200
9900 print"you are supposed to make gold[146], not"
9910 print"turn yourself into a gold[146]fish."
9920 print"start blowing bubbles. maybe you'll"
9930 print"stumble across the right pattern."
9935 gosub 10100
9940 f=int(rnd(1)*2+1)
9945 if f=1 then gosub 9980
9950 print"that's a little better."
9955 gosub 10100
9970 goto 9700
9980 print"that didn't work. try again. "
9981 gosub 10100
9985 tl=tl+1:return
9999 end
10010 print"do you want to start cleaning up?"
10020 print"the alchemist could return early."
10030 input"y[146] or n[146]";x$
10050 if x$<>"y"then 10090
10060 print"congratulations, you've got ";g;" gold pieces."
10070 print"would you like to try again?"
10080 input "y[146] or n[146]";d$
10085 if d$="y"then 1900
10089 end
10090 if tl>20 then print"[147]":return
10094 print"[147]"
10095 print"ok, let's try it again.":return
10100 if i=1 then goto 10110
10105 print"press a key to try something else.":goto 10200
10110 print:print"press a key to continue"
10200 get q$
10300 if q$="" then 10200
10400 if q$<>"" then print"[147]"
10500 return
20000 rem alchemist returns
20010 print"too bad. the alchemist is back"
20020 goto 20515
20500 rem alchemist returns early
20510 print"too bad. the alchemist returned early"
20515 if g<1 then goto 20525
20520 print"you lose all your gold"
20525 print"and you get a beating."
20530 print"better luck next time."
20540 print"care to try again?"
20545 input"y[146] or n[146]";d$
20550 if d$="y" then goto 1900
20560 if d$="n" then 9999
20570 goto 20540