 1  ONERR  GOTO 8500
 2 A =  USR (1):A =  USR (2): & WINDOW0,40,0,24: HOME : TEXT :A =  USR (0)
 5  DIM KA(8),KB(8),KC(8),OB$(9),OB(9,6)
 10  &  READ "USER.PLAYER": INPUT NM$,NA%,NU%,CY%,CX%,CL,RA
 20  FOR I = 1 TO 8: INPUT KA(I),KB(I),KC(I): NEXT I
 30  INPUT GP,XP,AR,PA,PR,EN,OB,LP%
 40  IF OB = 0 THEN 70
 50  FOR I = 1 TO OB: INPUT OB$(I): FOR J = 1 TO 6: INPUT OB(I,J): NEXT J: NEXT I
 70  &  END 
 80  &  RECALL "SCRN.TOWN-1",8192: &  RECALL "DATA.TOWN-1",7471:A =  USR (1): POKE  - 16304,0
 85  & WINDOW4,32,7,16
 90  DEF  FN T(X) = ((X = AR) OR (X = PR) OR (X = PA))
 93  DIM AU$(3),AU(3)
 94  FOR I = 1 TO 3: READ AU$(I): READ AU(I): NEXT I
 100  FOR I = 1 TO 8: READ C1$(I): READ C1(I): NEXT I
 102  FOR I = 1 TO 8: READ C2$(I): NEXT I
 103  DIM CA(4,8): FOR I = 1 TO 4: FOR J = 1 TO 8: READ CA(I,J): NEXT J: NEXT I
 104  DIM EQ(9,6,2): DIM EQ$(9,2)
 106  FOR I = 1 TO 2
 107  FOR J = 1 TO 9
 108  READ EQ$(J,I)
 110  FOR K = 1 TO 6: READ EQ(J,K,I): NEXT K
 112  NEXT J
 113  NEXT I
 114  FOR I = 1 TO 6: READ RA$(I): NEXT I
 116  FOR I = 1 TO 4: READ CA$(I): NEXT I
 120  & CLS: & SCRN1,2: GOSUB 17100: VTAB 21: HTAB 11: PRINT "Possibilit{s"
 130  VTAB 8: HTAB 6: PRINT "1)Auberge"
 140  VTAB 9: HTAB 6: PRINT "2)Temple d'Eros"
 150  VTAB 10: HTAB 6: PRINT "3)Guilde"
 160  VTAB 11: HTAB 6: PRINT "4)Alchimiste"
 170  VTAB 12: HTAB 6: PRINT "5)March{"
 180  VTAB 13: HTAB 6: PRINT "6)Receleur"
 190  VTAB 14: HTAB 6: PRINT "7)Examen"
 200  VTAB 15: HTAB 6: PRINT "8)Jeter"
 210  HTAB 6: VTAB 20: GET A$
 220  IF  ASC (A$) = 27 THEN 9000
 230  IF  VAL (A$) < 1 OR  VAL (A$) > 8 THEN 210
 240  ON  VAL (A$) GOTO 1000,2000,3000,4000,5000,6000,7000,8000
 1000 A =  USR (2): & CLS: GOSUB 17100: VTAB 21: HTAB 13: PRINT "Auberge"
 1010  GOSUB 17200
 1030  FOR I = 1 TO 3
 1040  VTAB 10 + I: HTAB 6: PRINT I;")";AU$(I);: HTAB 21: PRINT AU(I);" PO"
 1060  NEXT I
 1070  VTAB 14: HTAB 6: GET A$:V% =  VAL (A$)
 1080  IF  ASC (A$) = 27 THEN A =  USR (2): GOTO 120
 1090  IF  VAL (A$) = 0 THEN 1070
 1100  IF V% = 0 THEN 1070
 1110  IF V% > 3 THEN 1070
 1120  IF AU(V%) > GP THEN  GOTO 1070
 1130 GP = GP - AU(V%)
 1180  & CLS:A =  USR (3)
 1190  ON V% GOTO 1200,1300,1400
 1200  VTAB 8
 1210  PRINT "C'est un cyclope qui dirige les mines de Ered-Morglin. Ses ta-  lents de forgeron lui ont permisde se faire de puissantes rela- tions. Cependant les sages de"
 1230  GET A$
 1250  PRINT "Bar-Tolainor le soup$onnent de  s'~tre alli{ @ Beltrik. Ils ont promis leur gratitude {ternelle @ quiconque leur apporterait la t~te du monstre borgne."
 1295  GET A$: GOTO 1000
 1300  VTAB 8
 1310  PRINT "En T{r{groth r{sident la Matri- arche et ses partisans. Tous    sont des adorateurs fanatiques  de Vaprak et lui rendent de san-";
 1325  PRINT "glants hommages. Les sacrifices rituels organis{s en l'honneur  du Destructeur sont aussi des"
 1330  GET A$
 1340  PRINT "orgies cannibales ou les p{ch{s de chair et de ch{re sont indi- stinctement consomm{s. Cette ci-tadelle n'a jamais, jusqu'@     pr{sent, {t{ menac{e grace @ seshauts murs et @ sa porte de"
 1350  GET A$
 1365  PRINT "mithril. Pourtant @ chaque portesa clef : celle de T{r{groth    pourrait aussi ouvrir la ceintu-re de chastet{ de la Matriarche."
 1390  GET A$: GOTO 1000
 1400  VTAB 8
 1410  PRINT "Le repaire de Beltrik, le sor-  cier lubrique, reste @ ce jour  inconnu. Les sages l'ont cepen- dant appel{ Coron Raugul et le  pr{tendent prot{g{ par un sort"
 1420  GET A$
 1450  PRINT "d'invisibilit{. Ils disent aussiqu'il est gard{ par un Golem    quasi-invincible. Cette senti-  nelle a cependant un point fai- ble, sa diarrh{, qu'elle ne peut{ponger qu'avec les feuillets "
 1460  GET A$
 1500  PRINT "d'un grimoire au nom trois fois maudit. Ce livre est le Pnakoti-cus Qhultis du comte Bren-lette, aussi appel{ P.Q.. Le Golem    laissera volontiers le passage"
 1510  GET A$
 1550  PRINT "@ qui lui offrira un rouleau du pr{cieux parchemin."
 1570  GET A$: GOTO 1000
 1990  GOTO 120
 2000  REM  TEMPLE
 2005 C1(1) = 1: IF KC(2) > 15 THEN C1(1) = 0
 2010  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "Temple"
 2020  GOSUB 17200
 2040  FOR I = 1 TO 8
 2050  VTAB 7 + I: HTAB 6: PRINT I;")";C1$(I)
 2060  VTAB 7 + I: HTAB 21: PRINT C1(I);" PO"
 2080  NEXT I
 2090  VTAB 20: HTAB 6: GET A$
 2100  IF  ASC (A$) = 27 THEN 120
 2110  IF  VAL (A$) = 0 OR  VAL (A$) = 9 THEN 2090
 2120  IF C1( VAL (A$)) > GP THEN 2090
 2130 GP = GP - C1( VAL (A$))
 2140  GOSUB 17200
 2150  ON  VAL (A$) GOTO 2200,2220,2240,2260,2280,2300,2320,2340
 2200 KC(5) = KA(5): GOTO 2090
 2220 KC(6) = KA(6): GOTO 2090
 2240 KC(3) = KA(3) + 7: GOTO 2090
 2260 KC(4) = KA(4) + 7: GOTO 2090
 2280 KC(5) = KA(5) + 7: GOTO 2090
 2300 KC(6) = KA(6) + 7: GOTO 2090
 2320 KC(7) = KA(7) + 7: GOTO 2090
 2340 KC(8) = KA(8) + 7: GOTO 2090
 3000  REM  GUILDE
 3010  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "Guilde"
 3020  GOSUB 17300
 3040  FOR I = 1 TO 8
 3050  VTAB 7 + I: HTAB 6: PRINT I;")";C2$(I)
 3060  VTAB 7 + I: HTAB 21: PRINT CA(CL,I);" XP"
 3080  NEXT I
 3090  VTAB 20: HTAB 6: GET A$
 3100  IF  ASC (A$) = 27 THEN 120
 3110  IF A$ = "9" OR  VAL (A$) = 0 THEN 3090
 3120  IF CA(CL, VAL (A$)) > XP THEN 3090
 3130 XP = XP - CA(CL, VAL (A$))
 3140  GOSUB 17300
 3150  IF  VAL (A$) > 4 THEN CL =  VAL (A$) - 4: GOTO 3040
 3160 KA( VAL (A$)) = KA( VAL (A$)) + 1
 3170 KC( VAL (A$)) = KA( VAL (A$))
 3200 KA(5) = KB(5) +  INT ((KA(3) + KA(4) - KB(3) - KB(4)) / 2 + .5)
 3210 KA(6) = KB(6) +  INT ((KA(1) + KA(2) - KB(1) - KB(2)) / 2 + .5)
 3220 KA(7) = KB(7) +  INT ((KA(1) + KA(4) - KB(1) - KB(4)) / 2 + .5)
 3230 KA(8) = KB(8) +  INT ((KA(2) + KA(4) - KB(2) - KB(4)) / 2 + .5)
 3240  FOR I = 1 TO 4
 3250 CA(I, VAL (A$)) = CA(I, VAL (A$)) + 100
 3255 KC(4 + I) = KA(4 + I)
 3260  NEXT I
 3300  GOTO 3040
 3430 KA(8) = KB(8) +  INT ((KA(2) + KA(4) - KB(2) - KB(4)) / 2 + .5)
 4000  REM  ALCHIMISTE
 4010  & CLS: GOSUB 17100: VTAB 21: HTAB 12: PRINT "Alchimiste"
 4020  IF OB > 9 THEN  GOTO 110
 4030  GOSUB 17200
 4040  FOR I = 1 TO 9
 4050  VTAB 7 + I: HTAB 6: PRINT I;")";EQ$(I,1)
 4060  VTAB 7 + I: HTAB 21: PRINT EQ(I,2,1);" PO"
 4070  IF EQ(I,3,1) > KC(1) OR EQ(I,4,1) > KC(2) THEN  VTAB 7 + I: HTAB 34: PRINT "Inut"
 4080  NEXT I
 4090  HTAB 6: VTAB 21: GET A$
 4100  IF  ASC (A$) = 27 OR OB > 8 THEN 120
 4110  IF  VAL (A$) = 0 THEN 4090
 4120  IF EQ( VAL (A$),2,1) > GP THEN 4090
 4130 GP = GP - EQ( VAL (A$),2,1): GOSUB 17200
 4140 OB = OB + 1
 4150 OB$(OB) = EQ$( VAL (A$),1)
 4160  FOR I = 1 TO 6
 4170 OB(OB,I) = EQ( VAL (A$),I,1)
 4180  NEXT I
 4190  GOTO 4090
 5000  REM  MARCHE
 5010  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "March{"
 5020  IF OB > 9 THEN  GOTO 110
 5030  GOSUB 17200
 5040  FOR I = 1 TO 9
 5050  VTAB 7 + I: HTAB 2: PRINT I;")";EQ$(I,2)
 5060  VTAB 7 + I: HTAB 17: PRINT EQ(I,2,2);" PO"
 5070  IF EQ(I,3,2) > KC(3) OR EQ(I,4,2) > KC(4) THEN  VTAB 7 + I: HTAB 27: PRINT "Inut"
 5080  NEXT I
 5090  HTAB 6: VTAB 21: GET A$
 5100  IF  ASC (A$) = 27 OR OB > 8 THEN 120
 5110  IF  VAL (A$) = 0 THEN 5090
 5120  IF EQ( VAL (A$),2,2) > GP THEN 5090
 5130 GP = GP - EQ( VAL (A$),2,2): GOSUB 17200
 5140 OB = OB + 1
 5150 OB$(OB) = EQ$( VAL (A$),2)
 5160  FOR I = 1 TO 6
 5170 OB(OB,I) = EQ( VAL (A$),I,2)
 5180  NEXT I
 5190  GOTO 5090
 6000  REM  RECELEUR
 6010  & CLS: GOSUB 17100: VTAB 21: HTAB 13: PRINT "Receleur"
 6020  IF OB = 0 THEN  GOTO 120
 6040  FOR I = 1 TO OB
 6050  VTAB 7 + I: HTAB 6: PRINT I;")";: GOSUB 17400
 6060  VTAB 7 + I: HTAB 21: PRINT  INT (OB(I,2) / 2 + .5);" PO"
 6080  NEXT I
 6090  GOSUB 17200
 6100  VTAB 21: HTAB 6: GET A$:V% =  VAL (A$)
 6110  IF  ASC (A$) = 27 THEN 120
 6120  IF  VAL (A$) = 0 OR  VAL (A$) > OB THEN 6100
 6125  IF  FN T(V%) THEN 6100
 6130 GP = GP +  INT (OB( VAL (A$),2) / 2 + .5): IF GP > 9999 THEN GP = 9999
 6140  GOSUB 17200
 6150  IF OB =  VAL (A$) THEN 6210
 6160  FOR I =  VAL (A$) TO OB - 1
 6170 OB$(I) = OB$(I + 1)
 6180  FOR J = 1 TO 6
 6185 OB(I,J) = OB(I + 1,J)
 6190  NEXT J
 6200  NEXT I
 6210 OB$(OB) = ""
 6220  FOR I = 1 TO 6:OB(OB,I) = 0: NEXT I
 6230 OB = OB - 1
 6235  GOSUB 17500
 6240  GOTO 6000
 6990  GOTO 120
 7000  REM  EXAMEN
 7010  & CLS: GOSUB 17100: VTAB 21: HTAB 17 -  INT (0.5 *  LEN (NM$)): PRINT NM$
 7020  VTAB 9: HTAB 2: PRINT RA$(RA);" ";CA$(CL)
 7030  VTAB 10: HTAB 2: PRINT "Arg : ";GP
 7040  VTAB 10: HTAB 17: PRINT "Exp : ";XP
 7050  HTAB 2: VTAB 12: PRINT "Int : ";KC(1)
 7060  HTAB 2: VTAB 13: PRINT "Sag : ";KC(2)
 7070  HTAB 2: VTAB 14: PRINT "For : ";KC(3)
 7080  HTAB 2: VTAB 15: PRINT "Dex : ";KC(4)
 7090  HTAB 17: VTAB 12: PRINT "Vit : ";KC(5);"/";KA(5)
 7100  HTAB 17: VTAB 13: PRINT "Mag : ";KC(6);"/";KA(6)
 7110  HTAB 17: VTAB 14: PRINT "Adr : ";KC(7)
 7120  HTAB 17: VTAB 15: PRINT "Per : ";KC(8)
 7130  IF OB = 0 THEN 7210
 7140  GET A$: & CLS
 7150  FOR I = 1 TO 5
 7160  VTAB 9 + I: HTAB 2: GOSUB 17400
 7170  NEXT I
 7180  FOR I = 6 TO 9
 7190  VTAB 4 + I: HTAB 17: GOSUB 17400
 7200  NEXT I
 7210  GET A$
 7990  GOTO 120
 8000  REM  JETER
 8010  IF OB = 0 THEN  GOTO 120
 8020  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "Jeter"
 8040  FOR I = 1 TO OB
 8050  VTAB 7 + I: HTAB 6: PRINT I;")";: GOSUB 17400
 8080  NEXT I
 8100  GET A$:V% =  VAL (A$)
 8110  IF  ASC (A$) = 27 THEN 120
 8120  IF  VAL (A$) = 0 OR  VAL (A$) > OB THEN 8100
 8130  IF  FN T(V%) THEN 8100
 8200  IF OB =  VAL (A$) THEN 8300
 8210  FOR I =  VAL (A$) TO OB - 1
 8220 OB$(I) = OB$(I + 1)
 8230  FOR J = 1 TO 6
 8240 OB(I,J) = OB(I + 1,J)
 8250  NEXT J
 8260  NEXT I
 8300 OB$(OB) = ""
 8310  FOR I = 1 TO 6:OB(OB,I) = 0: NEXT I
 8330 OB = OB - 1
 8335  GOSUB 17500
 8340  GOTO 8000
 8500  CALL 50688
 9000  REM  FIN
 9010  GOSUB 17100: VTAB 21: HTAB 11: PRINT "Partir (O/N)";
 9020  GET A$
 9030  IF A$ = "N" THEN 120
 9040  IF A$ = "O" THEN 9060
 9050  GOTO 9020
 9060  & WINDOW0,40,0,24: HOME : TEXT 
 9062  FOR I = 1 TO 8
 9064  IF KC(I) > 99 THEN KC(I) = 99
 9066  IF KA(I) > 99 THEN KA(I) = 99
 9068  NEXT I
 9070 A =  USR (0):PL$ = "USER.PLAYER": &  DEL PL$: &  DEF PL$,2: &  PRINT PL$
 9080  PRINT NM$: PRINT NA%: PRINT NU%: PRINT CY%: PRINT CX%: PRINT CL: PRINT RA
 9090  FOR I = 1 TO 8: PRINT KA(I): PRINT KB(I): PRINT KC(I): NEXT I
 9100  PRINT GP: PRINT XP: PRINT AR: PRINT PA: PRINT PR: PRINT EN: PRINT OB: PRINT LP%
 9110  IF OB = 0 THEN 9200
 9120  FOR I = 1 TO OB: PRINT OB$(I): FOR J = 1 TO 6: PRINT OB(I,J): NEXT J: NEXT I
 9200  &  END :A =  USR (3)
 9210  &  RUN "COMB",24576
 10000  REM  DONNEES
 11000  REM  AUBERGE
 11010  DATA Ered-Morglin,10 
 11020  DATA T{r{groth,25
 11030  DATA Coron Raugul,50  
 12000  REM  TEMPLE 
 12010  DATA Gu{rison,0     
 12020  DATA M{ditation,0    
 12030  DATA Pri}re FOR,20  
 12040  DATA Pri}re DEX,20  
 12050  DATA Pri}re VIT,20    
 12060  DATA Pri}re MAG,20    
 12070  DATA Pri}re ADR,20   
 12080  DATA Pri}re PER,20    
 13000  REM  GUILDE
 13010  DATA Intellect,Sagesse,Force,Dext{rit{
 13020  DATA Sorcier,Pr~tre,Guerrier,Voleur  
 13030  DATA  100,300,400,200,0,100,200,100
 13040  DATA  300,100,200,400,100,0,100,200
 13050  DATA  400,300,100,200,200,100,0,100
 13060  DATA  300,400,200,100,100,200,100,0
 14000  REM  ALCHIMISTE
 14010  DATA  Potion 1,20,10,0,0,20,1
 14020  DATA  Potion 2,20,20,0,0,20,2
 14030  DATA Potion 3,20,30,0,0,20,3
 14040  DATA  Potion 4,20,40,0,0,20,4
 14050  DATA  Potion 5,20,50,0,0,20,5
 14060  DATA  Potion FOR,20,20,0,0,20,12
 14070  DATA  Potion DEX,20,20,0,0,20,17
 14080  DATA  Potion ADR,20,20,0,0,20,32
 14090  DATA  Potion PER,20,20,0,0,20,37
 15000  REM  MARCHE
 15010  DATA  Dague,0,1,5,5,4,4
 15020  DATA  Gourdin,1,3,10,10,5,5
 15030  DATA  Glaive,1,5,15,15,6,6
 15040  DATA  Masse,1,5,15,10,6,6
 15050  DATA  Robe,10,1,0,0,1,0
 15060  DATA  Cuir mou,10,4,10,5,2,0
 15070  DATA  Fronde,4,5,10,15,4,0
 15080  DATA  Arc court,4,15,15,15,6,0
 15090  DATA  Targe,3,10,15,10,5,1
 16000  REM  AUTRES
 16010  DATA Humain,Nain,Elfe,Hobbit,Orque,Gnome  
 16020  DATA   Sorcier,Pr~tre,Guerrier,Voleur
 17000  REM  ROUTINES
 17100  REM  EFFACER
 17110  VTAB 21: HTAB 3: PRINT  SPC( 28)
 17120  RETURN 
 17200  REM  ARG
 17210  VTAB 19: HTAB 13: PRINT  SPC( 8)
 17220  VTAB 19: HTAB 13: PRINT "Arg:";GP
 17230  RETURN 
 17300  REM  EXP
 17310  VTAB 19: HTAB 13: PRINT  SPC( 8)
 17320  VTAB 19: HTAB 13: PRINT "Exp:";XP
 17330  RETURN 
 17400  IF  FN T(I) THEN  INVERSE 
 17410  PRINT OB$(I)
 17420  NORMAL 
 17430  RETURN 
 17500  IF AR > V% THEN AR = AR - 1
 17510  IF PA > V% THEN PA = PA - 1
 17520  IF PR > V% THEN PR = PR - 1
 17530  RETURN 
