; ######################################### ; # Spectre V1.6 (Shadow) # ; # ------------------------------------- # ; # by Alexander Beisig (Tycho) # ; ######################################### ; ; 06/18/1999 ; Coded for ATRobots V2.09 ; ; ------ ; If you want to use ideas from this robot, I would be very pleased if you would ; follow these three rules: ; ; (1) Do not just copy it. ; I wrote every line of the code myself, but many ideas came form other robots. ; (2) It would be cool if you didn't lock your robot (with ATRLock). ; If you use ideas from other people, don't you think it's just fair if other people ; can see your ideas? ; (3) Mention the robot you took your ideas from. ; This one was inspired mainly by TOBI-1 and STEALTH. They showed that fast-moving ; robots with short range that don't spend much time on aiming can be quite successful as well. ; ------ ; ; Strategy: ; Move fast to avoid being tracked by those bulky snipers, scan and fire very quickly at cose ranges ; without spending much time for target prediction. This one has a simple mechanism for targeting which ; uses up 2 cycles, but it seems to pay off. Will avoid crashing into walls. Tries to close ; in when it has found an enemy. ; #config scanner=2 #config engine=5 #config heatsinks=1 #config weapon=3 #config armor=1 #config mines=0 #config shield=0 #def sa #def sd #def cn opo 11 100 ; full throttle opo 22 10 opo 22 15 mov ax 1 int 4 ; overburn on !begin mov sa 64 opo 17 sa ; set wide scan arc !main int 2 ; get location cmp ex 300 ; check for xpos jle 11 cmp ex 700 ; check for xpos jgr 13 !ypos cmp fx 300 ; check for ypos jle 12 cmp fx 700 ; check for ypos jgr 14 !scan opo 11 100 ; full throttle ipo 2 ax ; get heat cmp ax 50 jgr !main ipo 3 ax ; get current heading cmp ax [1] ; compare with desired heading jne !main ipo 7 sd ; scan cmp sd 2000 jls !found opo 12 128 ; turn turret jne !main jeq !main :11 cmp [1] 12 ; check for desired heading jls 111 cmp [1] 116 ; check for desired heading jgr 111 jle !ypos :111 cmp [1] 192 ; check for desired heading jgr 112 cmp [1] 64 ; check for desired heading jls 112 opo 14 -32 ; rotate away from wall jne !main jeq !main :112 opo 14 32 ; rotate away from wall jne !main jeq !main :12 cmp [1] 180 ; check for desired heading jgr 121 cmp [1] 76 ; check for desired heading jls 121 jge !scan :121 cmp [1] 128 ; check for desired heading jls 122 opo 14 -32 ; rotate away from wall jne !main jeq !main :122 opo 14 32 ; rotate away from wall jne !main jeq !main :13 cmp [1] 244 ; check for desired heading jgr 131 cmp [1] 140 ; check for desired heading jls 131 jge !ypos :131 cmp [1] 64 ; check for desired heading jls 132 cmp [1] 192 ; check for desired heading jgr 132 opo 14 32 ; rotate away from wall jne !main jeq !main :132 opo 14 -32 ; rotate away from wall jne !main jeq !main :14 cmp [1] 52 ; check for desired heading jle !scan cmp [1] 204 ; check for desired heading jge !scan :141 cmp [1] 128 ; check for desired heading jgr 142 opo 14 -32 ; rotate away from wall jne !main jeq !main :142 opo 14 32 ; rotate away from wall jne !main jeq !main !track ipo 7 sd ; scan cmp sd 2000 jge !notfound !found mov ax [3] ; get accuracy add ax 23 jeq ax jne ax :21 neg sa opo 12 sa ; turn turret neg sa shr sa 2 jne !check jeq !check :22 shr sa 1 neg sa opo 12 sa ; turn turret neg sa shr sa 1 jne !check jeq !check :23 shr sa 2 jne !check jeq !check :24 shr sa 1 opo 12 sa ; turn turret shr sa 1 jne !check jeq !check :25 opo 12 sa ; turn turret shr sa 2 jne !check jeq !check !check cmp sa 2 jle !fire opo 17 sa ; reduce scan arc jne !track jeq !track !fire mov ax [6] ; get relative target heading shr ax 4 add ax 301 jne ax jeq ax err ax :301 opo 15 0 ; fire jne !cont jeq !cont :302 opo 15 1 ; fire jne !cont jeq !cont :303 opo 15 2 ; fire jne !cont jeq !cont :304 opo 15 3 ; fire jne !cont jeq !cont :305 opo 15 4 ; fire jne !cont jeq !cont :306 opo 15 3 ; fire jne !cont jeq !cont :307 opo 15 2 ; fire jne !cont jeq !cont :308 opo 15 1 ; fire jne !cont jeq !cont :309 opo 15 0 ; fire jne !cont jeq !cont :310 opo 15 -1 ; fire jne !cont jeq !cont :311 opo 15 -2 ; fire jne !cont jeq !cont :312 opo 15 -3 ; fire jne !cont jeq !cont :313 opo 15 -4 ; fire jne !cont jeq !cont :314 opo 15 -3 ; fire jne !cont jeq !cont :315 opo 15 -2 ; fire jne !cont jeq !cont :316 opo 15 -1 ; fire jne !cont jeq !cont !cont mov cn 0 cmp [2] 128 ; compare turret offset jls !otherside mov bx 40 cmp sd 300 ; compare distance jls !turnaway cmp [2] 182 ; compare turret offset jls !steer cmp [2] 246 ; compare turret offset jgr !steer ipo 2 ax ; get heat cmp ax 200 jls !track jge !begin !otherside mov bx -40 cmp sd 300 ; compare distance jls !turnaway cmp [2] 10 ; compare turret offset jls !steer cmp [2] 74 ; compare turret offset jgr !steer ipo 2 ax ; get heat cmp ax 100 jls !track jge !begin !notfound add cn 1 cmp cn 4 jle !steer !turnaway add bx bx !steer mov ax [2] ; get turret offset add ax bx ; add parameter opo 14 ax ; steer jne !begin jeq !begin