home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 4: Phase Four / 17Bit_Phase_Four.iso / files / 3082b.dms / 3082b.adf / Code / Barebones.AMOS / Barebones.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1993-02-25  |  43.3 KB  |  1,585 lines

  1. Set Buffer 17
  2. '                    -------- Ant Wars --------- 
  3. '
  4. '                              V 1.1 
  5. '
  6. '  You are allowed to use (small) parts of this program in your own  
  7. '     games , as long as you give me credit for it , all right ? 
  8. '   Chris Gregan , Sheaf o' Wheat , Dunboyne , Co. Meath , Ireland   
  9. '  Just because you're Paranoid , don't mean they're not after you ! 
  10. '
  11. Bob Update On 
  12. Hide On : Change Mouse 1
  13. Screen Open 0,640,512,2,Hires+Laced : Cls 0
  14. Screen Hide 0
  15. Load Iff "df0:nemesis"
  16. Colour 1,$0 : Screen Show 0
  17. For N=1 To 14
  18. Read A : Colour 1,A : Wait 3 : Next N
  19. Data $111,$222,$333,$444,$555,$666,$777,$888,$999,$AAA,$BBB,$CCC,$DDD,$EEE
  20. Do 
  21.    N=N+1
  22.    If Mouse Key or Fire(1)=-1 Then Exit 
  23.    If Inkey$<>"" Then Exit 
  24.    If N=10000 Then Exit 
  25. Loop 
  26. Fade 2 : Wait 30
  27. Screen Close 0 : Wait Vbl 
  28. Screen Open 0,320,256,2,Lowres : Cls 0 : Ink 1 : Curs Off 
  29. Screen Hide 0
  30. Unpack 8 To 0
  31. Screen Display 0,135,60,320,200
  32. Wait Vbl 
  33. Screen Show 0
  34. Do 
  35.    N=N+1
  36.    If Mouse Key or Fire(1)=-1 Then Exit 
  37.    If Inkey$<>"" Then Exit 
  38.    If N=25000 Then Exit 
  39. Loop 
  40. Unpack 9 To 0
  41. Close Editor 
  42. ROOT$="df0:code/groundmap4" : Rem Directory of Map 
  43. GRAPHIC$="Ant_War2:graphics/bobbank(blocks).abk"
  44. Global CF1
  45. MX=1000
  46. Dim MOBX(MX),MOBY(MX),MOBN(MX)
  47. ANTS#=40 : ANT=1 : MP=1 : AC=0 : GOS=10 : Rem AC=ant colour
  48. Dim X(ANTS#),Y(ANTS#),DINC(ANTS#),ACTIVE(ANTS#)
  49. Global BLX,BLY,GGG,FLAGKILL
  50. Global Z,X(),Y(),DINC(),ANT,ANTS#,ACTIVE(),MP,ESC,AC,GOS,XX,YY,HN,B$
  51. Global MOBX(),MOBY(),MOBN(),MOB,OFFSX,OFFSY,A$,ROOT$,GRAPHIC$,SX,SY
  52. Global CT1,CT2,SXR,SYR,SXB,SYB,XXA,YYA,DDA,XM,BASX,BASY,BASX2,BASY2
  53. Global B1,B2,CAN1,CAN2
  54. Global R#,B#
  55. B1=2
  56. B2=2
  57. Global BUG,EX
  58. BX#=100 : BY#=100
  59. Global BX#,BY#,ANGLE#,F
  60. Dim HX(2),HY(2),HDINC(2),HP(2)
  61. HD1=0 : HD2=0
  62. HDINC(1)=102 : HDINC(2)=102 : HC=0
  63. Global HX(),HY(),HDINC(),HC,FRAME,HP(),HD1,HD2,Q
  64. Dim SMF(23),SML(23)
  65. Global SMF(),SML(),OFF
  66. TITLE
  67. Show 
  68. GRAPHIX
  69. ESCAPE
  70. _SCROLL
  71. SETAMAL
  72. HELI
  73. 1
  74. Do 
  75.    BUTTONS
  76. Loop 
  77. Procedure SOUNDS
  78.    Load "df0:basicsounds.abk",5
  79.    If Chip Free>512000
  80.       CF1=1
  81.       Screen 1 : Centre "...1 Mb Chip Mem allocated..."
  82.       Print : Print : Centre "Loading Enhanced Samples !"
  83.       Load "df0:sounds.abk",6
  84.       Cls 0
  85.    End If 
  86. End Proc
  87. Procedure TITLE
  88.    ST:
  89.    Rainbow Del 
  90.    Sam Loop On 
  91.    Load "Ant_War2:tunes.abk",5
  92.    Sam Bank 5
  93.    Sam Play 1
  94.    Fade 2 : Wait 30
  95.    Erase 8
  96.    Erase 9
  97.    Show On 
  98.    Screen Open 0,320,200,16,Lowres
  99.    Cls 0
  100.    Restore 
  101.    Read A
  102.    Screen Open 0,320,208,4,Lowres : Curs Off 
  103.    Screen Display 0,,50,,
  104.    Set Rainbow 0,1,30,"(1,1,15)(1,-1,15)","",""
  105.    Rainbow 0,0,49,212 : Rem - Thanks to whoever programmed this bit ! -
  106.    Channel 0 To Rainbow 0
  107.    Amal 0,"Loop: For RA=0 To 29; Let X=RA; P;P;P;P;P; Next RA; Jump Loop"
  108.    Amal On 
  109.    Curs Off : Flash Off 
  110.    Paper 0 : Ink 0
  111.    Bar 100,20 To 222,180
  112.    Ink 2 : Box 101,21 To 221,179
  113.    Print : Print : Print 
  114.    Centre "Select A Level"
  115.    Print : Print 
  116.    Reserve Zone A
  117.    For N=1 To A
  118.       Read B$
  119.       X$=Zone$(B$,N)
  120.       Centre X$
  121.       Print 
  122.    Next N
  123.    Locate 14,20
  124.    Print "Choice :";
  125.    Do 
  126.       If Mouse Key=1 and Mouse Zone>0 Then K=Mouse Zone : Exit 
  127.       MZ=Mouse Zone
  128.       If MZ<>MZZ
  129.          Locate 22,20
  130.          Print "    "
  131.          Locate 22,20
  132.       End If 
  133.       If Mouse Zone>0 Then Locate 22,20 : Print Mouse Zone
  134.       MZZ=MZ
  135.    Loop 
  136.    Curs Off : Sam Stop : Sam Loop Off : Amal Off 
  137.    Erase 5
  138.    Data 13
  139.    Data "1:Care Bear"
  140.    Data "2:Hair Bear"
  141.    Data "3:Rockies  "
  142.    Data "4:Radland  "
  143.    Data "5:Muck     "
  144.    Data "6:Wooly    "
  145.    Data "7:Mud      "
  146.    Data "8:Mess     "
  147.    Data "9:The Pit  "
  148.    Data "10:A bugger"
  149.    Data "11:Fortress"
  150.    Data "12:Strange "
  151.    Data "13:Random  "
  152.    If K=1
  153.       ROOT$="Ant_War2:maps/cloudmap1"
  154.       GRAPHIC$="Ant_War2:graphics/bobbank(cloud).abk"
  155.    End If 
  156.    If K=2
  157.       ROOT$="Ant_War2:maps/cloudmap2"
  158.       GRAPHIC$="Ant_War2:graphics/bobbank(cloud).abk"
  159.    End If 
  160.    If K=3
  161.       ROOT$="Ant_War2:maps/rockmap"
  162.       GRAPHIC$="Ant_War2:graphics/bobbank(blocks).abk"
  163.    End If 
  164.    If K=4
  165.       ROOT$="Ant_War2:maps/rockmap2"
  166.       GRAPHIC$="Ant_War2:graphics/bobbank(blocks).abk"
  167.    End If 
  168.    If K=5
  169.       ROOT$="Ant_War2:maps/groundmap2"
  170.       GRAPHIC$="Ant_War2:graphics/bobbank(blocks).abk"
  171.    End If 
  172.    If K=6
  173.       ROOT$="Ant_War2:maps/tablemap1"
  174.       GRAPHIC$="Ant_War2:graphics/bobbank(cloud).abk"
  175.    End If 
  176.    If K=7
  177.       ROOT$="Ant_War2:maps/tablemap2"
  178.       GRAPHIC$="Ant_War2:graphics/bobbank(special).abk"
  179.    End If 
  180.    If K=8
  181.       ROOT$="Ant_War2:maps/tablemap3"
  182.       GRAPHIC$="Ant_War2:graphics/bobbank(special).abk"
  183.    End If 
  184.    If K=9
  185.       ROOT$="Ant_War2:maps/thepit"
  186.       GRAPHIC$="Ant_War2:graphics/bobbank(blocks).abk"
  187.    End If 
  188.    '
  189.    If K=10
  190.       ROOT$="Ant_War2:maps/bugger"
  191.       GRAPHIC$="Ant_War2:graphics/bobbank(cloud).abk"
  192.    End If 
  193.    If K=11
  194.       ROOT$="Ant_War2:maps/surreal#1"
  195.       GRAPHIC$="Ant_War2:graphics/bobbank(blocks).abk"
  196.    End If 
  197.    If K=12
  198.       ROOT$="Ant_War2:maps/surreal#2"
  199.       GRAPHIC$="Ant_War2:graphics/bobbank(special).abk"
  200.    End If 
  201.    For N=ANTS#/2 To ANTS#
  202.       DINC(N)=4
  203.    Next N
  204.    If K=13
  205.       SX=1008 : SY=200
  206.       Load "Ant_War2:graphics/bobbank(ants).abk"
  207.       SCREEOPEN
  208.       RANMAP
  209.       Stop 
  210.    End If 
  211. End Proc
  212. Procedure SCREEOPEN
  213.    Fade 2 : Wait 15*2
  214.    Screen Open 1,320,62,16,Lowres : Curs Off : Paper 0 : Flash Off : Cls 
  215.    Rainbow Del 
  216.    Screen Open 0,SX,200,16,Lowres : Paper 0 : Cls : Curs Off : Flash Off 
  217.    Screen Display 0,135,113,320,196
  218.    Screen Hide 0
  219.    Autoback 0
  220.    Limit Mouse 128,105-55 To 447,300
  221.    Get Sprite Palette 
  222. End Proc
  223. Procedure GRAPHIX
  224.    Load GRAPHIC$
  225. End Proc
  226. Procedure GRAPHICS
  227.    Load "Ant_War2:graphics/bobbank(ants).abk"
  228.    Get Sprite Palette 
  229.    Double Buffer : Wait Vbl 
  230.    Bob 49,BASX,BASY,124
  231.    Bob 50,BASX2,BASY2,123
  232.    Screen Show 0
  233.    SOUNDS
  234.    Screen 1 : Get Sprite Palette : Screen 0
  235.    Wait Vbl 
  236. End Proc
  237. Procedure RANMAP
  238.    3
  239.    SOUNDS : Screen 0
  240.    Screen Show 0 : Screen Offset 0,0,0
  241.    Get Sprite Palette 
  242.    Cls 0 : Wait 5
  243.    X=60 : Y#=100 : I#=0.3 : D=-1
  244.    Ink 5 : Bar 0,100-25 To X,200
  245.    Repeat 
  246.       Ink 5
  247.       If Y#-25>3 Then Draw X,200 To X,Y#-25 Else Draw X,200 To X,3
  248.       If Y#-25>3 Then Ink 4 : Draw X,Y#-25 To X,Y#-27 Else Ink 4 : Draw X,5 To X,3
  249.       If X>180 and X<846 Then Screen Offset 0,X-180,
  250.       Y#=Y#+I#
  251.       If D=1 Then I#=I#+0.05
  252.       If D=-1 Then I#=I#-0.05
  253.       If I#>1 and D=1 Then D=-1 : I#=0
  254.       If I#>1 and D=-1 Then D=1 : I#=0
  255.       If Rnd(2)=2 Then D=D*-1
  256.       If Y#>170 Then D=-1
  257.       If Y#<60 Then D=1
  258.       If X>700 and Y#<90 Then D=1 : I#=I#+0.1
  259.       X=X+1
  260.    Until X=938
  261.    Ink 5
  262.    Bar X,Y#-27 To 1008,200
  263.    Double Buffer 
  264.    Bob 49,-2,35,124
  265.    Bob 50,935,Y#-70,123
  266.    BASX=-2 : BASY=35
  267.    SXB=BASX+35 : SYB=BASY-5 : HX(2)=90 : HY(2)=15
  268.    BASX2=935 : BASY2=Y#-70
  269.    SXR=BASX2+35 : SYR=BASY2-5 : HX(1)=910 : HY(1)=20
  270.    For N=1 To ANTS#/2
  271.       X(N)=SXR : Y(N)=SYR : DINC(N)=0 : ACTIVE(N)=2
  272.    Next N
  273.    For N=(ANTS#/2)+1 To ANTS#
  274.       X(N)=SXB : Y(N)=SYB : DINC(N)=0 : ACTIVE(N)=2
  275.    Next N
  276.    Bob 62,,,108
  277.    Bob 63,,,105
  278.    HELI
  279.    Wait Vbl 
  280.    _SCROLL
  281.    SETAMAL
  282.    Screen Offset 0,1008-320,
  283.    Screen 1 : Cls 
  284.    Ink 0 : Bar 0,0 To 1008,3
  285.    Ink 1
  286.    Centre "Is this O.K  ? ("
  287.    Reserve Zone 2
  288.    Print Zone$("Y",1);
  289.    Print "/";
  290.    Print Zone$("N",2);
  291.    Print ") ";
  292.    Do 
  293.       A$=Inkey$
  294.       If A$="y" Then Print "Y" : Goto 2
  295.       If Mouse Zone=1 and Mouse Key=1 Then Print "Y" : Goto 2
  296.       If A$="n" Then Print "N" : Bob Off : SCREEOPEN : Goto 3
  297.       If Mouse Zone=2 and Mouse Key=1 Then Print "N" : Bob Off : SCREEOPEN : Goto 3
  298.       If MZ<>Mouse Zone and Mouse Zone=1 Then Locate 33,0 : Print "  " : Locate 33,0 : Print "Y" : MZ=Mouse Zone
  299.       If MZ<>Mouse Zone and Mouse Zone=2 Then Locate 33,0 : Print "  " : Locate 33,0 : Print "N" : MZ=Mouse Zone
  300.       If Mouse Zone=0 Then Locate 33,0 : Print "  " : Locate 33,0 : MZ=0
  301.       Locate 33,0
  302.    Loop 
  303.    2
  304.    Do 
  305.       BUTTONS
  306.    Loop 
  307. End Proc
  308. Procedure ESCAPE
  309.    Open In 1,ROOT$
  310.    Input #1,SX
  311.    Input #1,SY
  312.    Input #1,T : MOB=T
  313.    For N=1 To MOB
  314.       Input #1,A
  315.       Input #1,B
  316.       Input #1,C
  317.       MOBX(N)=A
  318.       MOBY(N)=B
  319.       MOBN(N)=C
  320.    Next N
  321.    Input #1,HX(2)
  322.    Input #1,HY(2)
  323.    Input #1,HX(1)
  324.    Input #1,HY(1)
  325.    Input #1,BASX
  326.    Input #1,BASY
  327.    Input #1,BASX2
  328.    Input #1,BASY2
  329.    Input #1,SXB
  330.    Input #1,SYB
  331.    Input #1,SXR
  332.    Input #1,SYR
  333.    Close 1
  334.    For N=1 To ANTS#/2
  335.       X(N)=SXR : Y(N)=SYR : DINC(N)=0 : ACTIVE(N)=2
  336.    Next N
  337.    For N=(ANTS#/2)+1 To ANTS#
  338.       X(N)=SXB : Y(N)=SYB : DINC(N)=0 : ACTIVE(N)=2
  339.    Next N
  340.    SCREEOPEN
  341.    For N=1 To MOB
  342.       Paste Bob MOBX(N),MOBY(N),MOBN(N)
  343.    Next N
  344.    Ink 0 : Bar 0,0 To 1008,3
  345.    GRAPHICS
  346. End Proc
  347. Procedure _SCROLL
  348.    Channel 3 To Screen Offset 0
  349.    A$=A$+"Loop:"
  350.    A$=A$+""
  351.    A$=A$+"I: If YM=50 then Jump E"
  352.    A$=A$+"J: If YM=300 then Jump F"
  353.    A$=A$+"K: If XM=128 then Jump G"
  354.    A$=A$+"M: If XM=447 then Jump H"
  355.    A$=A$+"Jump Loop"
  356.    A$=A$+"E: If Y>0 then Jump A Jump J"
  357.    A$=A$+"F: If Y<7 then Jump B Jump K"
  358.    A$=A$+"G: If X>0 then Jump C Jump M"
  359.    A$=A$+"H: If X<688 then Jump D Jump I"
  360.    A$=A$+"A: Let Y=Y-1 Jump Loop"
  361.    A$=A$+"B: Let Y=Y+1 Jump Loop"
  362.    A$=A$+"C: Let X=X-1 Jump Loop"
  363.    A$=A$+"D: Let X=X+1 Jump Loop"
  364.    Amal 3,A$
  365.    Amal On 3
  366. End Proc
  367. Procedure MOVE
  368.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  369.    Paste Bob 0,0,51
  370.    SELECTANT
  371.    If ANT=>666 Then GOS=GOS+1 : Pop Proc
  372.    Screen 0
  373.    Bob Update On : Amal On 
  374.    QUOTA=35
  375.    A$=""
  376.    XM=X(ANT)
  377.    Screen 1 : Locate 12,5
  378.    Print "Space Bar to end move."
  379.    Do 
  380.       A$=Inkey$
  381.       Screen 0
  382.       If Mouse Key=1 Then XM=X Screen(X Mouse) : SAMLAY[8]
  383.       If Point(X(ANT),Y(ANT)+1)=0 Then FALL
  384.       If ACTIVE(ANT)=1 and XM<X(ANT)-2 Then DINC(ANT)=4 : FRAMES : QUOTA=QUOTA-1
  385.       If ACTIVE(ANT)=1 and XM>X(ANT)+2 Then DINC(ANT)=0 : FRAMES : QUOTA=QUOTA-1
  386.       MESSMOUSE
  387.       If A$=" " Then QUOTA=0
  388.       If DUM<>QUOTA
  389.          Screen 1
  390.          Locate 22,3 : Print "Steps :     ";
  391.          Locate 30,3 : Print QUOTA : Screen 0
  392.       End If 
  393.       DUM=QUOTA
  394.       If QUOTA=0 Then Exit 
  395.       If QUOTA=38 Then AAANT=ANT : GRAVITY : ANT=AAANT
  396.    Loop 
  397. End Proc
  398. Procedure FALL
  399.    Screen 0
  400.    Repeat 
  401.       FAL=FAL+1
  402.       Y(ANT)=Y(ANT)+1
  403.       If FAL>4 and ACTIVE(ANT)=1 Then Bob ANT,X(ANT),Y(ANT),9+AC
  404.       If FAL<4 and ACTIVE(ANT)=1 Then Bob ANT,X(ANT),Y(ANT),DINC(ANT)+1+AC
  405.       If X(ANT)>SX or X(ANT)<0 or Y(ANT)>200 Then DEAD
  406.       For N=1 To 10 : Next N
  407.    Until Point(X(ANT),Y(ANT)+1)>0
  408.    If ACTIVE(ANT)=1 Then Bob ANT,X(ANT),Y(ANT),DINC(ANT)+1+AC : Wait Vbl 
  409.    If Point(X(ANT),Y(ANT)+1)>0 and FAL>80 Then SPLAT
  410. End Proc
  411. Procedure CHECKPOS
  412.    If Point(X(ANT),Y(ANT))>0 Then LIFT
  413.    If X(ANT)>SX or X(ANT)<0 or Y(ANT)>SY Then DEAD
  414. End Proc
  415. Procedure LIFT
  416.    Repeat 
  417.       If Point(X(ANT),Y(ANT))>0 Then Y(ANT)=Y(ANT)-1 : RI=RI+1
  418.       If RI=15
  419.          X(ANT)=XXA
  420.          Y(ANT)=YYA
  421.          DINC(ANT)=DDA
  422.          XM=X(ANT)
  423.          Exit 
  424.       End If 
  425.    Until Point(X(ANT),Y(ANT))=0 or Y(ANT)<=0
  426. End Proc
  427. Procedure SPLAT
  428.    SAMLAY[1]
  429.    For N=41 To 46
  430.       Bob ANT,X(ANT),Y(ANT),N
  431.       Wait Vbl 
  432.    Next N
  433.    Bob Off ANT : Wait Vbl 
  434.    Paste Bob X(ANT)-11,Y(ANT)-4,46
  435.    If ANT<20 Then R#=R#+1 Else B#=B#+1
  436.    DEAD
  437. End Proc
  438. Procedure FRAMES
  439.    For N=2 To 4
  440.       If ACTIVE(ANT)=1 Then Bob ANT,X(ANT),Y(ANT),N+DINC(ANT)+AC : Wait Vbl 
  441.    Next N
  442.    XXA=X(ANT) : YYA=Y(ANT) : DDA=DINC(ANT)
  443.    For D=1 To 5
  444.       If DINC(ANT)=0 Then X(ANT)=X(ANT)+1
  445.       If DINC(ANT)=4 Then X(ANT)=X(ANT)-1
  446.       CHECKPOS
  447.    Next D
  448.    If ACTIVE(ANT)=1 Then Bob ANT,X(ANT),Y(ANT),1+DINC(ANT)+AC : Wait Vbl 
  449. End Proc
  450. Procedure DEAD
  451.    ACTIVE(ANT)=0
  452.    Bob Off ANT : ANTSORT : Wait Vbl 
  453. End Proc
  454. Procedure BAZOOKROUTINE
  455.    Do 
  456.       Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  457.       Paste Bob 0,0,54
  458.       SELECTANT
  459.       If ANT=>666 Then GOS=GOS+1 : Pop Proc
  460.       Screen 1
  461.       Ink 1
  462.       E=0
  463.       Locate 15,5 : Print "Enter X to Esc"
  464.       Curs Off 
  465.       Locate 15,3 : Print "Angle :(0-180)"; : Input AN$
  466.       Curs Off 
  467.       If AN$="x" Then GOS=GOS+1 : Pop Proc
  468.       If AN$="X" Then GOS=GOS+1 : Pop Proc
  469.       Curs Off 
  470.       Locate 15,3 : Print " Force :(1-50)     "; : Locate 15+14,3 : Input F$
  471.       Curs Off 
  472.       If F$="x" Then GOS=GOS+1 : Pop Proc
  473.       If F$="X" Then GOS=GOS+1 : Pop Proc
  474.       If Val(AN$)=>0 and Val(AN$)<=180 Then ANGLE#=Val(AN$) : E=1
  475.       If Val(F$)=>1 and Val(F$)<=50 Then F=Val(F$) : E=E+1
  476.       If E=2 Then Exit 
  477.    Loop 
  478.    Locate 15,5 : Print "              "
  479.    SAMLAY[21] : Wait 50
  480.    Curs Off 
  481.    Screen 0
  482.    Bob Update On : Amal On 
  483.    BAZOOKA
  484.    Bob Off 0 : Wait Vbl 
  485.    Screen 1
  486. End Proc
  487. Procedure BAZOOKA
  488.    If ANGLE#>90 and DINC(ANT)=4 Then DINC(ANT)=0 : Goto DF
  489.    If ANGLE#>90 and DINC(ANT)=0 Then DINC(ANT)=4
  490.    DF:
  491.    If ANGLE#>90 Then ANGLE#=180-ANGLE#
  492.    ANGLE#=ANGLE#/57.3
  493.    If DINC(ANT)=0 Then S=10 : T=15 Else S=16 : T=21
  494.    For N=S To T
  495.       Bob ANT,X(ANT),Y(ANT),N+AC
  496.       Wait 4
  497.    Next N
  498.    BX#=X(ANT)+14
  499.    If DINC(ANT)=4 Then BX#=X(ANT)-14
  500.    BY#=Y(ANT)-24 : Shoot 
  501.    BAZOOKASHOOT
  502.    BLAST
  503.    If ACTIVE(ANT)<>1 Then Pop Proc
  504.    For N=T To S Step -1
  505.       Bob ANT,X(ANT),Y(ANT),N+AC
  506.       Wait 4
  507.    Next N
  508. End Proc
  509. Procedure BAZOOKASHOOT
  510.    Screen 0
  511.    Sam Stop 
  512.    SAMLAY[4]
  513.    F#=F/10
  514.    FX#=F#*Cos(ANGLE#)
  515.    FY#=F#*Sin(ANGLE#)
  516.    If DINC(ANT)=4 Then FX#=FX#*-1
  517.    XX#=X(ANT)+5 : YY#=Y(ANT)-12
  518.    If DINC(ANT)=4 Then XX#=X(ANT)-5 : Goto LEFT
  519.    ANGLE=ANGLE#*57.3
  520.    TX#=XX# : TY#=YY# : TFY#=FY#
  521.    For N=1 To 200
  522.       TX#=TX#+FX# : TY#=TY#-TFY#
  523.       TFY#=TFY#-0.1
  524.       If Point(TX#,TY#)>0 Then Exit 
  525.    Next N
  526.    For N=1 To 200
  527.       XX#=XX#+FX# : YY#=YY#-FY#
  528.       FY#=FY#-0.1
  529.       If FY#=>1 Then Bob 0,XX#,YY#,Vrev(145)
  530.       If FY#<1 and FY#>-1 Then Bob 0,XX#,YY#,146
  531.       If FY#<=-1 Then Bob 0,XX#,YY#,145
  532.       If FY#=>0 and ANGLE=>86 Then Bob 0,XX#,YY#,Vrev(144)
  533.       If FY#<0 and ANGLE=>86 Then Bob 0,XX#,YY#,144
  534.       Wait 3
  535.       If XX#=TX# and YY#=TY# Then Exit 
  536.    Next N
  537.    Goto RIGHT
  538.    LEFT:
  539.    ANGLE=ANGLE#*57.3
  540.    TX#=XX# : TY#=YY# : TFY#=FY#
  541.    For N=1 To 150
  542.       TX#=TX#+FX# : TY#=TY#-TFY#
  543.       TFY#=TFY#-0.1
  544.       If Point(TX#,TY#)>0 Then Exit 
  545.    Next N
  546.    For N=1 To 150
  547.       XX#=XX#+FX# : YY#=YY#-FY#
  548.       FY#=FY#-0.1
  549.       If FY#=>1 Then Bob 0,XX#,YY#,Hrev(Vrev(145))
  550.       If FY#<1 and FY#>-1 Then Bob 0,XX#,YY#,Hrev(146)
  551.       If FY#<=-1 Then Bob 0,XX#,YY#,Hrev(145)
  552.       If FY#=>0 and ANGLE=>85 Then Bob 0,XX#,YY#,Vrev(144)
  553.       If FY#<0 and ANGLE=>85 Then Bob 0,XX#,YY#,144
  554.       Wait 3
  555.       If XX#=TX# and YY#=TY# Then Exit 
  556.    Next N
  557.    RIGHT:
  558.    BLX=XX# : BLY=YY#
  559. End Proc
  560. Procedure BLAST
  561.    Bob Off 0
  562.    FLAGKILL=0
  563.    SAMLAY[7]
  564.    Bob 0,BLX,BLY,97 : Wait 10
  565.    Bob 0,BLX,BLY,97 : Wait Vbl 
  566.    HITS
  567.    If FLAGKILL=1 Then Bob Off 0 : Wait 3 : Pop Proc
  568.    Bob Off 0 : Wait 3
  569. End Proc
  570. Procedure HITS
  571.    AANT=ANT
  572.    ANTKILL
  573.    HELIKILL
  574.    NESTKILL
  575.    ANT=AANT
  576. End Proc
  577. Procedure ANTKILL
  578.    Priority Reverse Off 
  579.    Bob 0,BLX,BLY,97
  580.    Wait 10
  581.    For ANT=1 To ANTS#
  582.       If Bob Col(0,ANT To ANT)=-1 and ANT<20 Then R#=R#+1
  583.       If Bob Col(0,ANT To ANT)=-1 and ANT>20 Then B#=B#+1
  584.       If Bob Col(0,ANT To ANT)=-1
  585.          Priority Reverse Off 
  586.          SAMLAY[1]
  587.          For N=41 To 45
  588.             Bob ANT,,,N
  589.             Wait Vbl 
  590.          Next N
  591.          DEAD
  592.       End If 
  593.    Next ANT
  594. End Proc
  595. Procedure KILBAR
  596.    If R#+B#=0 Then P#=50 : Goto DIV
  597.    If R#=0 and B#=1 Then P#=1 : Goto DIV
  598.    If R#=1 and B#=0 Then P#=99 : Goto DIV
  599.    P#=(R#/(R#+B#))*100
  600.    DIV:
  601.    X=50 : Y=50
  602.    Ink 1
  603.    Box X-1,Y To X+200+3,Y+10
  604.    If P#<1 Then P#=1
  605.    Colour 2,$D00
  606.    Ink 1 : Box X+1,Y+2 To X+1+(P#*2),Y+8
  607.    If P#=99 Then P#=98 : JACK=1
  608.    Ink 2 : Bar X+1+(P#*2)+2,Y+2 To X+200+1,Y+8
  609.    Ink 1 : Box X+1+(P#*2)+2,Y+2 To X+200+1,Y+8
  610.    If JACK=1 Then P#=99 : JACK=0
  611.    Ink 1,0
  612.    P#=Int(P#)
  613.    ST$=Str$(P#)+"%"
  614.    Text 38-Text Length(ST$),Y+10,ST$
  615.    ST$=Str$(100-P#)+"%"
  616.    Text X+207,Y+10,ST$
  617.    Ink 0,1
  618. End Proc
  619. Procedure CRATER
  620.    Screen 0
  621.    Bob Off 0
  622.    Paste Bob BLX-17,BLY-15,97
  623.    Ink 0 : Circle BLX,BLY,15 : Boom : 
  624.    PD=0
  625.    If Point(BLX,BLY)=8 Then Paint BLX,BLY : Wait Vbl 
  626.    If Point(BLX+6,BLY)=8 Then Paint BLX,BLY+6 : Wait Vbl 
  627.    If Point(BLX-6,BLY)=8 Then Paint BLX,BLY-6 : Wait Vbl 
  628.    If Point(BLX,BLY-3)=8 Then Paint BLX,BLY-3 : Wait Vbl 
  629.    FLAGKILL=1 : Bob Off 0 : Wait 5
  630. End Proc
  631. Procedure HELIKILL
  632.    If Bob Col(0,63 To 63)=-1
  633.       Screen 1 : Cls : Paste Bob 0,0,54 : Locate 15,1
  634.       Pen 1 : Print "Red Heli Destroyed !"
  635.       XB=X Bob(0) : YB=Y Bob(0) : Bob Off 0
  636.       HN=1 : Screen 0 : XPLODE
  637.       Bob Off 63 : Wait Vbl 
  638.       HD1=1 : FLAGKILL=1
  639.       Bob 0,XB,YB,97
  640.       Wait 5
  641.       'Bob 63,100,220, : HX(1)=100 : HY(1)=220 : Wait 20 
  642.       Wait Vbl 
  643.    End If 
  644.    If Bob Col(0,62 To 62)=-1
  645.       Screen 1 : Cls : Paste Bob 0,0,54 : Locate 15,1
  646.       Pen 1 : Print "Black Heli Destroyed !"
  647.       XB=X Bob(0) : YB=Y Bob(0) : Bob Off 0
  648.       HN=2 : Screen 0 : XPLODE
  649.       Bob Off 62
  650.       HD2=1 : FLAGKILL=1
  651.       Bob 0,XB,YB,97
  652.       Wait 5
  653.    End If 
  654. End Proc
  655. Procedure NESTKILL
  656.    If Bob Col(0,50 To 50)=-1
  657.       Bob Off 0 : Wait Vbl 
  658.       Z=1 : BXPLODE : GOS=1 : Goto JOMP
  659.    End If 
  660.    If Bob Col(0,49 To 49)=-1
  661.       Bob Off 0 : Wait Vbl 
  662.       Z=2 : BXPLODE : GOS=1 : Goto JOMP
  663.    End If 
  664.    CRATER
  665.    JOMP:
  666. End Proc
  667. Procedure XPLODE
  668.    XP=HX(HN) : YP=HY(HN)
  669.    C$="Anim 0,(127,4)(128,4)(129,4)(130,4)(131,4)(132,4)"
  670.    D$="Anim 0,(129,4)(130,4)(131,4)(132,4)(127,4)(128,4)"
  671.    E$="Anim 0,(131,4)(132,4)(127,4)(128,4)(129,4)(131,4)"
  672.    Channel 4 To Bob 55
  673.    Channel 5 To Bob 56
  674.    Channel 6 To Bob 57
  675.    For N=1 To 5
  676.       Priority Reverse On 
  677.       Bob 55,XP+(Rnd(40)-80)+65,YP+(Rnd(40)-80)+65,
  678.       Bob 56,XP+(Rnd(40)-80)+65,YP+(Rnd(40)-80)+65,
  679.       Bob 57,XP+(Rnd(40)-80)+65,YP+(Rnd(40)-80)+65,
  680.       Amal 4,C$
  681.       Amal 5,D$
  682.       Amal 6,E$
  683.       Amal On 4
  684.       Amal On 5
  685.       Amal On 6
  686.       For Z=1 To 4
  687.          SAMLAY[7] : Wait Rnd(15)+1
  688.       Next Z
  689.    Next N
  690.    Amal Off 4 : Bob Off 55
  691.    Amal Off 5 : Bob Off 56
  692.    Amal Off 6 : Bob Off 57
  693. End Proc
  694. Procedure BXPLODE
  695.    Screen 1
  696.    Cls 0 : Paste Bob 0,0,54
  697.    Pen 1
  698.    Locate 17,1
  699.    If Z=2 Then XP=BASX : YP=BASY : Print "Black Nest Hit !" : Locate 18,3 : Print "Lives left :";B2-1
  700.    If Z=1 Then XP=BASX2 : YP=BASY2 : Print "Red Nest Hit !" : Locate 18,3 : Print "Lives Left :";B1-1
  701.    Screen 0
  702.    C$="Anim 0,(127,4)(128,4)(129,4)(130,4)(131,4)(132,4)"
  703.    D$="Anim 0,(129,4)(130,4)(131,4)(132,4)(127,4)(128,4)"
  704.    E$="Anim 0,(131,4)(132,4)(127,4)(128,4)(129,4)(131,4)"
  705.    Channel 4 To Bob 55
  706.    Channel 5 To Bob 56
  707.    Channel 6 To Bob 57
  708.    For N=1 To 5
  709.       If Z=0 Then Priority Reverse On : Z=1 Else Z=0 : Priority Reverse Off 
  710.       Bob 55,XP+(Rnd(40)-80)+95,YP+(Rnd(40)-80)+95,
  711.       Bob 56,XP+(Rnd(40)-80)+95,YP+(Rnd(40)-80)+95,
  712.       Bob 57,XP+(Rnd(40)-80)+95,YP+(Rnd(40)-80)+95,
  713.       Amal 4,C$
  714.       Amal 5,D$
  715.       Amal 6,E$
  716.       Amal On 4
  717.       Amal On 5
  718.       Amal On 6
  719.       For Z=1 To 4
  720.          SAMLAY[7] : Wait Rnd(15)+1
  721.       Next Z
  722.    Next N
  723.    Amal Off 4 : Bob Off 55
  724.    Amal Off 5 : Bob Off 56
  725.    Amal Off 6 : Bob Off 57
  726.    If XP=BASX2 Then B1=B1-1
  727.    If XP=BASX Then B2=B2-1
  728.    If B1=0
  729.       Screen 1 : Fade 1 : Wait 15 : Cls 0
  730.       Get Sprite Palette 
  731.       Ink 1
  732.       Home : Centre "Game Over !"
  733.       Print : Centre "BLACK is the winner !" : Print : Print 
  734.       T$="Black Ants Dead :"+Str$(B#) : Centre T$
  735.       Print 
  736.       T$="  Red Ants Dead :"+Str$(R#) : Centre T$
  737.       KILBAR : Screen 0
  738.       BAS2FLAG
  739.       Screen 0 : Fade 2 : Screen 1 : Fade 2 : Wait 30
  740.       Screen Close 0 : Screen Close 1
  741.       Command Line$="black" : Sam Bank 5
  742.       Hide : Run "Ant_War2:code/endbit.amos"
  743.    End If 
  744.    If B2=0
  745.       Screen 1 : Fade 1 : Wait 15 : Cls 0
  746.       Get Sprite Palette 
  747.       Ink 1
  748.       Home : Centre "Game Over !"
  749.       Print : Centre "RED is the winner !" : Print : Print 
  750.       T$="Black Ants Dead :"+Str$(B#) : Centre T$
  751.       Print 
  752.       T$="  Red Ants Dead :"+Str$(R#) : Centre T$
  753.       KILBAR : Screen 0
  754.       BAS1FLAG
  755.       Screen Close 0 : Screen Close 1
  756.       Command Line$="red" : Sam Bank 5
  757.       Hide : Run "Ant_War2:code/endbit.amos"
  758.    End If 
  759.    Curs Off 
  760. End Proc
  761. Procedure BAS1FLAG
  762.    SD=147
  763.    Do 
  764.       Bob 55,BASX+35,BASY+6,SD : Wait 5
  765.       If SD<155 Then SD=SD+1 Else SD=147
  766.       If A$<>"" or Mouse Key>0 Then Pop Proc
  767.    Loop 
  768. End Proc
  769. Procedure BAS2FLAG
  770.    SD=147
  771.    Do 
  772.       A$=Inkey$
  773.       Bob 55,BASX2+35,BASY2+6,SD : Wait 5
  774.       If SD<155 Then SD=SD+1 Else SD=147
  775.       If A$<>"" or Mouse Key>0 Then Pop Proc
  776.    Loop 
  777. End Proc
  778. Procedure DIGROUTINE
  779.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  780.    Paste Bob 0,0,56
  781.    SELECTANT
  782.    If ANT=>666 Then GOS=GOS+1 : Pop Proc
  783.    Screen 1
  784.    Ink 1 : Locate 15,1 : Print "Select a mine type"
  785.    Paste Bob 143,34,31
  786.    Paste Bob 169,34,36
  787.    Paste Bob 194,32,37
  788.    Paste Bob 215,32,38
  789.    Set Zone 1,150-10,20-10+20 To 150+10,20+10+20
  790.    Set Zone 2,175-10,20-10+20 To 175+10,20+10+20
  791.    Set Zone 3,200-10,20-10+20 To 200+10,20+10+20
  792.    Set Zone 4,225-10,20-10+20 To 225+10,20+10+20
  793.    Z=0
  794.    Do 
  795.       If Mouse Zone=1 Then Box 150-10,20-10+20 To 150+10,20+10+20 : Z=1
  796.       If Mouse Zone=2 Then Box 175-10,20-10+20 To 175+10,20+10+20 : Z=2
  797.       If Mouse Zone=3 Then Box 200-10,20-10+20 To 200+10,20+10+20 : Z=3
  798.       If Mouse Zone=4 Then Box 225-10,20-10+20 To 225+10,20+10+20 : Z=4
  799.       If Mouse Zone=0 or Z<>ZZ
  800.          Ink 0
  801.          Box 150-10,20-10+20 To 150+10,20+10+20
  802.          Box 175-10,20-10+20 To 175+10,20+10+20
  803.          Box 200-10,20-10+20 To 200+10,20+10+20
  804.          Box 225-10,20-10+20 To 225+10,20+10+20
  805.          Ink 1
  806.       End If 
  807.       ZZ=Z
  808.       If Z=1 and Mouse Key=1 Then Exit 
  809.       If Z=2 and Mouse Key=1 Then Exit 
  810.       If Z=3 and Mouse Key=1 Then Exit 
  811.       If Z=4 and Mouse Key=1 Then Exit 
  812.       If Mouse Key=2 Then Pop Proc
  813.    Loop 
  814.    B$=""
  815.    If Z=1 Then B$="d"
  816.    If Z=2 Then B$="a"
  817.    If Z=3 Then B$="c"
  818.    If Z=4 Then B$="z"
  819.    Screen 0
  820.    Bob Update On : Amal On 
  821.    ANTMINE
  822.    B$=""
  823.    If ACTIVE(ANT)=1 Then Bob ANT,X(ANT),Y(ANT),1+DINC(ANT)+AC : Wait Vbl 
  824. End Proc
  825. Procedure ANTMINE
  826.    FL=0
  827.    If B$="d" Then FL=1
  828.    If B$="c" Then FL=1
  829.    If FL=1
  830.       For N=27 To 31
  831.          Bob ANT,X(ANT),Y(ANT),N
  832.          Wait 4
  833.       Next N
  834.    End If 
  835.    If FL=0
  836.       For N=32 To 36
  837.          Bob ANT,X(ANT),Y(ANT),N
  838.          Wait 4
  839.       Next N
  840.    End If 
  841.    SAMLAY[2]
  842.    If B$="d" Then Bob Update Off : DIGR
  843.    If B$="a" Then Bob Update Off : DIGL
  844.    If B$="z" Then Bob ANT,,,38 : Wait Vbl : Bob Update Off : DIGDL
  845.    If B$="c" Then Bob ANT,,,37 : Wait Vbl : Bob Update Off : DIGDR
  846.    Bob Update On 
  847.    If FL=1
  848.       For N=31 To 27 Step -1
  849.          Bob ANT,X(ANT),Y(ANT),N
  850.          Wait 4
  851.       Next N
  852.    End If 
  853.    If FL=0
  854.       For N=36 To 32 Step -1
  855.          Bob ANT,X(ANT),Y(ANT),N
  856.          Wait 4
  857.       Next N
  858.    End If 
  859. End Proc
  860. Procedure DIGDR
  861.    Bob Update Off 
  862.    X=X(ANT)+4 : Y=Y(ANT)-5
  863.    For N=-4 To 40
  864.       If N=5 or N=10 or N=15 or N=20 or N=25 or N=30 or N=35
  865.          Ink 7 : Circle X+N,Y+N,4 : SAMLAY[2]
  866.       End If 
  867.       Ink 0
  868.       Draw X-4+N,Y+4+N To X+4+N,Y-4+N
  869.       Draw X-4+N,Y+5+N To X+5+N,Y-4+N
  870.    Next N
  871.    For N=1 To 40
  872.       If N=5 or N=10 or N=15 or N=20 or N=25 or N=30 or N=35
  873.          Ink 0 : Circle X+N,Y+N,4
  874.       End If 
  875.    Next N
  876. End Proc
  877. Procedure DIGDL
  878.    Bob Update Off 
  879.    X=X(ANT) : Y=Y(ANT)-5
  880.    For N=-4 To 40
  881.       If N=5 or N=10 or N=15 or N=20 or N=25 or N=30 or N=35
  882.          Ink 7 : Circle X-N,Y+N,4 : SAMLAY[2]
  883.       End If 
  884.       Ink 0
  885.       Draw X+4-N,Y+4+N To X-4-N,Y-4+N
  886.       Draw X+4-N,Y+5+N To X-5-N,Y-4+N
  887.    Next N
  888.    For N=1 To 40
  889.       If N=5 or N=10 or N=15 or N=20 or N=25 or N=30 or N=35
  890.          Ink 0 : Circle X-N,Y+N,4
  891.       End If 
  892.    Next N
  893. End Proc
  894. Procedure DIGR
  895.    Bob Update Off 
  896.    X=X(ANT) : Y=Y(ANT)-5
  897.    For N=-5 To 55
  898.       If N=10 or N=15 or N=20 or N=25 or N=30 or N=35 or N=40 or N=45 or N=50
  899.          Ink 7 : Circle X+N,Y-2,4 : SAMLAY[2]
  900.       End If 
  901.       Ink 0
  902.       Draw X+N,Y-8 To X+N,Y+5
  903.    Next N
  904.    For N=1 To 55
  905.       If N=10 or N=15 or N=20 or N=25 or N=30 or N=35 or N=40 or N=45 or N=50
  906.          Ink 0 : Circle X+N,Y-2,4
  907.       End If 
  908.    Next N
  909.    ESC=1
  910. End Proc
  911. Procedure DIGL
  912.    Bob Update Off 
  913.    X=X(ANT) : Y=Y(ANT)-5
  914.    For N=-5 To 55
  915.       If N=10 or N=15 or N=20 or N=25 or N=30 or N=35 or N=40 or N=45 or N=50
  916.          Ink 7 : Circle X-N,Y-2,4 : SAMLAY[2]
  917.       End If 
  918.       Ink 0
  919.       Draw X-N,Y-8 To X-N,Y+5
  920.    Next N
  921.    For N=1 To 55
  922.       If N=10 or N=15 or N=20 or N=25 or N=30 or N=35 or N=40 or N=45 or N=50
  923.          Ink 0 : Circle X-N,Y-2,4
  924.       End If 
  925.    Next N
  926. End Proc
  927. Procedure BRIDGEROUTINE
  928.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  929.    Paste Bob 0,0,55
  930.    SELECTANT
  931.    If ANT=>666 Then GOS=GOS+1 : Pop Proc
  932.    Screen 1
  933.    Ink 1 : Locate 15,1 : Print "Select a bridge type"
  934.    Paste Bob 140,30,23
  935.    Paste Bob 169,32,24
  936.    Paste Bob 190,35,25
  937.    Paste Bob 205,35,26
  938.    Set Zone 1,150-10,20-10+20 To 150+10,20+10+20
  939.    Set Zone 2,175-10,20-10+20 To 175+10,20+10+20
  940.    Set Zone 3,200-10,20-10+20 To 200+10,20+10+20
  941.    Set Zone 4,225-10,20-10+20 To 225+10,20+10+20
  942.    Z=0
  943.    Do 
  944.       If Mouse Zone=1 Then Box 150-10,20-10+20 To 150+10,20+10+20 : Z=1
  945.       If Mouse Zone=2 Then Box 175-10,20-10+20 To 175+10,20+10+20 : Z=2
  946.       If Mouse Zone=3 Then Box 200-10,20-10+20 To 200+10,20+10+20 : Z=3
  947.       If Mouse Zone=4 Then Box 225-10,20-10+20 To 225+10,20+10+20 : Z=4
  948.       If Mouse Zone=0 or Z<>ZZ
  949.          Ink 0
  950.          Box 150-10,20-10+20 To 150+10,20+10+20
  951.          Box 175-10,20-10+20 To 175+10,20+10+20
  952.          Box 200-10,20-10+20 To 200+10,20+10+20
  953.          Box 225-10,20-10+20 To 225+10,20+10+20
  954.          Ink 1
  955.       End If 
  956.       ZZ=Z
  957.       If Z=1 and Mouse Key=1 Then Exit 
  958.       If Z=2 and Mouse Key=1 Then Exit 
  959.       If Z=3 and Mouse Key=1 Then Exit 
  960.       If Z=4 and Mouse Key=1 Then Exit 
  961.       If Mouse Key=2 Then Pop Proc
  962.    Loop 
  963.    If Z=1 Then B$="1"
  964.    If Z=2 Then B$="2"
  965.    If Z=3 Then B$="3"
  966.    If Z=4 Then B$="4"
  967.    Screen 0
  968.    GOS=GOS+1
  969.    BRIDGE
  970.    A$=""
  971. End Proc
  972. Procedure BRIDGE
  973.    If B$="1" and AC=0
  974.       Bob Off ANT
  975.       SAMLAY[11]
  976.       Wait Vbl 
  977.       Paste Bob X(ANT)-12,Y(ANT)-15,23+AC : DEAD
  978.    End If 
  979.    If B$="1" and AC=56
  980.       SAMLAY[11]
  981.       Bob Off ANT
  982.       Wait Vbl 
  983.       Paste Bob X(ANT)-12,Y(ANT)-13,23+AC : DEAD
  984.    End If 
  985.    If B$="2" and AC=56
  986.       SAMLAY[11]
  987.       Bob Off ANT
  988.       Wait Vbl 
  989.       Paste Bob X(ANT)-1,Y(ANT)-14,24+AC : DEAD
  990.    End If 
  991.    If B$="2" and AC=0
  992.       Bob Off ANT
  993.       SAMLAY[11]
  994.       Wait Vbl 
  995.       Paste Bob X(ANT)-1,Y(ANT)-13,24+AC : DEAD
  996.    End If 
  997.    If B$="3" Then Bob Off ANT : SAMLAY[11] : Wait Vbl : Paste Bob X(ANT)-4,Y(ANT)-4,25+AC : DEAD
  998.    If B$="4" Then Bob Off ANT : SAMLAY[11] : Wait Vbl : Paste Bob X(ANT)-28,Y(ANT)-4,26+AC : DEAD
  999. End Proc
  1000. Procedure BUTTONS
  1001.    Bob Update On 
  1002.    Wait Vbl 
  1003.    Repeat 
  1004.       If AC=0 Then HN=1 Else HN=2
  1005.       Bob Update Off 
  1006.       If ESC=1 and ESC<2 Then INFANTRY : BUG=1
  1007.       If EX=1 Then BUG=2 : EX=0
  1008.       If HD1=1 and HN=1 and ESC=2 Then BUG=1
  1009.       If HD2=1 and HN=2 and ESC=2 Then BUG=1
  1010.       If ESC=2 and BUG<>1 Then HELIBUTTONS
  1011.       If ESC=2 and BUG=1 Then ESC=1
  1012.    Until ESC=0
  1013.    Bob Update Off 
  1014.    If ESC=0 and AC=0 Then AC=56 : FLAG=1 : HC=6
  1015.    If FLAG=0 and ESC=0 and AC=56 Then AC=0 : HC=0 Else FLAG=0
  1016.    GOS=5
  1017.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  1018.    SAMLAY[9]
  1019.    If AC=0
  1020.       Paste Bob 130,25,125
  1021.       Wait 30
  1022.       Cls 
  1023.       Screen Offset 0,SX-320,0
  1024.    End If 
  1025.    If AC=56
  1026.       Paste Bob 100,25,126
  1027.       Wait 30
  1028.       Cls 
  1029.       Screen Offset 0,0,0
  1030.    End If 
  1031.    Reserve Zone 6
  1032.    Paste Bob 0,0,47
  1033.    Paste Bob 110,0,48
  1034.    Paste Bob 225,0,49
  1035.    Set Zone 1,0,0 To 100,46
  1036.    Set Zone 2,100,0 To 215,46
  1037.    Set Zone 3,225,0 To 325,46
  1038.    KILBAR
  1039.    Screen 0
  1040.    Screen 1
  1041.    Wait 20 : SAMLAY[10]
  1042.    Do 
  1043.       A$=Inkey$
  1044.       MESSMOUSE
  1045.       SK=Scancode
  1046.       If Mouse Zone=1 and Mouse Key=1 Then BUG=1 : Exit 
  1047.       If Mouse Zone=2 and Mouse Key=1 and HD1=0 and HC=0 Then BUG=2 : Exit 
  1048.       If Mouse Zone=2 and Mouse Key=1 and HD2=0 and HC=6 Then BUG=2 : Exit 
  1049.       If Mouse Zone=3 and Mouse Key=1 Then SAMLAY[20] : Exit 
  1050.       If SK=80 Then BUG=1 : Exit 
  1051.       If SK=81 and HD1=0 and HC=0 Then BUG=2 : Exit 
  1052.       If SK=81 and HD2=0 and HC=6 Then BUG=2 : Exit 
  1053.       If SK=82 Then SAMLAY[20] : Exit 
  1054.       If SK=69 Then Screen Close 0 : Screen Close 1 : Run "Ant_War2:code/barebones.amos"
  1055.    Loop 
  1056.    If Mouse Zone=1 or SK=80 Then ESC=1 : INFANTRY
  1057.    If Mouse Zone=2 or SK=81 Then ESC=2 : HELIBUTTONS
  1058.    If Mouse Zone=3 or SK=82 Then ESC=0
  1059. End Proc
  1060. Procedure INFANTRY
  1061.    Screen 1
  1062.    Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  1063.    SAMLAY[12]
  1064.    Paste Bob 0,-3,133
  1065.    Reserve Zone 7
  1066.    Set Zone 1,13,10 To 43,29
  1067.    Set Zone 2,56,10 To 85,29
  1068.    Set Zone 3,196,10 To 226,29
  1069.    Set Zone 4,238,10 To 268,29
  1070.    Set Zone 5,280,10 To 310,29
  1071.    Set Zone 6,109,24 To 173,34
  1072.    If HD1=0 and AC=0 Then Set Zone 7,108,8 To 174,16
  1073.    If HD2=0 and AC=56 Then Set Zone 7,108,8 To 174,16
  1074.    CHANT
  1075.    BUG=1
  1076.    Ink 0
  1077.    If AC=0 Then Text 60,45,Right$(Str$(CAN1),Len(Str$(CAN1))-1) Else Text 60,45,Right$(Str$(CAN2),Len(Str$(CAN2))-1)
  1078.    Text 270,44,Right$(Str$(GOS),Len(Str$(GOS))-1)
  1079.    Text 125,32,"SKIP"
  1080.    Ink 1
  1081.    Do 
  1082.       MESSMOUSE
  1083.       CC=0
  1084.       A$=Inkey$
  1085.       K=Scancode
  1086.       If K=69 Then Screen Close 0 : Screen Close 1 : Run "Ant_War2:code/barebones.amos"
  1087.       If K=>80 or K<=87 Then CC=K-79
  1088.       If HD1=1 and AC=0 and CC=6 Then CC=0
  1089.       If HD2=1 and AC=56 and CC=6 Then CC=0
  1090.       If Mouse Zone=6 and Mouse Key=1 Then CC=7
  1091.       If CC=7 Then GOS=0 : SAMLAY[20] : Exit 
  1092.       If Mouse Zone=1 and Mouse Key=1 Then CC=1
  1093.       If CC=1 Then SAMLAY[13] : DEPLOY : GOS=GOS-1 : Exit 
  1094.       DS=0
  1095.       If AC=0 and CAN1=0 Then DS=1
  1096.       If AC=56 and CAN2=0 Then DS=1
  1097.       If Mouse Zone=2 and Mouse Key=1 and DS=0 Then CC=2
  1098.       If CC=2
  1099.          SAMLAY[6]
  1100.          MOVE
  1101.          GOS=GOS-1
  1102.          Exit 
  1103.       End If 
  1104.       If Mouse Zone=3 and Mouse Key=1 and DS=0 Then CC=3
  1105.       If CC=3
  1106.          SAMLAY[14]
  1107.          BAZOOKROUTINE
  1108.          GOS=GOS-1
  1109.          Exit 
  1110.       End If 
  1111.       If Mouse Zone=4 and Mouse Key=1 and DS=0 Then CC=4
  1112.       If CC=4
  1113.          SAMLAY[15]
  1114.          DIGROUTINE
  1115.          GOS=GOS-1
  1116.          Exit 
  1117.       End If 
  1118.       If Mouse Zone=5 and Mouse Key=1 and DS=0 Then CC=5
  1119.       If CC=5
  1120.          SAMLAY[16]
  1121.          BRIDGEROUTINE
  1122.          GOS=GOS-1
  1123.          Exit 
  1124.       End If 
  1125.       If Mouse Zone=7 and GOS=5 and Mouse Key=1 Then CC=6
  1126.       If CC=6
  1127.          ESC=2 : EX=1
  1128.          Exit 
  1129.       End If 
  1130.       If Mouse Zone=7 and GOS>1 and Mouse Key=1 Then CC=6
  1131.       If CC=6
  1132.          ESC=2 : EX=1
  1133.          GOS=GOS-1
  1134.          Exit 
  1135.       End If 
  1136.    Loop 
  1137.    GRAVITY
  1138.    If GOS=0 Then ESC=0
  1139. End Proc
  1140. Procedure CHANT
  1141.    CAN1=0 : CAN2=0
  1142.    For N=1 To ANTS#/2
  1143.       If ACTIVE(N)=1 Then CAN1=CAN1+1
  1144.    Next N
  1145.    For N=(ANTS#/2)+1 To ANTS#
  1146.       If ACTIVE(N)=1 Then CAN2=CAN2+1
  1147.    Next N
  1148. End Proc
  1149. Procedure SELECTANT
  1150.    Pen 1
  1151.    ANTSORT
  1152.    Locate 15,1 : Print "                         "
  1153.    Locate 15,1 : Print "Select an ant:";
  1154.    Locate 15,3 : Print "Space to cancel."
  1155.    Screen 0
  1156.    Reserve Zone 
  1157.    Reserve Zone ANTS#
  1158.    If AC=0 Then BINNY
  1159.    If AC=56 Then BINNY2
  1160.    Screen 1 : Locate 30,1
  1161.    A$=""
  1162.    Pen 1
  1163.    Do 
  1164.       A$=Inkey$
  1165.       Screen 0
  1166.       MESSMOUSE
  1167.       ZO=Mouse Zone
  1168.       Screen 1
  1169.       If ZO<>ZOO Then Locate 30,1 : Print "    "
  1170.       Locate 30,1
  1171.       If AC=56 and ACTIVE(ZO+(ANTS#/2))=1 Then Print ZO
  1172.       If AC=0 and ACTIVE(ZO)=1 Then Print ZO
  1173.       Locate 30,1
  1174.       If AC=56 and ACTIVE(ZO+(ANTS#/2))=1 and Mouse Key=1 Then Exit 
  1175.       If AC=0 and ACTIVE(ZO)=1 and Mouse Key=1 Then Exit 
  1176.       If A$=" " Then ZO=666 : Exit 
  1177.       ZOO=ZO
  1178.    Loop 
  1179.    SAMLAY[5] : XM=X Screen(X Mouse)
  1180.    Wait 5
  1181.    If AC=56 Then ZO=ZO+(ANTS#/2)
  1182.    ANT=ZO
  1183.    Locate 15,1 : Print "         "
  1184.    Locate 15,3 : Print "                "
  1185.    Screen 0
  1186. End Proc
  1187. Procedure DEPLOY
  1188.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  1189.    Paste Bob 0,0,50
  1190.    Screen 0
  1191.    Bob Update On : Amal On 
  1192.    ANT=0 : DD=0
  1193.    If AC=56 Then ANT=(ANTS#/2) Else DD=4
  1194.    Repeat 
  1195.       ANT=ANT+1
  1196.       If ANT=20 or ANT=40 Then Pop Proc
  1197.    Until ACTIVE(ANT)=2
  1198.    If ACTIVE(ANT)=2 Then ACTIVE(ANT)=1 : DINC(ANT)=DD
  1199.    Bob ANT,X(ANT),Y(ANT),9+AC+DINC(ANT) : Wait Vbl 
  1200.    SAMLAY[3]
  1201.    If Point(X(ANT),Y(ANT)+1)=0 Then FALL
  1202. End Proc
  1203. Procedure BINNY
  1204.    For Q=1 To ANTS#/2
  1205.       If ACTIVE(Q)=1 and Y(Q)>10 Then Set Zone Q,X(Q)-10,Y(Q)-10 To X(Q)+5,Y(Q)+5
  1206.       If ACTIVE(Q)=1 and Y(Q)<=10 Then Set Zone Q,X(Q)-10,0 To X(Q)+5,Y(Q)+5
  1207.    Next Q
  1208. End Proc
  1209. Procedure BINNY2
  1210.    For Q=(ANTS#/2)+1 To ANTS#
  1211.       If ACTIVE(Q)=1 and Y(Q)>10 Then Set Zone Q-(ANTS#/2),X(Q)-10,Y(Q)-10 To X(Q)+3,Y(Q)+3
  1212.       If ACTIVE(Q)=1 and Y(Q)<=10 Then Set Zone Q-(ANTS#/2),X(Q)-10,0 To X(Q)+5,5
  1213.    Next Q
  1214. End Proc
  1215. Procedure ANTSORT
  1216.    For N=1 To ANTS#/2
  1217.       If ACTIVE(N)=0 Then ACTIVE(N)=2 : X(N)=SXR : Y(N)=SYR
  1218.    Next N
  1219.    For N=(ANTS#/2)+1 To ANTS#
  1220.       If ACTIVE(N)=0 Then ACTIVE(N)=2 : X(N)=SXB : Y(N)=SYB
  1221.    Next N
  1222. End Proc
  1223. Procedure MESSMOUSE
  1224.    If MP=1 and Y Mouse>100 Then Change Mouse 2 : MP=2
  1225.    If MP=2 and Y Mouse<100 Then Change Mouse 1 : MP=1
  1226. End Proc
  1227. Procedure SAMLAY[N]
  1228.    Sam Bank 5
  1229.    If N=1 Then Sam Play 1
  1230.    If N=2 Then Sam Play 8
  1231.    If N=3 Then Sam Play 6
  1232.    If N=4 Then Sam Play 2
  1233.    If N=5 Then Sam Play 10
  1234.    If N=6 Then Sam Play 5
  1235.    If N=7 Then Sam Play 3
  1236.    If N=8 Then Sam Play 9
  1237.    If N=11 Then Sam Play 4
  1238.    If N=22 Then Sam Play 7
  1239.    If N=23 Then Sam Play 11
  1240.    If CF1=1 Then Goto EXTRA
  1241.    If N=14 Then Sam Play 5
  1242.    If N=16 Then Sam Play 5
  1243.    If N=19 Then Sam Play 5
  1244.    If N=18 Then Sam Play 5
  1245.    If N=13 Then Sam Play 5
  1246.    If N=15 Then Sam Play 5
  1247.    If N=20 Then Sam Play 5
  1248.    Pop Proc
  1249.    EXTRA:
  1250.    Sam Bank 6
  1251.    If N=14 Then Sam Play 1
  1252.    If N=16 Then Sam Play 2
  1253.    If N=19 Then Sam Play 3
  1254.    If N=13 Then Sam Play 4
  1255.    If N=18 Then Sam Play 5
  1256.    If N=17 Then Sam Play 6
  1257.    If N=12 Then Sam Play 7
  1258.    If N=15 Then Sam Play 8
  1259.    If N=21 Then Sam Play 9
  1260.    If N=20 Then Sam Play 10
  1261.    If N=9 Then Sam Play 12
  1262.    If N=10 Then Sam Play 11
  1263. End Proc
  1264. Procedure GRAVITY
  1265.    Do 
  1266.       ZZTOP=0
  1267.       Wait Vbl 
  1268.       For N=1 To ANTS#
  1269.          Screen 0
  1270.          If ACTIVE(N)=1 and Point(X(N),Y(N)+1)=0 Then ZZTOP=1 : ANT=N : FALL
  1271.          Screen 1
  1272.       Next N
  1273.       If ZZTOP=0 Then Exit 
  1274.    Loop 
  1275. End Proc
  1276. Procedure HELIBUTTONS
  1277.    If BUG=1 Then Pop Proc
  1278.    Screen 1
  1279.    Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  1280.    SAMLAY[17]
  1281.    Bob Update Off 
  1282.    Paste Bob 0,-3,137
  1283.    Set Zone 1,13,10 To 43,30
  1284.    Set Zone 2,56,10 To 85,29
  1285.    Set Zone 3,236,10 To 266,29
  1286.    Set Zone 4,109,24 To 173,34
  1287.    Set Zone 5,108,8 To 174,16
  1288.    If HC=6 Then HN=2 Else HN=1
  1289.    Ink 0
  1290.    Text 60,45,Right$(Str$(HP(HN)),Len(Str$(HP(HN)))-1)
  1291.    Text 270,44,Right$(Str$(GOS),Len(Str$(GOS))-1)
  1292.    Text 125,32,"SKIP"
  1293.    CHANT
  1294.    Do 
  1295.       A$=Inkey$
  1296.       MESSMOUSE
  1297.       SK=Scancode
  1298.       If Mouse Zone=4 and Mouse Key=1 Then SAMLAY[20] : GOS=0 : Exit 
  1299.       If Mouse Zone=1 and Mouse Key=1 and HP(HN)<5 and CAN1>0 and HC=0 Then SAMLAY[19] : HELIROPE : GOS=GOS-1 : Exit 
  1300.       If Mouse Zone=1 and Mouse Key=1 and HP(HN)<5 and CAN2>0 and HC=6 Then SAMLAY[19] : HELIROPE : GOS=GOS-1 : Exit 
  1301.       If Mouse Zone=2 and Mouse Key=1 and HP(HN)>0 Then SAMLAY[18] : PARAHELI : GOS=GOS-1 : Exit 
  1302.       If Mouse Zone=3 and Mouse Key=1 Then SAMLAY[6] : HELIMOUSE : GOS=GOS-1 : Exit 
  1303.       If Mouse Zone=5 and GOS=5 and Mouse Key=1 Then ESC=1 : Exit 
  1304.       If Mouse Zone=5 and GOS>1 and GOS<5 and Mouse Key=1 Then GOS=GOS-1 : ESC=1 : Exit 
  1305.       If SK=84 Then SAMLAY[20] : GOS=0 : Exit 
  1306.       If SK=80 and HP(HN)<5 and CAN1>0 and HC=0 Then SAMLAY[19] : HELIROPE : GOS=GOS-1 : Exit 
  1307.       If SK=80 and HP(HN)<5 and CAN2>0 and HC=6 Then SAMLAY[19] : HELIROPE : GOS=GOS-1 : Exit 
  1308.       If SK=81 and HP(HN)>0 Then SAMLAY[18] : PARAHELI : GOS=GOS-1 : Exit 
  1309.       If SK=82 Then SAMLAY[6] : HELIMOUSE : GOS=GOS-1 : Exit 
  1310.       If SK=83 and GOS=5 Then ESC=1 : Exit 
  1311.       If SK=83 and GOS>1 Then GOS=GOS-1 : ESC=1 : Exit 
  1312.       If SK=69 Then Screen Close 0 : Screen Close 1 : Run "Ant_War2:code/barebones.amos"
  1313.    Loop 
  1314.    If GOS=0 Then ESC=0
  1315. End Proc
  1316. Procedure HELIMOUSE
  1317.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  1318.    Paste Bob 0,0,117
  1319.    Pen 1 : Locate 14,3 : Print "Use joystick to Move."
  1320.    Screen 0 : SETAMAL
  1321.    If HX(HN)-160>0 and HX(HN)-160<680 Then Screen Offset 0,HX(HN)-160,
  1322.    Bob Update On 
  1323.    HELIMK2
  1324.    HN=1
  1325.    If HC=6 Then HN=2
  1326.    Q=201
  1327. End Proc
  1328. Procedure HELI
  1329.    Bob 62,HX(2),HY(2),
  1330.    Bob 63,HX(1),HY(1),
  1331.    If HX(HN)>160 and HX(HN)<848 and Joy(1)<>0
  1332.       Screen Offset 0,HX(HN)-160,
  1333.    End If 
  1334. End Proc
  1335. Procedure TURN
  1336.    If HN=2 and HDINC(HN)=105 Then HX(HN)=HX(HN)+28
  1337.    If HN=2 and HDINC(HN)=102 Then HX(HN)=HX(HN)-28
  1338.    If HN=1 and HDINC(HN)=105 Then HX(HN)=HX(HN)-28
  1339.    If HN=1 and HDINC(HN)=102 Then HX(HN)=HX(HN)+28
  1340.    If HN=2 Then Bob 62,HX(HN)-3,HY(HN)+10,114
  1341.    If HN=1 Then Bob 63,HX(HN)-3,HY(HN)+10,114
  1342.    C$="Anim 0,(114,4)(115,4)(116,4)"
  1343.    Amal HN,C$
  1344.    Amal On HN
  1345.    Wait Vbl 
  1346.    Do 
  1347.       If Fire(1)=0 Then Exit 
  1348.    Loop 
  1349.    If HDINC(HN)=102 Then HDINC(HN)=105 : ZARNIWOOP=1
  1350.    If HDINC(HN)=105 and ZARNIWOOP=0 Then HDINC(HN)=102 Else ZARNIWOOP=0
  1351.    SETAMAL
  1352.    HELI
  1353. End Proc
  1354. Procedure HELIROPE
  1355.    Screen 1 : Fade 2 : Wait 2*15 : Cls 0 : Get Sprite Palette 
  1356.    Paste Bob 0,0,121
  1357.    SELECTANT
  1358.    HPSAUCE=HP(HN)
  1359.    Bob Update On 
  1360.    If AC=0 and ANT=0 Then GOS=GOS+1 : Pop Proc
  1361.    If AC=56 and ANT=(ANTS#/2) Then GOS=GOS+1 : Pop Proc
  1362.    If ANT=666 or ANT=686 Then GOS=GOS+1 : Pop Proc
  1363.    If HX(HN)>X(ANT) and HX(HN)-X(ANT)>250 Then GOS=GOS+1 : Pop Proc
  1364.    If HX(HN)<X(ANT) and X(ANT)-HX(HN)>250 Then GOS=GOS+1 : Pop Proc
  1365.    Screen 0
  1366.    If HC=6 Then HN=2 Else HN=1
  1367.    If HN=2 and HX(HN)>X(ANT)+50 and HDINC(HN)=102 Then TURN : Wait Vbl 
  1368.    If HN=2 and HX(HN)<X(ANT)-50 and HDINC(HN)=105 Then TURN : Wait Vbl 
  1369.    If HN=1 and HX(HN)>X(ANT)+50 and HDINC(HN)=105 Then TURN : Wait Vbl 
  1370.    If HN=1 and HX(HN)<X(ANT)-50 and HDINC(HN)=102 Then TURN : Wait Vbl 
  1371.    Repeat 
  1372.       HELICOL
  1373.       If CT1>0
  1374.          GOS=GOS+1
  1375.          Amal On 1
  1376.          Screen 1
  1377.          Pen 1
  1378.          Cls 
  1379.          Paste Bob 0,0,121
  1380.          Print 
  1381.          Centre "      Obstacle !"
  1382.          Print : Print 
  1383.          Locate 17,3 : Print "Click Mouse."
  1384.          Screen 0
  1385.          While Mouse Key=0
  1386.          Wend 
  1387.          Pop Proc
  1388.       End If 
  1389.       If CT2>0
  1390.          GOS=GOS+1
  1391.          Amal On 2
  1392.          Screen 1
  1393.          Pen 1
  1394.          Cls 
  1395.          Paste Bob 0,0,121
  1396.          Print 
  1397.          Centre "      Obstacle !"
  1398.          Print : Print 
  1399.          Locate 17,3 : Print "Click Mouse."
  1400.          Screen 0
  1401.          While Mouse Key=0
  1402.          Wend 
  1403.          Pop Proc
  1404.       End If 
  1405.       If HX(HN)>X(ANT) Then Dec HX(HN)
  1406.       If HX(HN)<X(ANT) Then Inc HX(HN)
  1407.       If HN=2 Then Bob 62,HX(HN),HY(HN),
  1408.       If HN=1 Then Bob 63,HX(HN),HY(HN),
  1409.    Until HX(HN)=X(ANT)
  1410.    Ink 1
  1411.    ROPE
  1412.    HP(HN)=HP(HN)+1
  1413.    If HP(HN)>HPSAUCE Then DEAD Else GOS=GOS+1
  1414. End Proc
  1415. Procedure PARAHELI
  1416.    Screen 0
  1417.    Bob Update On 
  1418.    ANT=0
  1419.    If AC=56 Then ANT=(ANTS#/2)
  1420.    Repeat 
  1421.       ANT=ANT+1
  1422.    Until ACTIVE(ANT)=2
  1423.    If HC=6 Then HN=2 Else HN=1
  1424.    If ACTIVE(ANT)=2 Then X(ANT)=HX(HN) : Y(ANT)=HY(HN)+12
  1425.    DEPLOY
  1426.    Dec HP(HN)
  1427. End Proc
  1428. Procedure SETAMAL
  1429.    If HDINC(1)=102
  1430.       C$="Anim 0,(105,6)(106,6)(107,6)"
  1431.    End If 
  1432.    If HDINC(1)=105
  1433.       C$="Anim 0,(102,6)(103,6)(104,6)"
  1434.    End If 
  1435.    If HDINC(2)=102
  1436.       C2$="Anim 0,(108,6)(109,6)(110,6)"
  1437.    End If 
  1438.    If HDINC(2)=105
  1439.       C2$="Anim 0,(111,6)(112,6)(113,6)"
  1440.    End If 
  1441.    If HD1=0
  1442.       Bob 63,,,
  1443.       Channel 1 To Bob 63
  1444.       Amal 1,C$
  1445.       Amal On 1
  1446.    End If 
  1447.    If HD2=0
  1448.       Bob 62,,,
  1449.       Channel 2 To Bob 62
  1450.       Amal 2,C2$
  1451.       Amal On 2
  1452.    End If 
  1453. End Proc
  1454. Procedure HELICOL
  1455.    CT1=0
  1456.    If HC=0 and HDINC(1)=105 Then FLAG=1
  1457.    While FLAG=1
  1458.       If Point(HX(1)+14,HY(1)+11)>0 Then CT1=3 : Rem 3  
  1459.       If Point(HX(1)-24,HY(1)+11)>0 Then CT1=4 : Rem 4  
  1460.       If Point(HX(1)-50,HY(1)+2)>0 Then CT1=5 : Rem 5          
  1461.       If Point(HX(1)-2,HY(1)-20)>0 Then CT1=9 : Rem 9      
  1462.       FLAG=0
  1463.    Wend 
  1464.    If HC=0 and HDINC(1)=102 Then FLAG=1
  1465.    While FLAG=1
  1466.       If Point(HX(1)-14,HY(1)+11)>0 Then CT1=3 : Rem 3  
  1467.       If Point(HX(1)+24,HY(1)+11)>0 Then CT1=4 : Rem 4  
  1468.       If Point(HX(1)+50,HY(1)+2)>0 Then CT1=5 : Rem 5        
  1469.       If Point(HX(1)+49,HY(1)-17)>0 Then CT1=6 : Rem 6
  1470.       If Point(HX(1)+2,HY(1)-20)>0 Then CT1=9 : Rem 9      
  1471.       FLAG=0
  1472.    Wend 
  1473.    CT2=0
  1474.    If HC=6 and HDINC(2)=102 Then FLAG=1
  1475.    While FLAG=1
  1476.       If Point(HX(2)+14,HY(2)+11)>0 Then CT2=3 : Rem 3  
  1477.       If Point(HX(2)-24,HY(2)+11)>0 Then CT2=4 : Rem 4  
  1478.       If Point(HX(2)-50,HY(2)+2)>0 Then CT2=5 : Rem 5        
  1479.       If Point(HX(2)-49,HY(2)-17)>0 Then CT2=6 : Rem 6
  1480.       If Point(HX(2)-2,HY(2)-20)>0 Then CT2=9 : Rem 9      
  1481.       FLAG=0
  1482.    Wend 
  1483.    If HC=6 and HDINC(2)=105 Then FLAG=1
  1484.    While FLAG=1
  1485.       If Point(HX(2)-14,HY(2)+11)>0 Then CT2=3 : Rem 3  
  1486.       If Point(HX(2)+24,HY(2)+11)>0 Then CT2=4 : Rem 4  
  1487.       If Point(HX(2)+50,HY(2)+2)>0 Then CT2=5 : Rem 5        
  1488.       If Point(HX(2)+49,HY(2)-17)>0 Then CT2=6 : Rem 6
  1489.       If Point(HX(2)+2,HY(2)-20)>0 Then CT2=9 : Rem 9      
  1490.       FLAG=0
  1491.    Wend 
  1492.    FLAG=0
  1493. End Proc
  1494. Procedure HELIMK2
  1495.    HN=1
  1496.    If HC=6 Then HN=2
  1497.    QUOTA=200
  1498.    Sam Loop On : SAMLAY[22]
  1499.    DK:
  1500.    X=HX(HN) : Y=HY(HN) : 
  1501.    Screen 1 : Locate 14,5 : Print "Space Bar to end move."
  1502.    If HDINC(HN)=105 and HN=2 Then Goto RV
  1503.    If HDINC(HN)=102 and HN=1 Then Goto RV
  1504.    Do 
  1505.       HELI
  1506.       A$=Inkey$
  1507.       DUM=QUOTA
  1508.       DIE=Joy(1)
  1509.       If DIE=1+4 Then DIE=4
  1510.       If DIE=2+4 Then DIE=4
  1511.       If DIE=1+8 Then DIE=8
  1512.       If DIE=2+8 Then DIE=8
  1513.       If DIE=1 and HY(HN)>-9 and Point(X-28,Y-15)<=0 and Point(X-2,Y-18)<=0 and Point(X-46,Y-15)<=0 and Point(X+28,Y-16)<=0 Then Y=Y-2 : QUOTA=QUOTA-1
  1514.       If DIE=2 and Point(X+16,Y+3)<=0 and Point(X+27,Y-10)<=0 and Point(X-45,Y+1)<=0 and Point(X,Y+10)<=0 and Point(X-20,Y+10)<=0 and Point(X+10,Y+10)<=0 Then Y=Y+2 : QUOTA=QUOTA-1
  1515.       If DIE=4 and HX(HN)>25 and Point(X-50,Y)<=0 and Point(X-48,Y-14)<=0 and Point(X-23,Y+8)<=0 Then X=X-2 : QUOTA=QUOTA-1
  1516.       If DIE=8 and HX(HN)<999 and Point(X+30,Y-13)<=0 and Point(X+20,Y)<=0 and Point(X+12,Y+9)<=0 Then X=X+2 : QUOTA=QUOTA-1
  1517.       If Fire(1)=-1 Then TURN : HX(HN)=HX(HN)+18 : HELI : Exit 
  1518.       If Y<-9 Then Y=-9
  1519.       HX(HN)=X : HY(HN)=Y
  1520.       If DUM>QUOTA
  1521.          Screen 1 : Pen 1
  1522.          Locate 22,1 : Print "Fuel  :     ";
  1523.          Locate 30,1 : Print QUOTA : Screen 0
  1524.       End If 
  1525.       If A$=" " or QUOTA=0 Then Sam Loop Off : Pop Proc
  1526.    Loop 
  1527.    Goto DK
  1528.    RV:
  1529.    Do 
  1530.       HELI
  1531.       A$=Inkey$
  1532.       DIE=Joy(1)
  1533.       If DIE=1+4 Then DIE=4
  1534.       If DIE=2+4 Then DIE=4
  1535.       If DIE=1+8 Then DIE=8
  1536.       If DIE=2+8 Then DIE=8
  1537.       If DIE=1 and HY(HN)>-9 and Point(X-28,Y-15)<=0 and Point(X+2,Y-18)<=0 and Point(X+46,Y-15)<=0 and Point(X+28,Y-16)<=0 Then Y=Y-2 : QUOTA=QUOTA-1
  1538.       If DIE=2 and Point(X-16,Y+3)<=0 and Point(X-27,Y-10)<=0 and Point(X+45,Y+1)<=0 and Point(X,Y+10)<=0 and Point(X+20,Y+10)<=0 and Point(X-10,Y+10)<=0 Then Y=Y+2 : QUOTA=QUOTA-1
  1539.       If DIE=8 and HX(HN)<999 and Point(X+50,Y)<=0 and Point(X+48,Y-14)<=0 and Point(X+23,Y+8)<=0 Then X=X+2 : QUOTA=QUOTA-1
  1540.       If DIE=4 and HX(HN)>25 and Point(X-30,Y-13)<=0 and Point(X-20,Y)<=0 and Point(X-12,Y+9)<=0 Then X=X-2 : QUOTA=QUOTA-1
  1541.       If Fire(1)=-1 Then TURN : HX(HN)=HX(HN)-18 : HELI : Exit 
  1542.       If Y<-9 Then Y=-9
  1543.       HX(HN)=X : HY(HN)=Y
  1544.       If DUM<>QUOTA
  1545.          Screen 1 : Pen 1
  1546.          Locate 22,1 : Print "Fuel  :     ";
  1547.          Locate 30,1 : Print QUOTA : Screen 0
  1548.       End If 
  1549.       DUM=QUOTA
  1550.       If A$=" " or QUOTA=0 Then Sam Loop Off : Pop Proc
  1551.    Loop 
  1552.    Goto DK
  1553.    Sam Loop Off 
  1554. End Proc
  1555. Procedure ROPE
  1556.    YY=HY(HN) : X=HX(HN)
  1557.    Z=0
  1558.    Sam Loop On : SAMLAY[23]
  1559.    Repeat 
  1560.       Z=Z+1
  1561.       YY=YY+1
  1562.    Until Point(X,YY+10)>0
  1563.    If YY+10<Y(ANT)-13 Then HP(HN)=HP(HN)-1 : Sam Loop Off : Pop Proc
  1564.    Ink 1
  1565.    YY=HY(HN)
  1566.    For N=1 To Z Step 3
  1567.       Draw X,YY+10 To X,YY+10+N
  1568.    Next N
  1569.    Wait 5
  1570.    Ink 0
  1571.    For N=Z+10 To Z+5 Step -1
  1572.       Plot X,YY+N
  1573.       Bob ANT,X,YY+N+5,101
  1574.    Next N
  1575.    For N=Z+4 To -5 Step -3
  1576.       Ink 0
  1577.       Draw X,YY+10+N-1 To X,YY+Z
  1578.       If YY+N+5<Y Bob(ANT) Then Bob ANT,X,YY+N+5,101
  1579.    Next N
  1580.    Bob Off ANT
  1581.    Plot HX(HN),HY(HN)+10
  1582.    Plot HX(HN),HY(HN)+11
  1583.    Plot HX(HN),HY(HN)+12
  1584.    Sam Loop Off 
  1585. End Proc