#config scanner=1 #config weapon=3 #config armor=1 #config engine=3 #config heatsinks=4 #def hx #msg Im squiggly!! mov ax, 1 int 3 mov dx, 64 !heatcheck ipo 2, hx cmp hx 250 jae !heat !start opo 11, 80 opo 17, dx ipo 7, fx cmp fx 2000 ja !nobody !found opo 11,100 mov bx, dx mpy bx, @3 ; bx = scanwidth*accuracy sar bx, 1 ; bx = scanwidth*accuracy/2 opo 12, bx ; turn turret by that amount. cmp dx, 2 ; check scanwidth jbe !kill ; width<=2? then fire, otherwise tighten shr dx, 1 ; tighten scanwidth !kill opo 15, @3 mov bx, @1 ipo 3, ax add ax, @2 cmp fx 120 ; Check our distance jae !turn ; Too close? If not, then steer straight add ax, 64 !turn and ax, 255 sub ax, bx opo 14, ax jmp !heatcheck !nobody cmp dx 64 ; Compare scanwidth to 64 jae !flip ; If above, then flip shl dx 1 ; otherwise, widen arc jmp !start !flip opo 12 128 ; rotate turret 128 degrees (180). opo 14 8 ; Turn slightly ; jmp !start !heat opo 11, 75 opo 14, 8 opo 14, 31 opo 14, 90 ipo 2, hx cmp hx 250 jb !start