; _ _ _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_][_][_] ; ; The Land of SPUR ; (C)opyright 1987 ; Greg W. Davis ; and ; Peripherals Plus ; ; 08/29/87 13:26 ;-------------------------------- ; Spur.duel ; Adventurer Challenge Segment ; _ _ _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_][_][_] public duel on nocar goto dropped hh=0:b=0:wr$="":cw$="":sx=0 if (sl=cl) and (sr=cr) and (cr<>0)goto chalspur goto challenge duel on nocar goto dropped if bd gosub scn.dsp print \"Return="dc$ print \"["hp;:input @2 "] (D)uel (F)lee (R)eady (S)tats: "i$ if i$="" then i$=left$(dc$,1) if i$="D" then dc$="DUEL":goto attack if i$="F" then dc$="FLEE":goto flee if i$="S" then dc$="STATS":dy$=dz$+"spur.sub":link dy$,"show4" if i$="R" then dc$="READY":gosub rdy.wp:goto duel goto duel ; *********************************** ; * List Adventurers in same Room * ; *********************************** challenge print \"Adventurers in current room:"\ dy$=dx$+"spur.users" ch=0:x=1:open #1,dy$ chlng1 if x=pn x=x+1 position #1,130,x input #1,n2$,ys,yp,yl,yr,yh if (yl=cl) and (yr=cr) then ch=1:print "Adventurer #"x" Name: "n2$ x=x+1:if x>np close: goto chlng2 goto chlng1 ; *********************** ; * Choose Adventurer * ; *********************** chlng2 if not ch print \"No other Adventurers in this room!"\:goto linkgame input @2\"Challenge which Adventurer (CR=Abort) ? "i$:if i$="" goto linkgame x=val(i$):if (x<1) or (x>np) print \"No such Adventurer!":goto chlng2 if x=pn print \"You CANNOT Challenge yourself!":goto chlng2 au=0 open #1,dy$:position #1,130,x input #1,n2$,ys,yp,yl,yr,yh input #1,cs,ct,ci,ce,cw,cd input #1,ya,yb,yc,yd,ye,yf,yg,yi,yj,yk,ym,yn input #1,p2$:close if (cl<>yl) or (cr<>yr) print \"That Adventurer is NOT here!":goto chlng2 if xp>yn print\"Ye may NOT Challenge a lower level Player!":goto chlng2 gosub opnt.wp:if hh gosub hndtohnd print \n2$" says: 'I accept your Challenge!'" if yn>xp print \"FOOL!! I am a level "yn" Player!!" if not hh print \"I choose "cw$ input @0\"Do you wish to battle to the death? "i$ if i$="Y" then b=1 h=yh if not hh gosub rdy.wp dc$="DUEL":goto duel ; ****************** ; * Hand to Hand * ; ****************** hndtohnd print \n2$" says: ' I fear you not, and would gladly do battle with you, but as you see, I have no weapons!' input @0\"Wilst Thou fight me hand to hand? "i$:if i$<>"Y" pop:goto linkgame wr$="FISTS":cw$="FISTS":gosub set.hh:wd=p1:w4=p2:ws=p3:w3=p4 return ; ****************************** ; * Challenger Choose Weapon * ; ****************************** rdy.wp if hh print \"Thou art a Cheat and a COWARD!":pop:hp=hp-1:goto attack1 if ps<3 print \"Not enough strength to ready a weapon!":return if xw=0 print \"You have No Weapons!":return print \"Choose a Weapon:"\ dy$=dx$+"weapons" open #1,dy$ for e=1 to xw y=(e*4)-3:a=val(mid$(xw$,y)) position #1,34,a,2 input #1,w$ print e". "mid$(w$,3) next rdy.wp1 input \"Weapon number you choose ? "x if (x<1) or (x>xw) print \"You don't have that weapon!":goto rdy.wp1 y=(x*4)-3:a=val(mid$(xw$,y)) position #1,34,a,2 input #1,wr$\ws,wd wr$=mid$(wr$,3):print \wr$" readied!" gosub set.hh wd=wd*5/10:x=p1*7/10:wd=wd+x ws=(ws+p3)/2 close:return ; ******************************* ; * Get Opponents Best Weapon * ; ******************************* opnt.wp dy$=dx$+"weapons":dw$=dx$+"spur.weapons" open #1,dy$:open #2,dw$ position #2,64,yp input #2,c\i$:if c=0 print \n2$" has no Weapons!":close:hh=1:return w4=0:for e=1 to c y=(e*4)-3:a=val(mid$(i$,y)) position #1,34,a,2 input #1,w$\w1,w2 if w2>w4 then w3=w1:w4=w2:cw$=w$ next:close:cw$=mid$(cw$,3) gosub set.hh w4=w4*5/10:x=p2*7/10:w4=w4+x w3=(w3+p4)/2 return ; ******************** ; * Challenge SPUR * ; ******************** chalspur x=pe+pi+ps+pw+pt+pd if x<90 print \' "Thou art too weak to challenge the omnipotent Spur!"':goto linkflee print \' SPUR asks "Doest thou dare challenge me?" ';:input @0 i$ if i$<>"Y" print \"Return when thy courage is greater!":goto linkflee cs=20:ct=20:ci=20:ce=20:cw=20:cd=20 h=10*sl:h=h+random(10) a=xl*3:if aw4 then w3=w1:w4=w2:cw$=w$ next:close:cw$=mid$(cw$,3) gosub set.hh w4=w4*5/10:x=p2*7/10:w4=w4+x w3=(w3+p4)/2 gosub rdy.wp:goto duel ; ************************* ; * YOU Attack Opponent * ; ************************* attack if (not au) and (sd=1) gosub at.tune if wr$="" goto attack1 gosub get.numb if a>4 goto attack1 zz$=rnd$:w1=random(wd*xp):if w1=0 then w1=1 gosub get.numb print \"You Attack "n2$"!!";:if ws>a print" Hit!":else print" Miss!":goto duel if ye print "Shield takes Hit!":ye=ye-1:w1=w1-1 if w1<=0 goto duel if yf print "Armor takes Hit!":yf=yf-2:w1=w1-2 if yf<0 then yf=0 if w1<=0 goto duel print n2$" Hit! Takes "w1" damage!":h=h-w1 if h<=0 then ch=1:goto hell goto duel ; ************************** ; * OPPONENT Attacks You * ; ************************** attack1 if hp<=0 then ch=0:goto hell2 zz$=rnd$:w1=random(w4*xp):if w1=0 then w1=1 gosub get.numb print \n2$" Attacks with "cw$"!!":if w3>a print "Hit!":else print "Miss!":goto duel if sh print "Shield takes Hit!":sh=sh-1:w1=w1-1 if w1<=0 goto duel if ar print "Armor takes Hit!":ar=ar-2:w1=w1-2 if ar<0 then ar=0 if w1<=0 goto duel print n1$" Hit! Takes "w1" damage!":hp=hp-w1:ps=ps-1 if hp<=0 then ch=0:goto hell2 if ps<3 then wr$="":print\' Thy strength is fading... Unable to defend thyself!!' goto duel flee if b print \"Thy choice has been made!":goto duel gosub get.numb:a=(a*10):if (a+pi+pw+pe)>90 goto flee2 print \n2$' blocks your path! "Stand and fight you COWARD!!"' goto attack1 flee2 print \n2$' cries: "Run you COWARD!!! I will catch you at a later date!"' print \"In your haste to escape you have dropped all your weapons!" gosub strip.wp goto linkflee ; **************************************** ; * Winner declared and Gold Exchanged * ; **************************************** hell if (b) or (sx) print \"You have killed "n2$" !!!!":else print \"You have vanquished "n2$" !!!!" yb=yb+1000:if b=1 then yb=yb+1000 if yb=>10000 then ya=ya+1:yb=yb-10000 g1=ya:g2=yb:gosub prt.gold:print "You are now $"gd$" in gold richer!":gh=gh+ya:gl=gl+yb:ya=0:yb=0 if gl=>10000 then gl=gl-10000:gh=gh+1 yl=1:yr=0 f$=dx$+"spur.duels":create f$:open #1,f$:append #1 sd$=date$+" "+left$(n1$+" ",15)+" defeated "+left$(n2$+" ",15)+" "+gd$ if cr=0 sd$=sd$+" Market":else sd$=sd$+" "+lo$ print #1,sd$:close#1 if (sx) sr=0:goto linkgame goto wr.stat hell2 if b print \"You have been killed by "n2$" !":else print \"You have been vanquished by "n2$" !":hp=3 gl=gl+1000:if b=1 then gl=gl+1000 if gl=>10000 then gh=gh+1:gl=gl-10000 ya=ya+gh:yb=yb+gl:if yb=>10000 then yb=yb-10000:ya=ya+1 g1=gh:g2=gl:gh=0:gl=0:gosub prt.gold f$=dx$+"spur.duels":create f$:open #1,f$:append #1 sd$=date$+" "+left$(n1$+" ",15)+" lost to "+left$(n2$+" ",15)+" "+gd$ if cr=0 sd$=sd$+" Market":else sd$=sd$+" "+lo$ print #1,sd$:close#1 if b goto wr.stat print 'As is his right, he has stripped you of all your weapons, gold and belongings!' strip gosub strip.it:xf=0:xf$="":wr$="":ws=0:wd=0 if (a1) or (a2) or (a3) print \"Your Allies have abandoned you!":a1=0:a2=0:a3=0:d1$="*":d2$="*":d3$="*" ps=ps/2:pw=pw/2:pe=pe/2 wr.stat if (sx) goto linkflee dy$=dx$+"spur.users" open #1,dy$:position #1,130,yp print #1,n2$,ys,yp,yl,yr,yh print #1,cs,ct,ci,ce,cw,cd print #1,ya,yb,yc,yd,ye,yf,yg,yi,yj,yk,ym,yn print #1,p2$ close ; ***************************** ; * Send E-Mail to Opponent * ; ***************************** sendmail dy$=dm$+"mail":ready dy$:edit(0) if info(6)<29 goto endduel print #msg(ys),sn:print #6," ** Results from a Challenge in SPUR **" print #6,\" Date -> "date$" "time$\ if ch then print #6,"You were defeated by "n1$:else print #6,"You were victorious over "n1$ print #6,"in a Duel in the ";:if cr=0 print #6,"Shoppe":else print #6,lo$ print #6,"in "g$ if ch then print #6,n1$" was awarded "gd$" gold!":else print #6,"You won "gd$" gold!" if ch then print#6, \"You were stripped of all your gold!" copy #8,#6 print #msg(ys),chr$(4);chr$(0); msg(ys)=1:update dp=1:print \"Your Opponent has been notified!"\ endduel if (b=1) and (ch=0) goto linkdead:else goto linkgame strip.it xi=0:xi$="":xm=0:xm$="" fre.ally if d1$<>"*" x=h1:gosub free2 if d2$<>"*" x=h2:gosub free2 if d3$<>"*" x=h3:gosub free2 goto strip.wp free2 if x<=0 return dy$=dx$+"allies":open #1,dy$ position #1,26,x print #1,1:close:return strip.wp dy$=dx$+"weapons" open #1,dy$ if xw=0 close:return for x=1 to xw y=(x*4)-3:a=val(mid$(xw$,y)) cb$="2":if a>10 then cb$="1" position #1,34,a print #1,cb$ next:close xw=0:xw$="":return at.tune pl$="134,100,81,67,67,67,67,81,81,81,81,100,81,100,134" du$="70,70,90,40,20,20,60,40,20,20,60,70,80,80,180" au=1:goto tune tune p=val(pl$):du=val(du$) tone(p,du) a=instr(",",pl$):if a=0 return pl$=mid$(pl$,a+1) a=instr(",",du$):if a=0 return du$=mid$(du$,a+1) goto tune prt.gold a$=str$(g1):gd$="0000":if g1=0 then gd$=" ":a$=" " gd$=right$(" "+a$,5)+right$(gd$+str$(g2),4) return get.numb zz$=rnd$:zz$=rnd$:a=random(100) mod 10 return ; *********************************** ; * Set attribute related factors * ; *********************************** set.hh p1=ps+pd+pt+pe:p1=p1/10 p2=cs+cd+ct+ce:p2=p2/8 if p1>9 then a=p1-9:p1=9:p2=p2-a if p2>9 then a=p2-9:p2=9:p1=p1-a if p1<3 then p1=3 if p2<3 then p2=3 p3=pw+pi:p3=p3/4 p4=cw+ci:p4=p4/4 if p3>9 then a=p3-9:p3=9:p4=p4-a if p4>9 then a=p4-9:p4=9:p3=p3-a if p3<5 then p3=5 if p4<5 then p4=5 return scn.dsp print #3 @21,23 right$(" "+str$(ps),3) if peek(33)=40 goto scn.rtn print #3 @63,23 right$(" "+str$(ar),3) print #3 @70,23 right$(" "+str$(sh),3) scn.rtn print #3 @1,20 return linkgame wr$="" if lk=10 then lk=0:dy$=dz$+"spur.shop":link dy$,"main1" dy$=dz$+"spur.main" ready dr$:link dy$,"travel3" linkdead wr$="":xn=sn:sn=0 dy$=dz$+"spur.logon" link dy$,"deadplr" linkflee wr$="":if hp<=0 then goto linkdead if cr=0 goto linkshop dy$=dz$+"spur.main" ready dr$ link dy$,"flee2" linkshop f$=dx$+"d.level"+str$(cl):open #1,f$ input #1,ln$,nr,ri:close #1 if (not nr) print "Undefined level":cl=1:cr=0:dy$=dz$+"spur.sub":link dy$,"quit" print\"You have entered "ln$"!":dr$=dx$+"room.level"+str$(cl):ready dr$ dy$=dz$+"spur.main" link dy$,"flee2" dropped if (b) or (hp<=0) then sn=0 dy$=dz$+"spur.logon" link dy$,"quit3"