; Army2 (Attack) ; Created for ACOS on 07/22/87 ; In hopes to fix the random # ; problem! on nocar goto no.car print ' Sorry, due to ACOS limitations, this section of the army program has to be modified before anyone can use it again.':goto start print \"Attack Another Army"\ open #1,"i:armies":position #1,42,0:input #1,a if a<2 close:print "Error - No armies to attack!":goto start for b=1 to a:position #1,42,b:input #1,gn,i$,x,x,x if i$="EMPTY" next:close:goto a1 if gn=un next:close:goto a1 print "#"b"] "i$:next:close a1 input @2 \"Attack #" x2:if (not x2) or (x2>a) goto start open #1,"i:armies":position #1,42,x2:input #1,g2,a$,x,x,p2:close if (a$="EMPTY") or (g2=un) print \"Error - Invalid selection":goto a1 open #1,"i:armies":for b=1 to a:position #1,42,b:input #1,g1,i$,x,x,p1 if g1=un x1=b:b=a:next:close:goto a2 next:close:print \"Error - Your army was not found!":goto start a2 print \i$" vs. "a$\ print "Reading soldier's credits." f$="i:army"+str$(x2):f1$="i:army"+str$(x1) t1=0:t2=0:a1=0:a2=0 open #1,f$:position #1,4,0:input #1,a3 if not a3 close:print \"Defending army has no soldiers!":goto start f3$="l:abc"+str$(us):kill f3$:create f3$ for b=1 to a3:position #1,4,b:input #1,us if not us next:close:goto a3 f2$="f:u."+str$(us):open #2,f2$:position #2,5,2 input #2,t3:close #2 open #2,f3$:print #2,t3:close #2 t2=t2+t3:a2=a2+1:next:close a3 e2=t2 if t2<100 print \"Defending army hasn't got enough credits":goto start if not a2 print \"Defending army has no soldiers!":goto start open #1,f1$:position #1,4,0:input #1,a3 if not a3 close:print \"Your army has no soldiers!":goto start f3$="l:abb"+str$(us):kill f3$:create f3$ for b=1 to a3:position #1,4,b:input #1,us if not us next:close:goto a4 f2$="f:u."+str$(us):open #2,f2$:position #2,5,2 input #2,t3:close #2 open #2,f3$:print #2,t3:close #2 t1=t1+t3:a1=a1+1:next:close a4 e1=t1 if t1<100 print \"Your army hasn't got enough credits":goto start if not a1 print \"Your army has no soldiers!":goto start f3$="f:u."+str$(un):open #1,f3$:position #1,5,2:input #1,gh if ((p1*a1)>gh) and (not flag(4)) close:print \"You don't have enough credits to pay your army!":goto start print "You pay a total of "p1*a1" credits." position #1,5,2:print #1,gh-(p1*a1):close print "Defending army's general pays "p2*a2" credits." f3$="f:u."+str$(g2):open #1,f3$:position #1,5,2:input #1,gh position #1,5,2:print #1,gh-(p2*a2):close if t1t2 print i$" is favored to win with a "t1-t2" credit advantage." print i$" has "t1" credits,"\a$" has "t2" credits." create "i:army.log":open #1,"i:army.log":input #1,a a=a+1:if a>9 a=1 mark(1)=0:print #1,a:close fl$="i:log"+str$(a):kill fl$:create fl$:open #1,fl$:append #1 print #1,i$" vs. "a$\"Date: "date$" "time$\ print #1,i$" had "t1" credits,"\a$" had "t2" credits." print #1,i$" has a total of "a1" soldiers."\a$" has a total of "a2" soldiers." close w1$=i$:w2$=a$ f3$=f$+".":kill f3$:create f3$:open #1,f3$:open #2,f$ position #2,4,0:input #2,a:for b=0 to a:position #2,4,b input #2,x:position #1,4,b:print #1,x:next close #1:close #2:f$=f3$ f3$=f1$+".":kill f3$:create f3$:open #1,f3$:open #2,f1$ position #2,4,0:input #2,a:for b=0 to a:position #2,4,b input #2,x:position #1,4,b:print #1,x:next close #1:close #2:f1$=f3$ print \"Entering the battlefield..."\ gn=val(mid$(time$,4,2)):if not gn gn=1 gh=e2/59:e2=(gn*gh)/2 on nocar clear a5 if (not a1) or (not a2) goto bat.end gf=0:open #1,f1$:position #1,4,0:input #1,a a7 if a<1 print \"Fatal Error #1 - Notify -DC-":close:goto start d2$=rnd$:x=random(a):if not x x=1 position #1,4,x:input #1,us if (not us) and (a=1) print \"Fatal Error #2 - Notify -DC-":close:goto start gf=gf+1:if gf=50 print "[HIT SPACE]";:get hd$ print chr$(8,12);chr$(32,12);chr$(8,12);:gf=0 if not us goto a7 gf=0:close:open #1,f$:position #1,4,0:input #1,a a8 if a<1 print \"Fatal Error #3 - Notify -DC-":close:goto start d2$=rnd$:x=random(a):if not x x=1 position #1,4,x:input #1,u1 if (not u1) and (a=1) print \"Fatal Error #4 - Notify -DC-":close:goto start gf=gf+1:if gf=50 print "[HIT SPACE]";:get hd$ print chr$(8,12);chr$(32,12);chr$(8,12);:gf=0 if not u1 goto a8 close:open #1,"b:users":position #1,64,us input #1,a$,b$:n1$=a$+" "+b$ position #1,64,u1:input #1,a$,b$:close n2$=a$+" "+b$ f3$="l:abb"+str$(us):open #1,f3$:input #1,s1:close if s1<1 print n1$" is dead.":a1=a1-1:x=us:goto dead1 f3$="l:abc"+str$(u1):open #1,f3$:input #1,s2:close if s2<1 print n2$" is dead.":a2=a2-1:x=u1:goto dead2 d2$=rnd$:ba=random(100):if ba<50 ba=1 if ba>49 ba=2 if ba=1 print n1$" attacks "n2$ if ba=2 print n2$" attacks "n1$ a6 d2$=rnd$:x=random(s1):if ba=2 x=random(s2) d2$=rnd$:a=random(4) if not a a=1 if a=1 i$="Jabs" if a=2 i$="Rips" if a=3 i$="Hits" if (a=4) and (ba=1) print n1$" misses!" if (a=4) and (ba=2) print n2$" misses!" if a=4 print "[HIT SPACE]";:get d2$ print chr$(8,12);chr$(32,12);chr$(8,12);:goto a5 if ba=2 goto att s2=s2-x:t2=t2-x:print i$" for "x", leaving "s2 if s2<1 print n2$" has been killed.":a2=a2-1:x=u1:goto dead2 f3$="l:abc"+str$(u1):kill f3$:create f3$:open #1,f3$ print #1,s2:close goto a6 att s1=s1-x:t1=t1-x:print i$" for "x", leaving "s1 if s1<1 print n1$" has been killed.":a1=a1-1:x=us:goto dead1 f3$="l:abb"+str$(us):kill f3$:create f3$:open #1,f3$ print #1,s1:close goto a6 dead1 open #1,f1$:position #1,4,0:input #1,a for b=1 to a:position #1,4,b:input #1,ba if ba<>x next:close:print \"Fatal Error #5 - Notify -DC-":goto start x=b:b=a:next:position #1,4,x:print #1,0:close print "[HIT SPACE]";:get d2$:print chr$(8,12);chr$(32,12);chr$(8,12); goto a5 dead2 open #1,f$:position #1,4,0:input #1,a for b=1 to a:position #1,4,b:input #1,ba if ba<>x next:close:print \"Fatal Error #6 - Notify -DC-":goto start x=b:b=a:next:position #1,4,x:print #1,0:close print "[HIT SPACE]";:get d2$:print chr$(8,12);chr$(32,12);chr$(8,12); goto a5 bat.end print \"Battle has ended."\ kill f$:kill f1$ open #1,"i:armies":position #1,42,x1:input #1,gn,i$,w$,l$,p1 if a1>a2 d1$=str$(val(w$)+1):d1$="000"+d1$:d1$=right$(d1$,4):position #1,42,x1:print #1,gn,i$,d1$,l$,p1 if a1a2 d1$=str$(val(l$)+1):d1$="000"+d1$:d1$=right$(d1$,4):position #1,42,x2:print #1,gn,i$,w$,d1$,p2 if a1" c$:print gn=val(mid$(time$,4,2)):if not gn gn=1 gh=e1/59:e1=(gn*gh)/2 if a19500 gf=9500 position #2,5,2:print #2,gf:close #2 f3$="l:abb"+str$(a):kill f3$ f3$="l:abc"+str$(a):kill f3$ if a=un next:close:goto bend edit(0):ready "e:gmail":print #msg(a),un print #6,"Letter From -%>Army Headquarters" print #6,"Date Mailed -%>"date$" "time$\ print #6,"You fought for "w1$" against "w2$" and were victorious!" print #6,"You gained a total of "x" credits." copy #8,#6:print #msg(a),chr$(4);chr$(0); msg(a)=1:update:next:close bend if c$ ul$="Battle comment:"+chr$(13)+c$:gosub army.log open #1,f$:position #1,4,0:input #1,a:x=(e2/a)-p2 print "Defending army's pay is "p2" credits per soldier." print "Defending army's soldiers each lose "e2/a" basic credits, or "x print "with pay included." a$=w1$:w1$=w2$:w2$=a$:p1=p2:g1=g2:goto repeat bend1 ul$=w2$+" won this battle.":gosub army.log print w2$" is victorious... what a waste." ul$="Attacking army's total credit loss: "+str$(e1):gosub army.log ul$="Attacking army's pay per soldier: "+str$(p1):gosub army.log open #1,f$:position #1,4,0:input #1,a2 if e19500 gf=9500 position #2,5,2:print #2,gf:close #2 f3$="l:abc"+str$(a):kill f3$ f3$="l:abb"+str$(a):kill f3$ edit(0):ready "e:gmail":print #msg(a),un print #6,"Letter From -%>Army Headquarters" print #6,"Date Mailed -%>"date$" "time$\ print #6,"You fought for "w2$" against "w1$" and were victorious." print #6,"You gained a total of "x" credits." copy #8,#6:print #msg(a),chr$(4);chr$(0); msg(a)=1:update next:close bend2 open #1,f1$:position #1,4,0:input #1,a:x=(e1/a)-p1 print "Your pay is "p1" credits per soldier." print "Each of your soldiers lose "x" credits.":close #1 ul$=w1$+"'s soldiers each lost "+str$(x)+" credits.":gosub army.log if c$ ul$="Battle comment:"+chr$(13)+c$:gosub army.log open #1,f1$ repeat a1=a:for b=1 to a1:position #1,4,b:input #1,a if not a next:close:goto end f3$="f:u."+str$(a):open #2,f3$:position #2,5,2:input #2,gf gf=gf-x:position #2,5,2:print #2,gf:close #2 kill "l:abb"+str$(a):kill "l:abc"+str$(a) if a=un next:close:goto end edit(0):ready "e:gmail" print #msg(a),un:print #6,"Letter From -%>Army Headquarters" print #6,"Date Mailed -%>"date$" "time$\ print #6,"You fought for "w1$" against "w2$" and were defeated." print #6,"You lost "x" of your credits." copy #8,#6:print #msg(a),chr$(4);chr$(0); msg(a)=1:update next:close end on nocar goto no.car goto start army.log open #1,fl$:append #1:print #1,ul$:close:return start link "a:army.seg","start" no.car link "a:main.seg","term1"