#include #include 13 cls 49 let s$="strintwiscondexchr" 50 let y$="wxadshqpcvtgb" 61 let e$="gnoll kobold skeletonhobbit zombie orc fighter mummy " 73 let e$=e$+"elf ghoul dwarf troll wraith ogre minotaur" 85 let e$=e$+"giant specter vampire demon dragon " 90 let r$="a" 100 let m$="a" 109 dim p(4,4) 110 dim qs(6) 111 dim sf(11) 112 dim v$(10) 113 dim a$(10) 114 dim kk(10) 115 dim w$(36) 116 dim b(4) 117 dim tp(3) 121 dim mm(20) 122 dim ll(20) 123 dim hh(20) 124 dim z$(10,3) 125 let xo=1.6915 126 let yo=1.4278 127 let zo=1.2462 128 let w0=4694 133 let v$(1)="sword" 134 let a$(1)=v$(1) 135 let v$(2)="armor" 136 let a$(2)=v$(2) 145 let v$(3)="shield" 146 let a$(3)=v$(3) 147 let v$(4)="elven cloak" 148 let a$(4)="elvn clk" 157 let v$(5)="elven boots" 158 let a$(5)="elvn bts" 169 let v$(6)="ring of regeneration" 170 let a$(6)="ring reg" 181 let v$(7)="ring of protection" 182 let a$(7)="ring prot" 193 let v$(8)="scroll of rescue" 194 let a$(8)="scrl resc" 205 let v$(9)="potion of healing" 206 let a$(9)="pot heal" 217 let v$(10)="potion of strength" 218 let a$(10)="pot strg" 229 let o$="red yellowgreen blue" 241 for i=1 to 20 242 let mm(i)=0 243 next 254 let w$(1)="magic missle" 255 let w$(2)="sleep" 256 let w$(3)="cure light wounds" 257 let w$(4)="light" 258 let w$(5)="turn undead" 259 let w$(6)="prot/evil" 260 let w$(7)="web" 261 let w$(8)="levitate" 262 let w$(9)="cause light wnds" 263 let w$(10)="detect traps" 264 let w$(11)="charm" 265 let w$(12)="strength" 266 let w$(13)="lightning bolt" 267 let w$(14)="cure serious wnds" 268 let w$(15)="continual light" 269 let w$(16)="invisibility" 270 let w$(17)="hold monster" 271 let w$(18)="phantsml for ces" 272 let w$(19)="pass wall" 273 let w$(20)="fireball" 274 let w$(21)="cause serious wnd" 275 let w$(22)="flesh to stone" 276 let w$(23)="fear" 277 let w$(24)="finger of death" 278 let w$(25)="teleport" 279 let w$(26)="astral walk" 280 let w$(27)="power word kill" 281 let w$(28)="ice storm" 282 let w$(29)="wall of fire" 283 let w$(30)="plague" 284 let w$(31)="time stop" 285 let w$(32)="raise dead" 286 let w$(33)="holy symbol" 287 let w$(34)="word of recall" 288 let w$(35)="restoration" 289 let w$(36)="prismatic wall" 290 let z$(1,1)="salty" 291 let z$(2,1)="bold" 292 let z$(3,1)="loud" 293 let z$(4,1)="old" 294 let z$(5,1)="goodly" 295 let z$(6,1)="worthy" 296 let z$(7,1)="lofty" 297 let z$(8,1)="fine" 298 let z$(9,1)="rocky" 299 let z$(10,1)="aged" 300 let z$(1,2)="road" 301 let z$(2,2)="eye" 302 let z$(3,2)="tooth" 303 let z$(4,2)="dragon" 304 let z$(5,2)="mug" 305 let z$(6,2)="demon" 306 let z$(7,2)="wharf" 307 let z$(8,2)="bridge" 308 let z$(9,2)="meade" 309 let z$(10,2)="ale" 310 let z$(1,3)="tavern" 311 let z$(2,3)="alehouse" 312 let z$(3,3)="cellar" 313 let z$(4,3)="club" 314 let z$(5,3)="inn" 315 let z$(6,3)="house" 316 let z$(7,3)="inn" 317 let z$(8,3)="lodge" 318 let z$(9,3)="meadhall" 319 let z$(10,3)="resthouse" 385 print "welcome to" 421 print "telengard" 422 print 445 print "press any key to start" 469 gosub 6121 470 if inkey$="" then goto 470 697 cls 698 print " to use stats" 709 for i=1 to 6 710 let q=0 711 for q1=1 to 3 712 let q=q+int(rnd*6+1) 713 next q1 714 let qs(i)=q 721 print s$(i*3+1 to i*3+4);str$(qs(i));" " 722 next 733 gosub 6121 734 if f$<>chr$(118) then goto 697 745 let hp=qs(4) 746 let ch=hp 747 let gd=0 748 let tg=0 749 let cz=1 750 let lv=1 751 for i=1 to 10 752 let kk(i)=0 753 let sf(i)=0 754 next 755 let sf(11)=0 757 gosub 6565 758 let cx=25 759 let cy=13 760 let ex=0 761 let su=1 762 let cs=1 763 cls 764 print "your name? "; 769 gosub 6169 770 if r$="" then r$="demo" 771 print r$; 781 let n$=r$( to 12) 782 print 783 print 793 print "you are now descending into the " 805 print "depths of the telengard dungeon..." 817 print "%b%e%w%a%r%e...." 829 gosub 6481 830 gosub 6481 831 cls 832 let l=1 833 gosub 6757 834 gosub 9193 841 gosub 5413 842 let sy=1 843 goto 901 853 for i=1 to 11 854 let sf(i)=sf(i)-1 855 next 856 let l=cz 857 gosub 6313 858 if sy=1 then gosub 5413 859 if sy=1 then goto 877 865 gosub 5461 877 let sy=1 878 if kk(6)=0 or ch=hp then goto 901 889 let ch=ch+kk(6) 890 if ch>hp then let ch=hp 901 if rnd>.3 then goto 1945 913 if sf(6)>0 and rnd>.2 then goto 1945 925 gosub 6301 926 print "# " 927 let mq=int(rnd*20+1) 928 if sf(7)>0 and mq<5 then goto 925 937 if int(rnd*20+1)<=kk(4) then goto 7177 949 let ml=int(rnd^1.5)*(cz*2+2)+1 950 gosub 7021 961 if sf(3)>0 and un=1 and rnd>.8 then goto 925 973 gosub 6289 974 gosub 6529 985 if sf(9)>0 and mq<16 and mq<>11 then goto 987 986 goto 997 987 gosub 6325 988 goto 1945 997 print " lvl";str$(ml);" ";m$ 1009 let mh=int((rnd^.5)*ml*mq+1) 1010 let l=ml 1021 if rnd>.95 then goto 1023 1022 goto 1033 1023 let i=int(rnd*3+1) 1024 if i=1 then goto 1057 1025 if i=2 then goto 1093 1026 if i=3 then goto 1177 1027 stop 1033 if mq<>9 then goto 1081 1045 if rnd>.04*qs(6) then goto 1081 1057 print m$;" likes you" 1058 print " and heals you fully" 1059 ch=hp 1069 gosub 6481 1070 print at 8,8;" " 1071 gosub 6313 1072 goto 1945 1081 if mq<>4 or rnd<.05*qs(6) then goto 1165 1093 print "it makes a quick move" 1094 gosub 6481 1095 gosub 6313 1105 for i=1 to 10 1106 if kk(i)>0 then goto 1129 1117 next 1118 print "but steals nothing" 1119 goto 1069 1129 let i=int(rnd*10+1) 1130 if kk(i)<1 then goto 1129 1141 print "he steals "; 1142 if i<8 then goto 1144 1143 goto 1153 1144 print "your " 1145 print v$(i) 1146 let kk(i)=0 1147 gosub 6481 1148 goto 1069 1153 print "a " 1154 print v$(i) 1155 let kk(i)=kk(i)-1 1156 gosub 6481 1157 goto 1069 1165 if mq<>20 or rnd*30>qs(6) then goto 1237 1177 let i=int(rnd*7+1) 1178 if kk(i)>=ml then goto 1237 1189 let qc=ml-kk(i) 1190 let qc=int(rnd*c+1) 1191 let kk(i)=kk(i)+c 1201 print m$;" likes you" 1202 gosub 6325 1213 print "he gives you a" 1214 print v$(i);" +";kk(i) 1215 gosub 6481 1216 gosub 6757 1217 gosub 6325 1225 gosub 6481 1226 gosub 5413 1227 goto 1945 1237 if rnd>.5+qs(5)*.02 then goto 1441 1249 gosub 6481 1250 gosub 6757 1251 print at 18,1;" lvl";str$(ml);" ";m$ 1261 print "fight, cast, or evade:"; 1262 gosub 6121 1273 if f$="\##" then print "wait" 1285 for i=1 to 7 1286 if f$="fcetgb\##"(i to i+1) then goto 1309 1297 next 1298 print m$;" is not amused" 1299 gosub 6325 1300 goto 1249 1309 if i=1 then goto 1321 1310 if i=2 then goto 1321 1311 if i=3 then goto 1753 1312 if i=4 then goto 1765 1313 if i=5 then goto 1753 1314 if i=6 then goto 1765 1315 if i=7 then goto 1441 1321 let i=int(rnd*20)+lv+kk(1)+qs(1)/2 1333 if sf(1)>0 then let i=i+4 1345 if i<10 then goto 1347 1346 goto 1357 1347 print "you missed..." 1348 goto 1441 1357 let i=int(rnd*8+rnd*lv*2+kk(1)+1) 1358 if sf(1)>0 then i=i+5 1369 print "you do";i;"dmg" 1381 let mh=mh-i 1382 if mh>0 then goto 1441 1393 print "it died..." 1405 let eq=ml*mq*10 1406 let ex=ex+eq 1407 gosub 6481 1417 gosub 6757 1418 gosub 6289 1419 print "gain";eq;"exp." 1420 gosub 6481 1421 gosub 6337 1429 gosub 5413 1430 goto 1933 1441 let db=1 1442 let pa=0 1443 let dr=0 1444 let mb=0 1445 goto 1585 1453 let i=int(rnd*20)+ml-kk(2)-kk(3)+mb 1465 if mq>16 and mq<20 and sf(4)>0 then i=i-6 1477 if i<10 then goto 1479 1478 goto 1489 1479 print "it missed..." 1480 gosub 6325 1481 goto 1249 1489 let i=int((rnd*8+rnd*ml*2+1)*db) 1490 print "it does";i;"dmg" 1501 let ch=ch-i 1502 if ch<1 then goto 1504 1503 goto 1513 1504 gosub 6481 1505 goto 5161 1513 if rnd>dr or sf(4)>0 then goto 1561 1525 gosub 6481 1526 gosub 6313 1527 print "it drains a level" 1528 ex=int(ex/2) 1529 gosub 6481 1537 if lv=1 then ex=-1 1549 gosub 6337 1550 gosub 6325 1551 goto 1249 1561 if rnd>pa then goto 1563 1562 goto 1573 1563 gosub 6325 1564 goto 1249 1573 gosub 6313 1574 print "youre paralyzed" 1575 gosub 6325 1576 goto 1441 1585 if mq=13 then dr=0.1 1586 if mq=13 then goto 1453 1597 if mq=17 then dr=0.2 1598 if mq=17 then goto 1453 1609 if mq=18 then dr=0.3 1610 if mq=18 then let pa=0.3 1611 if mq=18 then goto 1453 1621 if mq=10 then pa=0.5 1622 if mq=10 then goto 1453 1633 if mq<>19 then goto 1681 1645 gosub 6325 1657 if rnd>.6 then goto 1659 1658 goto 1669 1659 print "it uses a sword" 1660 let mb=4 1661 let db=3 1662 goto 1453 1669 print "it uses a whip" 1670 let mb=2 1671 let db=2 1672 goto 1453 1681 if mq<>20 then goto 1453 1693 if rnd>.3 then goto 1695 1694 goto 1705 1695 let mb=5 1696 let db=2 1697 goto 1453 1705 print "dragon breathes fire" 1706 gosub 6325 1717 let i=int(rnd*20*ml+1) 1718 if rnd<.05*qs(4) then goto 1741 1729 print "you sort of dodge it" 1730 let i=int(i/2+.5) 1741 print "burn ";i;"dmg" 1742 goto 1501 1753 let d=1 1754 goto 7225 1765 let q=int(rnd*18+1) 1766 print "evade" 1777 if q0 then goto 1803 1802 goto 1813 1803 let qc=int(rnd*4+1) 1804 goto 1921 1813 i=int(rnd*4+1) 1814 if i=1 then goto 1825 1815 if i=2 then goto 1837 1816 if i=3 then goto 1849 1817 if i=4 then goto 1861 1818 stop 1825 let qc=1 1826 if (lx and 3)<3 then goto 1921 1837 let qc=2 1838 if (p(3,2) and 3)<3 then goto 1921 1849 let qc=3 1850 if (int(lx/4) and 3)<3 then goto 1921 1861 let qc=4 1862 if (int(p(2,3)/4) and 3)<3 then goto 1921 1873 let qc=1 1874 if (lx and 3)<3 then goto 1921 1885 let qc=2 1886 if (p(3,2) and 3)<3 then goto 1921 1897 let qc=3 1898 if (int(lx/4) and 3)<3 then goto 1921 1909 goto 1789 1921 gosub 6313 1922 goto 4465 1933 if rnd>.5 then goto 1957 1945 if rnd>.2 then goto 2449 1957 let t=0 1958 if rnd>.85 then let t=1 1969 gosub 6301 1970 print "$" 1971 gosub 6289 1972 let qc=0 1973 if rnd>.7 then goto 2125 1981 print "you see "; 1982 let i=int(rnd*5) 1993 print "refusesilvergold gems jewels"(i*6+1 to 6) 1994 print " to pick up:" 2005 if t=1 and sf(2)>0 and rnd>.1 then print "its trapped"; 2017 gosub 6121 2018 if f$=chr$(118) then goto 2041 2029 print "leave it" 2030 gosub 6325 2031 goto 2449 2041 print "snarf it" 2042 if t=0 then goto 2089 2053 let q=int(rnd*3*l+1) 2054 gosub 6313 2065 print "its trapped" 2066 print "suffer";q;"dmg" 2077 let ch=ch-q 2078 gosub 6481 2079 if ch<1 then goto 5161 2089 let j=int(rnd*i*l*200+1) 2090 gosub 6313 2091 print "worth";j;"gold" 2092 gosub 6481 2101 let gd=gd+j 2102 if i=0 and rnd>.8 then goto 2104 2103 goto 2113 2104 gosub 6313 2105 goto 2269 2113 goto 2425 2125 if rnd>.5 then goto 2269 2137 print "a treasure chest" 2149 print " to open it:" 2161 if t=1 and sf(2)>0 and rnd>.1 then print "its trapped"; 2173 gosub 6121 2174 if f$<>chr$(118) then goto 2176 2175 goto 2185 2176 print "leave it" 2177 goto 2449 2185 print "open it" 2186 if t=0 then goto 2221 2197 gosub 6325 2198 print "chest explodes" 2199 let i=int(rnd*10*cz+1) 2200 let ch=ch-i 2209 print "suffer";i;"dmg" 2210 gosub 6481 2211 if ch<1 then goto 5161 2221 gosub 6325 2222 let i=int(rnd*1000*l^2+1) 2233 if rnd>.9 then goto 2235 2234 goto 2245 2235 print "only cobwebs..." 2236 gosub 6481 2237 goto 2425 2245 print i;"gold" 2246 let gd=gd+i 2247 gosub 6481 2248 if rnd>.5 then goto 2425 2257 let qc=1 2258 gosub 6325 2269 gosub 6313 2270 print "you see a..." 2271 gosub 6481 2281 gosub 6757 2282 gosub 6313 2283 let i=int(rnd*10+1) 2284 let j=int(rnd^.5*(l+1)+1) 2293 if i>7 then print v$(i) 2294 goto 2317 2305 print v$(i);" +";j 2317 print " to take:"; 2318 gosub 6121 2319 if f$=chr$(118) then goto 2341 2329 print "leave" 2330 gosub 6481 2331 goto 2413 2341 if i<>1 or t<>1 then goto 2389 2353 gosub 6313 2354 print "hostile sword" 2355 let i=int(rnd*i*5+1) 2365 print "suffer";i;"dmg" 2366 gosub 6481 2367 let ch=ch-i 2368 gosub 6757 2369 if ch<1 then goto 5161 2377 gosub 6481 2378 gosub 5413 2379 goto 2425 2389 print "taken" 2390 gosub 6481 2391 let kk(i)=kk(i)+1 2392 if i<8 then kk(i)=j 2401 gosub 6757 2402 gosub 6481 2413 gosub 5413 2414 if qc=1 and rnd>.5 then goto 2416 2415 goto 2425 2416 gosub 6325 2417 goto 2269 2425 print at 8,8;" " 2426 gosub 6325 2437 if rnd>.5 then goto 2439 2438 goto 2449 2439 gosub 9049 2440 if mq<>0 then goto 973 2449 let xq=cx 2450 let yq=cy 2451 let zq=cz-1 2452 gosub 5269 2453 let j=(int(hx/256)) 2454 let i=(int(lx/256)) 2461 if cz=1 then let j=0 2473 if i>9 then let i=i-9 2474 if i>9 then goto 2473 2485 if j>9 then let j=j-9 2486 if j>9 then goto 2485 2497 if cz=50 and i=4 then let i=0 2509 if i=0 and j<>4 then goto 4393 2521 if j=4 then goto 3061 2533 if i=1 then goto 2545 2534 if i=2 then goto 2833 2535 if i=3 then goto 2941 2536 if i=4 then goto 3061 2537 if i=5 then goto 3229 2538 if i=6 then goto 3421 2539 if i=7 then goto 3721 2540 if i=8 then goto 3817 2541 if i=9 then goto 4177 2545 if cz<>1 then goto 2809 2557 let j=4 2558 goto 3061 2569 let tp(1)=(cx*cy)-int((cx*cy)/10)*10 2570 let tp(2)=(cx+cy)-int((cx+cy)/10)*10 2571 let tp(3)=(cx*3+cy*7)-int((cx*3+cy*7)/10)*10 2593 gosub 6313 2594 cls 2595 print at 9,9;"x" 2605 print at 9,4;"\.:\:." 2606 print at 8,5;"\.:\:'\':\:." 2607 print at 7,6;"\.:\:' \':\:." 2608 print at 6,7;"% % % % % % " 2609 print at 6,8;"% % " 2610 print at 6,9;"% % " 2611 print at 6,10;"% % % % % % " 2629 print " ";z$(tp(1),1) 2630 print " ";z$(tp(2),2) 2641 print " ";z$(tp(3),3) 2653 gosub 6301 2654 print "inn"; 2655 gosub 6289 2656 print "you have found the" 2657 print z$(tp(1),1);" ";z$(tp(2),2);" ";z$(tp(3),3) 2665 print "they cash in your gold"; 2666 let ex=ex+gd 2667 let tg=tg+gd 2668 let gd=0 2669 gosub 6481 2670 gosub 6481 2677 gosub 6757 2689 gosub 6337 2690 gosub 9181 2691 gosub 6313 2692 let ch=hp 2693 print "gold =";tg 2701 for i=0 to 11 2702 let sf(i)=0 2703 next 2713 let cs=su 2714 print "you spend the night" 2715 gosub 6481 2725 print "you feel better" 2726 gosub 6481 2727 gosub 6757 2728 gosub 6313 2737 print " to return to the dungeon" 2738 if inkey$="" then goto 2738 2797 print "reenter" 2798 gosub 6325 2799 let cz=1 2800 goto 853 2809 gosub 6301 2810 print "\:.\:.\: " 2811 gosub 6289 2812 print "you feel heavy for a moment" 2821 gosub 6481 2822 let cz=cz-1 2823 goto 853 2833 if cz=50 then goto 2809 2845 gosub 6301 2846 print "\'.\.'":gosub 6289 2857 if sf(5)>0 then goto 2859 2858 goto 2869 2859 print "youre above a pit" 2860 goto 2881 2869 print "a pit" 2870 if int(rnd*20)>qs(5)+kk(5) then goto 2917 2881 print "want to descend?"; 2882 gosub 6121 2883 if f$="y"or f$="9" then goto 2905 2893 print "no" 2894 gosub 6325 2895 goto 4393 2905 print "yes" 2906 goto 2929 2917 print "you fall in" 2918 let l=3 2919 gosub 6577 2920 gosub 6481 2929 let cz=cz+1 2930 goto 853 2941 gosub 6289 2953 print "zzap teleported" 2954 gosub 6481 2955 gosub 9181 2965 if ((cx+cy) and 1)=0 then goto 2967 2966 goto 2977 2967 let cz=cz-1 2968 if ((cx+cy) and 2)=2 then let cz=cz+2 2977 let cx=cx+cz*8+cy*13 2978 let cy=cy+cz*6+cx*17 2989 if cx>200 then goto 2991 2990 goto 3001 2991 let cx=cx-200 2992 goto 2989 3001 if cy>200 then goto 3003 3002 goto 3013 3003 let cy=cy-200 3004 goto 3001 3013 if cz=0 then let cz=1 3025 if cz>50 then let cz=50 3037 if rnd>.8 then goto 2965 3049 goto 853 3061 gosub 6301 3062 if j=4 then print "\.'"; 3073 if i=4 then print "\'."; 3085 gosub 6313 3097 if j=4 and cz=1 then print "you see %l%i%g%h%t above" 3109 print "want to "; 3110 if j=4 then print "go %up," 3121 if i=4 then print "go %down," 3133 print "%stay here?"; 3134 gosub 6121 3145 if f$="\##" then let f$="s" 3157 if (i<>4 and f$="d") or (j<>4 and f$="u") then goto 3217 3169 if f$="u" then goto 3171 3170 goto 3181 3171 print "up" 3172 let cz=cz-1 3173 if cz>0 then goto 853 3181 if cz<=0 then goto 2569 3193 if f$="d" then goto 3195 3194 goto 3205 3195 print "down" 3196 let cz=cz+1 3197 goto 853 3205 if f$="s" then goto 3207 3206 goto 3217 3207 print "stay" 3208 gosub 6313 3209 goto 4393 3217 print "???" 3218 goto 3085 3229 gosub 6301 3230 print "\':\:'" 3231 gosub 6313 3232 print "a holy altar" 3241 print "press to worship"; 3242 gosub 6121 3243 if f$=chr$(118) then goto 3301 3253 if rnd>.7 then goto 4393 3265 gosub 6313 3266 print "dirty pagan trash" 3267 gosub 6301 3268 print "# " 3277 let mq=int(rnd*20+1) 3278 gosub 7021 3279 if un=0 then goto 3277 3289 gosub 6325 3290 goto 949 3301 print " to donate money"; 3302 gosub 6121 3313 if f$<>chr$(118) then goto 3253 3325 gosub 6757 3326 gosub 6313 3327 print "how much gold?"; 3328 gosub 7045 3329 gosub 6313 3337 if c>gd then goto 3339 3338 goto 3349 3339 print "you dont have that" 3340 gosub 5413 3341 goto 3265 3349 if c<50*cz then goto 3351 3350 goto 3361 3351 gosub 5413 3352 goto 3265 3361 let gd=gd-c 3362 gosub 6757 3363 if rnd to drink:" 3458 gosub 6121 3459 if f$=chr$(118) then goto 3481 3469 gosub 6313 3470 goto 4393 3481 gosub 6313 3482 if rnd>.6 then goto 3601 3493 if rnd>1-c*.15 then goto 3541 3505 print "you feel better" 3506 let i=int(rnd*3*cz+1) 3507 let ch=ch+i 3508 if ch>hp then let ch=hp 3517 print "heal";i;"hp" 3518 gosub 6481 3519 gosub 6757 3529 gosub 6481 3530 gosub 6325 3531 gosub 5413 3532 goto 4393 3541 if rnd>.15*c then goto 3589 3553 print "its poison" 3554 gosub 6481 3555 let i=int(rnd*3*cz+1) 3556 gosub 6757 3557 print "you lose";i;"hp" 3565 gosub 6481 3566 gosub 5413 3567 let ch=ch-i 3568 if ch<1 then goto 5161 3577 gosub 6325 3578 goto 4393 3589 gosub 6613 3590 gosub 6757 3591 gosub 6325 3592 gosub 5413 3593 goto 4393 3601 if rnd>.4 then goto 3603 3602 goto 3613 3603 print "you feel refreshed" 3604 gosub 6325 3605 goto 4393 3613 if rnd>.5 then goto 3685 3625 if rnd>.5 then goto 3661 3637 print "magic surges into you" 3638 let cs=cs+int(rnd*4*cz+1) 3649 print "you have";cs;" su" 3650 gosub 6733 3651 gosub 6325 3652 goto 4393 3661 print "youre dispossessed" 3662 for i=1 to 10 3663 let kk(i)=0 3664 next 3665 gosub 6481 3673 gosub 6325 3674 cls 3675 gosub 6757 3676 gosub 9193 3677 gosub 5413 3678 goto 4393 3685 print "you feel refreshed" 3686 gosub 6325 3687 print "actually youre drunk" 3688 gosub 6481 3697 if sf(11)<0 then let sf(11)=0 3709 let sf(11)=sf(11)+int(rnd*16+1) 3710 gosub 5413 3711 gosub 6313 3712 goto 4393 3721 gosub 6301 3722 print "\##" 3723 gosub 6313 3724 print "a misty cube" 3733 print " to walk in:"; 3734 gosub 6121 3735 if chr$(118)<>f$ then goto 4393 3745 if rnd>.2 then goto 3769 3757 let cz=int(rnd*50+1) 3758 goto 3805 3769 print 3770 print "a number (1-50):"; 3771 gosub 7045 3772 if f$="\##" then goto 3757 3781 if c<1 or c>50 then print "no you fool"; 3782 gosub 6325 3783 goto 3745 3793 let cz=qc 3805 cls 3806 print "you float" 3807 print " in space...." 3808 gosub 6481 3809 goto 853 3817 gosub 6301 3818 print "\:. " 3819 gosub 6313 3829 print "%pry jewels, %sit down," 3841 print "%read runes, or" 3842 print "%ignore throne:"; 3853 gosub 6121 3854 if f$="i" or f$="\##" then goto 3856 3855 goto 3865 3856 print "ignore" 3857 gosub 6325 3858 goto 4393 3865 if f$<>"p" then goto 3925 3877 print "pry" 3878 gosub 6325 3879 if rnd>.7 then goto 4141 3889 if rnd>.4 then goto 4129 3901 print "some jewels pry off" 3902 i=int(rnd*1000*cz+1) 3913 print "worth";i;"gold" 3914 let gd=gd+i 3915 gosub 6481 3916 gosub 6325 3917 goto 4393 3925 if f$<>"s" then goto 4033 3937 print "sit" 3938 gosub 6325 3939 if rnd>.7 then goto 4141 3949 if rnd>.6 then goto 4129 3961 if rnd>.4 then goto 2953 3973 print "a gong sounds"; 3974 rem sound 3975 gosub 6325 3976 if rnd<.5 then goto 4009 3985 let ex=int(ex/2) 3986 if lv=1 then let ex=-1 3997 gosub 6337 3998 gosub 5413 3999 goto 4393 4009 if lv>cz then goto 4011 4010 goto 4021 4011 print "nothing happens..."; 4012 goto 4105 4021 let ex=1000*2^lv 4022 gosub 6337 4023 goto 4393 4033 if f$<>"r" then goto 4117 4045 print "read" 4046 gosub 6325 4057 if rnd>.7 then goto 4141 4069 if rnd"p" then goto 4215 4214 goto 4225 4215 print "ignore" 4216 gosub 6325 4217 goto 4393 4225 print "push" 4226 gosub 6325 4227 let cb=1 4237 print "%red %green %yellow %blue" 4248 print "or %stop:"; 4249 gosub 6121 4250 if f$="s" or f$="\##" then goto 4252 4251 goto 4261 4252 print "stop"; 4253 gosub 6325 4254 goto 4393 4261 for qc=1 to 4 4262 tp(1)=qc*6-5 4263 tp(2)=qc*6-4 4264 tp(3)=qc*6+1 4265 if f$=mid(o$,tp(1),tp(2)) then goto 4264 4266 goto 4273 4267 let m$=mid(o$,tp(1),tp(3)) 4268 goto 4285 4273 next 4274 print "???" 4275 gosub 6325 4276 goto 4237 4285 gosub 6541 4286 print m$ 4287 if b(cb)<>qc then goto 4345 4297 let cb=cb+1 4298 if cb<5 then gosub 6325 4299 goto 4237 4309 print "it opens "; 4310 gosub 6325 4311 print "you find jewels worth" 4321 gosub 6565 4322 let i=int(rnd*20000*cz^2+1) 4323 print i;"gold" 4324 let gd=gd+i 4333 gosub 6481 4334 gosub 6313 4335 goto 4393 4345 let i=int(rnd*2*cz+1) 4346 print "a bolt hits you" 4357 gosub 6325 4358 print "suffer";i;"dmg" 4359 let ch=ch-i 4360 gosub 6481 4369 if ch<1 then goto 5161 4381 gosub 6325 4382 goto 4393 4393 let mq=0 4394 gosub 6289 4395 gosub 9229 4396 gosub 6313 4397 print "->"; 4398 gosub 6121 4399 if f$="\##" then let f$="s" 4405 for qc=1 to 22 4406 if y$(qc to qc+1)=f$ then goto 4453 4417 next 4429 print "no"; 4430 pause 5 4432 goto 4393 4453 if sf(11)>0 and c<6 then goto 4455 4454 goto 4465 4455 print "confused->"; 4456 let qc=int(rnd*5+1) 4465 if qc=1 then goto 4478 4466 if qc=2 then goto 4501 4467 if qc=3 then goto 4525 4468 if qc=4 then goto 4549 4469 if qc=5 then goto 4573 4470 if qc=6 then goto 4849 4471 if qc=7 then goto 4813 4472 if qc=8 then goto 4969 4473 if qc=9 then goto 5149 4474 if qc=10 then goto 9300 4475 if qc=11 then goto 4993 4476 if qc=12 then goto 5065 4477 if qc=13 then goto 5101 4478 if (lx and 3)>2 and sf(8)<1 or cy=1 then goto 4429 4489 print "north"; 4490 let cy=cy-1 4491 gosub 9145 4492 goto 853 4501 if (p(3,2) and 3)>2 and sf(8)<1 or cy=200 then goto 4429 4513 print "south"; 4514 let cy=cy+1 4515 gosub 9145 4516 goto 853 4525 if (int(lx/4) and 3)>2 and sf(8)<1 or cx=1 then goto 4429 4537 print "west"; 4538 let cx=cx-1 4539 gosub 9145 4540 goto 853 4549 if (int(p(2,3)/4) and 3)>2 and sf(8)<1 or cx=200 then goto 4429 4561 print "east"; 4562 let cx=cx+1 4563 gosub 9145 4564 goto 853 4573 print "stay" 4574 print at 8,8;" " 4575 if mq<>0 then goto 973 4585 sy=0 4586 goto 853 4789 if cz=0 then goto 2737 4801 gosub 5413 4802 goto 4393 4813 print "quit" 4814 print "are you sure?"; 4815 gosub 6121 4825 if f$<>"y" then goto 4827 4826 goto 4837 4827 print "no" 4828 gosub 6325 4829 goto 4393 4837 print "yes" 4838 print "good bye cruel world" 4839 gosub 6481 4840 goto 5161 4849 cls 4850 print "comm and s:" 4861 print 4862 print tab 7;"%w north" 4873 print "%a west %stay %d east" 4885 print tab 7;"%x south" 4886 print 4897 print "%fight %pause" 4909 print "%cast %t scroll/rescue" 4921 print "%evade %g pot/healing" 4933 print "%quit %b pot/strength" 4945 print "%help %v save" 4957 gosub 9193 4958 gosub 5413 4959 goto 4393 4969 print "re-plot" 4970 gosub 6481 4971 cls 4972 gosub 6757 4973 gosub 9193 4974 gosub 5413 4981 goto 4393 4993 print "use scroll/rescue" 5005 if kk(8)<1 then goto 5041 5017 let kk(8)=kk(8)-1 5018 let cx=25 5019 let cy=13 5020 let cz=1 5021 print "***zap***" 5022 gosub 6481 5023 gosub 9181 5029 let gd=0 5030 goto 853 5041 print "dont have one" 5042 gosub 6481 5053 gosub 6325 5054 goto 4393 5065 print "drink healing pot." 5066 if kk(9)<1 then goto 5041 5077 let kk(9)=kk(9)-1 5078 gosub 6481 5079 let ch=ch+int(rnd*20+1) 5080 if ch>hp then let ch=hp 5089 gosub 6757 5090 gosub 6289 5091 print 5092 print "you feel better" 5093 gosub 6481 5094 gosub 5413 5095 goto 5053 5101 print "drink strength pot." 5102 if kk(10)<1 then goto 5041 5113 if sf(1)<0 then let sf(1)=0 5125 let sf(1)=sf(1)+10+int(rnd*20) 5126 print "strength enters you" 5127 gosub 6481 5137 let kk(10)=kk(10)-1 5138 gosub 5413 5139 goto 5053 5149 let d=0 5150 gosub 6757 5151 goto 7225 5161 gosub 6313 5162 print "you died" 5163 gosub 6325 5164 if sf(10)>0 then goto 8869 5173 cls 5174 print at 1,5;"another "; 5175 if lv<4 then print "not so "; 5185 print "mighty adventurer" 5197 print "bites the dust" 5198 print 5209 print "want to try again?"; 5221 gosub 6121 5222 if f$="n" then goto 5257 5233 if f$="\##" then goto 5221 5245 print "yes" 5246 clr 5247 goto 13 5257 print "no" 5258 print 5259 print "so long....." 5260 stop 5269 fast 5270 let q=xq*xo+yq*yo+zq*zo+(xq+xo)*(yq+yo)*(zq+zo) 5281 let hx=(q-int(q))*w0 5282 if int(hx/256)>5 then let hx=(hx and 255) 5293 if int(hx/256)>0 then let hx=(int((q*10-int(q*10))*15+1)*256) or (hx and 255) 5305 if xq=1 or xq=201 then let hx=(hx or 12) 5317 if yq=1 or yq=201 then let hx=(hx or 3) 5329 return 5341 if wq<2 then return 5353 for q=0 to 6 5355 rem poke peek 16396+peek 16397*256+1+lx+q,128 5356 next q 5357 if wq>2 then return 5365 for q=2 to 4 5367 rem poke peek 16396+peek 16397*256+1+lx+q,8 5368 next q 5369 return 5377 if wq<2 then return 5389 for q=0 to 6 5391 rem poke peek 16396+peek 16397*256+1+lx+q*32,128 5392 next q 5393 if wq>2 then return 5401 for q=2 to 4 5403 rem poke peek 16396+peek 16397*256+1+lx+q*32,8 5404 next q 5405 return 5413 let zq=cz 5414 for q2=1 to 4 5415 let yq=cy+q2-1 5416 for q1=1 to 4 5417 let xq=cx+q1-1 5418 gosub 5269 5425 cls 5437 let p(q2,q1)=hx 5438 next 5439 next 5449 rem 5450 gosub 5461 5451 goto 5497 5461 print at 0,0; 5462 for i=1 to 11 5463 if sf(i)<1 then goto 5465 5464 goto 5473 5465 print tab 19;" " 5466 goto 5485 5473 print tab 19;"stdtlgprleinfeastmrsdr"(i*2-1 to i*2+1) 5485 next 5486 return 5497 if (p(2,2) and 3)>1 or (int(p(1,2)/4) and 3)>1 then goto 5521 5509 let lx=0 5510 let wq=(p(1,1) and 3) 5511 gosub 5341 5521 if (p(2,1) and 3)>1 or (int(p(2,2)/4) and 3)>1 then goto 5545 5533 let lx=0 5534 let wq=(int(p(1,1)/4) and 3) 5535 gosub 5377 5545 if (p(2,2) and 3)>1 then goto 5581 5557 let lx=6 5558 let wq=(p(1,2) and 3) 5559 gosub 5341 5560 let wq=(p(1,2) and 3) 5561 gosub 5377 5569 let lx=12 5570 let wq=(int(p(1,3)/4) and 3) 5571 gosub 5377 5581 if (p(2,2) and 3)>1 or (int(p(1,3)/4) and 3)>1 then goto 5605 5593 let lx=12 5594 let wq=(p(1,3) and 3) 5595 gosub 5341 5605 if (int(p(2,3)/4) and 3)>1 or (p(2,3) and 3)>1 then goto 5629 5617 let lx=18 5618 let wq=(int(p(1,4)/4) and 3) 5619 gosub 5377 5629 if (int(p(2,3)/4) and 3)>1 then goto 5665 5641 let lx=144 5642 let wq=(p(2,3) and 3) 5643 gosub 5341 5644 let lx=150 5645 let wq=(int(p(2,4)/4) and 3) 5646 gosub 5377 5653 let lx=276 5654 let wq=(p(3,3) and 3) 5655 gosub 5341 5665 if (p(3,2) and 3)>1 or (int(p(3,3)/4) and 3)>1 then goto 5689 5677 let lx=408 5678 let wq=(p(4,3) and 3) 5679 gosub 5341 5689 if (int(p(2,3)/4) and 3)>1 or (p(3,3) and 3)>1 then goto 5713 5701 let lx=282 5702 let wq=(int(p(3,4)/4) and 3) 5703 gosub 5377 5713 if (p(3,2) and 3)>1 then goto 5749 5725 let lx=276 5726 let wq=(int(p(3,3)/4) and 3) 5727 gosub 5377 5737 let lx=402 5738 let wq=(p(4,2) and 3) 5739 gosub 5341 5740 let lx=270 5741 let wq=(int(p(3,2)/4) and 3) 5742 gosub 5377 5749 if (p(3,2) and 3)>1 or (int(p(3,2)/4) and 3)>1 then goto 5773 5761 let lx=396 5762 let wq=(p(4,1) and 3) 5763 gosub 5341 5773 if (int(p(2,2)/4) and 3)>1 or (p(3,1) and 3)>1 then goto 5797 5785 let lx=264 5786 let wq=(int(p(3,1)/4) and 3) 5787 gosub 5377 5797 if (int(p(2,2)/4) and 3)>1 then goto 5833 5809 let lx=264 5810 let wq=(p(3,1) and 3) 5811 gosub 5341 5821 let lx=132 5822 let wq=(int(p(2,1)/4) and 3) 5823 gosub 5377 5824 let wq=(p(2,1) and 3) 5825 gosub 5341 5833 let lx=138 5834 let wq=(int(p(2,2)/4) and 3) 5835 gosub 5377 5836 let wq=(p(2,2) and 3) 5837 gosub 5341 5845 let lx=144 5846 let wq=(int(p(2,3)/4) and 3) 5847 gosub 5377 5848 let lx=270 5849 let wq=(p(3,2) and 3) 5850 gosub 5341 5857 print at 9,9;"x" 5858 let lx=p(2,2) 5859 if sf(3)<=0 then return 5869 if (int(p(1,1)/256))=0 then goto 5917 5881 if (p(2,1) and 3)<2 and (int(p(2,2)/4) and 3) <2 then goto 5905 5893 if (p(2,2) and 3)>1 or (int(p(1,2)/4) and 3)>1 then goto 5917 5905 print at 3,3;"\##" 5917 if (int(p(1,2)/256))<>0 and (p(2,2) and 3)<2 then print at 9,3;"\##" 5929 if (int(p(1,3)/256))=0 then goto 5977 5941 if (p(2,2) and 3)<2 and (int(p(1,3)/4) and 3)<2 then goto 5965 5953 if (p(2,3) and 3)>1 or (int(p(2,3)/4) and 3)>1 then goto 5977 5965 print at 15,3;"\##" 5977 if (int(p(2,3)/256))<>0 and (int(p(2,3)/4) and 3)<2 then print at 15,9;"\##" 5989 if (int(p(3,3)/256))=0 then goto 6037 6001 if (p(3,3) and 3)<2 and (int(p(2,3)/4) and 3)<2 then goto 6025 6013 if (p(3,2) and 3)>1 or (int(p(3,3)/4) and 3)>1 then goto 6037 6025 print at 15,15;"\##" 6037 if (int(p(3,2)/256))<>0 and (p(3,2) and 3)<2 then print at 9,15;"\##" 6049 if (int(p(3,1)/256))=0 then goto 6097 6061 if (p(3,1) and 3)<2 and (int(p(2,2)/4) and 3)<2 then goto 6085 6073 if (p(3,2) and 3)>1 or (int(p(3,2)/4) and 3)>1 then goto 6097 6085 print at 3,15;"\##" 6097 if (int(p(2,1)/256))<>0 and (int(p(2,2)/4) and 3)<2 then print at 3,9;"\##" 6109 rem slow 6110 return 6121 for q=1 to 400 6122 let f$=inkey$ 6123 if f$="" then goto 6145 6133 return 6145 next 6146 if n$="demo" then goto 6121 6157 let f$="\##":return 6169 r$ = INPUT(30) 6229 if len(r$)<2 or len(r$)>=30 then goto 6169 6265 for q=1 to len(r$) 6266 if (r$(q)<"0" or r$(q)>"1") and (r$(q)<"a" or r$(q)>"z") then goto 6169 6267 next 6279 return 6289 print at 1,19; 6290 return 6301 print at 8,8; 6302 return 6313 gosub 9229 6314 gosub 6289 6315 return 6325 gosub 6481 6326 goto 6313 6337 if ex<1000*2^lv then goto 6397 6349 gosub 6313 6350 print "went up a level" 6351 rem sound 6352 gosub 6481 6353 let lv=lv+1 6354 let j=int(rnd*qs(4)+1) 6361 let ch=ch+j 6362 let hp=hp+j 6363 if ex>1000*2^lv then let ex=1000*2^lv-1 6373 let cs=cs+lv 6374 let su=su+lv 6385 gosub 6757 6386 gosub 6325 6387 print "gain";j;"hp" 6388 gosub 6481 6389 return 6397 if lv=1 and ex>=0 then return 6409 if ex>=1000*2^(lv-1) then return 6421 let cs=cs-lv 6422 let su=su-lv 6423 if cs<0 then let cs=0 6433 print "went down a level" 6434 gosub 6481 6435 let lv=lv-1 6436 let j=int(rnd*qs(4)+1) 6445 let ch=ch-j 6446 let hp=hp-j 6447 gosub 6757 6448 gosub 6325 6449 print "lose";j;"hp" 6450 gosub 6481 6457 if ch>0 and lv>0 then return 6469 goto 5161 6481 pause 70 6505 return 6517 for q=1 to 100 6518 next 6519 return 6529 let m$=e$(mq*8-7 to mq*8+1) 6541 if m$(len(m$))=" " then goto 6543 6542 goto 6553 6543 let m$=m$(to len(m$)-1) 6544 goto 6541 6553 return 6565 for q=1 to 4 6566 let b(q)=int(rnd*4+1) 6567 next q 6568 return 6577 gosub 6757 6578 gosub 6313 6579 let d=int(rnd*l*6+1) 6580 print "suffer";d;"dmg" 6581 let ch=ch-d 6589 gosub 6481 6590 if ch>0 then return 6601 print "youve been terminated" 6602 gosub 6325 6603 goto 5161 6613 let i=int(rnd*500*cz+1) 6614 print "you "; 6625 if rnd>.5 then print "lost"; 6626 let i=-i 6627 goto 6649 6637 print "gained"; 6649 print tab qs(i);"exp." 6650 let ex=ex+i 6651 gosub 6337 6652 return 6661 let i=int(rnd*6)+1 6662 if rnd>.5 then goto 6697 6673 if qs(i)=18 then goto 6661 6685 print "your ";s$(i*3+1 to i*3+4);" goes up"; 6686 let qs(i)=qs(i)+1 6687 goto 6721 6697 if qs(i)=3 then goto 6661 6709 print "your ";s$(i*3+1 to i*3+4);" goes down"; 6710 let qs(i)=qs(i)-1 6721 print " by 1" 6722 gosub 6481 6723 gosub 6757 6724 gosub 6481 6725 gosub 5413 6726 return 6733 print 1,4; 6734 let en=2 6735 goto 6841 6745 print 1,3; 6746 let en=3 6747 goto 6817 6757 let en=1 6758 cls 6769 print n$( to 7);tab 9;"lvl";str$(lv);" " 6781 print " str";str$(qs(1)); 6782 print tab 9;"con";str$(qs(4)) 6793 print " int";str$(qs(2)); 6794 print tab 9;"dex";str$(qs(5)) 6805 print " wis";str$(qs(3)); 6806 print tab 9;"chr";str$(qs(6)) 6817 let g$=str$(hp) 6818 print " hp";str$(ch);"/";g$(2 to);" " 6829 if en=3 then goto 6997 6841 let g$=str$(su) 6842 print " su";str$(cs);"/";g$(2 to);" " 6853 if en=2 then goto 6997 6865 g$=str$(ex) 6866 let f$=g$( to 14) 6867 print " ex";f$;" "(to 14-len(f$)) 6877 g$=str$(gd) 6878 let f$=g$( to 14) 6879 print " gd";f$;" "(to 14-len(f$)) 6889 for i=1 to 10 6890 if i<4 and kk(i)>=0 then goto 6913 6901 if kk(i)<1 then goto 6973 6913 if i>7 then goto 6961 6925 print " ";a$(i); 6926 if kk(i)>0 then goto 6928 6927 goto 6937 6928 print " +";str$(kk(i));" " 6929 goto 6949 6937 print 6949 goto 6973 6961 print str$(kk(i));" ";a$(i) 6973 next 6985 print 6986 gosub 5461 6997 if k<3 then let k=3 7009 gosub 9109 7010 return 7021 let un=0 7022 if mq=3 or mq=5 or mq=8 or mq=10 or mq=13 or mq=17 or mq=18 then let un=1 7033 return 7045 let r$="" 7057 gosub 6121 7058 if f$<>chr$(119) then goto 7105 7069 if r$="" then goto 7057 7081 print " "; 7082 if len(r$)=1 then goto 7045 7093 let r$=r$( to len(r$)-1) 7094 goto 7057 7105 if f$=chr$(118) then let qc=val(r$) 7106 print 7107 return 7117 if f$="\##" then let qc=0 7118 return 7129 if len(r$)>9 then goto 7057 7141 if f$="-" and r$="" then goto 7165 7153 if f$<"0" or f$>"9" then goto 7057 7165 print f$; 7166 let r$=r$+f$ 7167 goto 7057 7177 gosub 6289 7178 print "youve not been seen" 7189 print " to approach:"; 7190 gosub 6121 7201 if f$=chr$(118) then goto 7203 7202 goto 7213 7203 gosub 6313 7204 goto 949 7213 print at 8,8;" " 7214 gosub 6313 7215 goto 1945 7225 print "spell level:"; 7226 gosub 6121 7227 let qc=val(f$) 7228 printf$ 7237 if qc>0 and qc<=int(lv/3)+1 and qc<7 then goto 7273 7249 if qc=0 then goto 7453 7261 print "dont have that level" 7262 gosub 6481 7263 goto 7453 7273 if qc>cs then print "lacking spell units" 7274 goto 7429 7285 print "spell( = to list):" 7286 gosub 6121 7287 if f$=chr$(118) or f$="\##" then goto 7453 7297 if f$<"1" or f$>"6" then let f$="=" 7309 if f$="=" then goto 7333 7321 let cs=cs-qc 7322 gosub 6733 7323 goto 7369 7333 cls 7334 for i=1 to 6 7335 print i;w$(i+6*(qc-1))(to 20) 7336 next 7345 print 7346 gosub 9193 7347 gosub 6757 7357 goto 7285 7369 let xs=val(f$) 7370 if qc=1 then goto 7501 7371 if qc=2 then goto 7777 7372 if qc=2 then goto 7981 7373 if qc=3 then goto 8197 7374 if qc=4 then goto 8461 7375 if qc=5 then goto 8797 7381 let mh=mh-i 7382 print "it suffers";i;"dmg" 7383 if mh>0 then goto 7429 7393 goto 1393 7405 print "not in melee" 7406 gosub 6325 7407 goto 1441 7417 print "wasted a spell" 7429 gosub 6325 7430 if d=1 then goto 1441 7441 gosub 5413 7442 goto 4393 7453 gosub 6313 7454 if d=1 then goto 1249 7465 gosub 5413 7466 goto 4393 7477 gosub 5413 7478 gosub 6325 7479 goto 1945 7489 print "undead *are* dead" 7490 goto 7429 7501 if xs=1 then goto 7513 7502 if xs=2 then goto 7537 7503 if xs=3 then goto 7621 7504 if xs=4 then goto 7657 7505 if xs=5 then goto 7693 7506 if xs=6 then goto 7765 7507 stop 7513 gosub 6313 7514 print " ";w$(1) 7515 gosub 6325 7516 if d=0 then goto 7417 7525 let i=int(rnd*8+5) 7526 goto 7381 7537 gosub 6313 7538 print " ";w$(2) 7539 gosub 6481 7540 gosub 6313 7541 if d=0 then goto 7417 7549 if un=1 then goto 7551 7550 goto 7561 7551 print "undead dont sleep" 7552 goto 1441 7561 if int(rnd*20+1)>qs(2) then goto 7563 7562 goto 7573 7563 print m$;" isnt sleepy" 7564 goto 1441 7573 print m$;" is sleeping" 7574 print " to kill:" 7575 gosub 6121 7585 if f$<>chr$(118) then goto 7587 7586 goto 7597 7587 gosub 6313 7588 goto 1801 7597 if rnd>.2 then goto 1393 7609 print "it woke up" 7610 gosub 6481 7611 goto 1441 7621 gosub 6757 7622 gosub 6313 7623 print " ";w$(3) 7624 let i=int(rnd*8+1) 7625 print "you feel better" 7626 let ch=ch+i 7633 if ch>hp then let ch=hp 7645 gosub 6745 7646 gosub 6481 7647 goto 7429 7657 let xs=4 7658 let t=3 7659 let u=11 7669 gosub 6313 7670 print " ";w$(xs) 7671 if sf(t)<0 then let sf(t)=0 7681 let sf(t)=sf(t)+int(rnd*u+5) 7682 goto 7429 7693 gosub 6313 7694 print " ";w$(5) 7695 gosub 6325 7696 if d=0 then goto 7417 7705 if un=1 then goto 7729 7717 print m$;" is insulted" 7718 print "being called undead" 7719 goto 7429 7729 if rnd<.05*qs(3)+.05*lv-.05*ml then goto 7753 7741 print m$;" is deaf" 7742 goto 7429 7753 ml=int((ml/2)+.5) 7754 print "it runs in fear" 7755 goto 1405 7765 let xs=6 7766 let t=4 7767 let u=11 7768 goto 7669 7777 if xs=1 then goto 7789 7778 if xs=2 then goto 7861 7779 if xs=3 then goto 7873 7780 if xs=4 then goto 7897 7781 if xs=5 then goto 7909 7782 if xs=6 then goto 7969 7789 gosub 6313 7790 print " ";w$(7) 7791 gosub 6325 7792 if d=0 then goto 7417 7801 if int(rnd^2*20+ml)>qs(2) then goto 7803 7802 goto 7813 7803 print m$;" dodges aside" 7804 goto 1441 7813 print m$;" is webbed" 7814 print " to kill:" 7815 gosub 6121 7825 if f$<>chr$(118) then goto 7827 7826 goto 7837 7827 gosub 6313 7828 goto 1801 7837 if rnd-ml/20>.2 then goto 1393 7849 gosub 6313 7850 print "it broke free" 7851 gosub 6481 7852 goto 1441 7861 let xs=8 7862 let t=5 7863 let u=21 7864 goto 7669 7873 gosub 6313 7874 print " ";w$(9) 7875 gosub 6325 7876 if d=0 then goto 7417 7885 let i=int(rnd*12+3) 7886 goto 7381 7897 let xs=10 7898 let t=2 7899 let u=21 7900 goto 7669 7909 gosub 6313 7910 print " ";w$(11) 7911 gosub 6481 7912 gosub 6313 7913 if d=0 then goto 7417 7921 if un=1 then goto 7923 7922 goto 7933 7923 print "undead ignore you" 7924 goto 1441 7933 if int((rnd^2)*20+1)>qs(6) then goto 7935 7934 goto 7945 7935 print m$;" resists you" 7936 gosub 6481 7937 goto 1441 7945 print m$;" is charmed" 7946 print " to kill:" 7947 gosub 6121 7957 goto 7825 7969 let xs=12 7970 let t=1 7971 let u=21 7972 goto 7669 7981 if xs=1 then goto 7993 7982 if xs=2 then goto 8017 7983 if xs=3 then goto 8053 7984 if xs=4 then goto 8065 7985 if xs=5 then goto 8077 7986 if xs=6 then goto 8149 7993 gosub 6313 7994 print " ";w$(13) 7995 gosub 6481 7996 gosub 6313 7997 print "zzzzaaaapp" 7998 if d=0 then goto 7417 8005 gosub 6481 8006 let i=int(rnd*6*lv+15) 8007 goto 7381 8017 gosub 6757 8018 gosub 6313 8019 print " ";w$(14) 8020 let i=int(rnd*24+1) 8021 print "you feel better" 8022 let ch=ch+i 8029 if ch>hp then let ch=hp 8041 gosub 6745 8042 goto 7429 8053 let xs=15 8054 let t=3 8055 let u=31 8056 goto 7669 8065 let xs=16 8066 let t=6 8067 let u=21 8068 goto 7669 8077 gosub 6313 8078 print " ";w$(17) 8079 gosub 6325 8080 if d=0 then goto 7417 8089 if int(rnd*20+ml)>qs(2) then goto 8091 8090 goto 8101 8091 print m$;" ignores you" 8092 goto 1441 8101 print m$;" is held" 8102 print " to kill:" 8103 gosub 6121 8113 if f$<>chr$(118) then goto 8115 8114 goto 8125 8115 gosub 6313 8116 goto 1801 8125 if rnd>.2+ml*.03 then goto 1393 8137 gosub 6313 8138 print "it broke free" 8139 gosub 6481 8140 goto 1441 8149 gosub 6313 8150 print " ";w$(18) 8151 gosub 6325 8152 if d=0 then goto 7417 8161 if int(rnd*22+ml)"; 8222 gosub 6121 8233 for i=1 to 9 8234 if f$="wxad8246\##"(i to i+1) then goto 8257 8245 next 8246 print "???" 8247 gosub 6313 8248 goto 8221 8257 if i>4 then let i=i-4 8269 if i=5 then goto 7429 8281 if (i=1 and cy>1) or (i=2 and cy<200) or (i=3 and cx>1) or (i=4 and cx<200) then goto 8305 8293 print "only stone there...." 8294 goto 7429 8305 gosub 9181 8306 print "\##\##\##\##%p%o%o%f\##\##\##\##" 8307 if i=1 then goto 4489 8308 if i=2 then goto 4513 8309 if i=3 then goto 4537 8310 if i=4 then goto 4561 8317 gosub 6313 8318 print " ";w$(20) 8319 gosub 6481 8320 gosub 6313 8321 if d=0 then goto 7417 8329 print m$;" is burning" 8330 i=int(rnd*12*lv+15) 8331 gosub 6481 8332 goto 7381 8341 gosub 6313 8342 print " ";w$(21) 8343 gosub 6481 8344 gosub 6325 8345 if d=0 then goto 7417 8353 let i=int(rnd*32+10) 8354 goto 7381 8365 gosub 6313 8366 print " ";w$(22) 8367 gosub 6325 8368 if d=0 then goto 7417 8377 if rnd>.6 then goto 8379 8378 goto 8389 8379 print m$;" isnt affected" 8380 goto 1441 8389 print "one stone statue...." 8390 goto 1393 8401 let xs=23 8402 let t=7 8403 let u=30 8404 goto 7669 8413 gosub 6313 8414 print " ";w$(24) 8415 gosub 6325 8416 print "%d%i%e" 8417 if d=0 then goto 7417 8425 if un=1 then goto 7489 8437 gosub 6481 8438 if rnd>.3+ml*.04-lv*.03 then goto 1393 8449 print m$;" laughs" 8450 gosub 6325 8451 goto 1441 8461 if xs=1 then goto 8473 8462 if xs=2 then goto 8581 8463 if xs=3 then goto 8593 8464 if xs=4 then goto 8641 8465 if xs=5 then goto 8665 8466 if xs=6 then goto 8725 8473 gosub 6313 8474 print " ";w$(25) 8475 gosub 6325 8476 if d=1 then goto 7405 8485 print " +north/-south:"; 8486 gosub 7045 8487 let ny=qc 8488 gosub 6313 8489 print " +east/-west:"; 8490 gosub 7045 8497 gosub 6313 8498 let nx=qc 8499 print " +up/-down:"; 8500 gosub 7045 8501 let nz=qc 8502 let i=sqr(nx^2+ny^2+(nz*5)^2)-.1 8509 gosub 6313 8510 if i>lv*5 then goto 8512 8511 goto 8521 8512 print "too far...try again" 8513 gosub 6325 8514 goto 8485 8521 let nx=cx+nx 8522 let ny=cy-ny 8523 let nz=cz-nz 8533 if nx>0 and nx<201 and ny>0 and ny<201 and nz<51 then goto 8557 8545 print "only stone there...." 8546 print "the spell fails" 8547 goto 7429 8557 if nz<1 then print "only thin air..." 8558 print "the spell fails" 8559 goto 7429 8569 let cx=nx 8570 let cy=ny 8571 let cz=nz 8572 print "\##\##\##%p%o%o%f\##\##\##\##" 8573 gosub 9181 8574 goto 853 8581 let xs=26 8582 let t=8 8583 let u=16 8584 goto 7669 8593 gosub 6313 8594 print " ";w$(27) 8595 if d=0 then goto 7417 8605 print "qwerty" 8606 gosub 6481 8607 if un=0 and rnd<.8 then goto 1393 8617 if un=1 then goto 7489 8629 print m$;" doesnt hear" 8630 goto 7429 8641 gosub 6313 8642 print " ";w$(28) 8643 if d=0 then goto 7417 8653 let i=60 8654 goto 7381 8665 gosub 6313 8666 print " ";w$(29) 8667 print "wwhhooooosshhh" 8677 gosub 6481 8689 if d=0 then goto 7417 8701 if rnd>.4 then goto 8703 8702 goto 8713 8703 print m$;" is gone" 8704 gosub 6481 8705 goto 7477 8713 print m$;" walks over" 8714 let i=int(rnd*12+8) 8715 goto 7381 8725 gosub 6313 8726 print " ";w$(30) 8727 if d=0 then goto 7417 8737 if un=1 then goto 7489 8749 print "death for ";m$ 8761 gosub 6325 8762 if rnd>qs(3)*.05 then goto 8764 8763 goto 8773 8764 print "it is immune" 8765 goto 7429 8773 if rnd*2qs(4)*.06 then goto 8905 8893 print "it works" 8894 let ch=hp 8895 gosub 6481 8896 gosub 6757 8897 goto 7429 8905 print "it doesnt work" 8906 gosub 6481 8907 goto 5161 8917 gosub 6313 8918 print " ";w$(33) 8919 gosub 6325 8920 if d=0 then goto 7417 8929 gosub 6481 8930 if rnd<.9 then goto 1393 8941 print m$;" doesnt see" 8942 goto 7429 8953 gosub 6313 8954 print " ";w$(34) 8955 gosub 6325 8956 if d=1 then goto 7405 8965 for i=0 to 10 8966 let kk(i)=0 8967 next 8968 let gd=0 8969 cls 8970 gosub 6757 8971 gosub 9181 8977 let cx=25 8978 let cy=13 8979 let cz=1 8980 print "***zap***" 8981 gosub 6481 8982 goto 853 8989 gosub 6313 8990 print " ";w$(35) 8991 print "you feel better" 8992 let ch=hp 8993 gosub 6745 9001 goto 7429 9013 gosub 6313 9014 print " ";w$(36) 9025 if d=0 then goto 7417 9037 print m$;" is gone" 9038 gosub 6481 9039 goto 7477 9049 let mq=0 9050 if mm(1)=0 then goto 9073 9061 let mq=mm(1) 9062 let ml=ll(1) 9063 let mh=hh(1) 9064 gosub 7021 9073 for i=1 to 19 9074 let mm(i)=mm(i+1) 9075 let ll(i)=ll(i+1) 9076 let hh(i)=hh(i+1) 9077 next 9085 let mm(20)=0 9086 let ll(20)=0 9087 let hh(20)=0 9088 if mq<>0 then goto 9090 9089 goto 9097 9090 gosub 6301 9091 print "# " 9097 return 9109 print at 0,0; 9110 for q=1 to 20 9111 if mm(q)=0 then goto 9133 9112 goto 9121 9114 goto 9133 9121 print at 0,q;"*" 9133 next 9134 return 9145 for q=19 to 1 step -1 9146 let mm(q+1)=mm(q) 9147 let ll(q+1)=ll(q) 9148 let hh(q+1)=hh(q) 9149 next 9157 if mq=0 then mm(1)=0 9158 let ll(1)=0 9159 let hh(1)=0 9160 return 9169 let mm(1)=mq 9170 let ll(1)=ml 9171 let hh(1)=mh 9172 return 9181 for q=1 to 20 9182 let mm(q)=0 9183 let ll(q)=0 9184 let hh(q)=0 9185 next 9186 return 9193 gosub 6289 9194 print " %h%i%t %a%n%y %k%e%y" 9205 let f$=inkey$ 9206 if f$="" then goto 9206 9217 return 9229 print at 0,19;" " 9230 print at 0,20;" " 9241 print at 0,0; 9242 return 9300 cls