;this bot is really only half mine. See, I made this pretty good mine-laying code and wanted a robot to test it on. I needed to keep it small, so i chose LASTMAN. And here he is... #config scanner= 0 #config weapon= 3 #config armor= 2 #config engine= 0 #config heatsinks= 2 #config mines= 5 #config shield= 0 #def mine_counter #msg who spilled poo? mov mine_counter 0 :1 do 12 :2 opo 11, 100 opo 22, 1 inc mine_counter loop 2 opo 14, 64 cmp mine_counter, 24 je !begin jmp 1 !begin mov dx, 64 ; scanarc stored in dx !start opo 17, dx : set scanarc ipo 7, fx ; scan cmp fx, 1501 ; found one? jae !flip ; found no one -> flip ;*** OLD ROUTINE FOR TURRET CORRECTION ;*** mov bx, dx ; scanarc to bx ;*** mpy bx, @3 ; multiply with accuracy ;*** sar bx, 1 ; divide by 2 ;*** opo 12, bx ; rotate turret to enemy ;NEW ROUTINE FOR TURRET CORRECTION cmp 0, @3 ; check accuracy jeq !finished ; if 0 then no change -> finished mov bx, dx ; scanarc to bx jls !positive ; if acc positive -> positive ;negative neg bx ; else acc is negative cmp -2, @3 ; compare accuracy to -2 jeq !continue ; if so, no multiplication needed sar bx, 1 ; /2 jne !continue ; ok !positive cmp 2, @3 ; compare accuracy to 2 jeq !continue ; if so, no multiplication needed sar bx, 1 ; /2 !continue opo 12, bx ; rotate turret to enemy !finished ;decrease scanarc cmp dx, 1 ; scanarc = 1? jbe !special ; if so -> special shr dx, 1 ; half scanarc ;targetnear cmp fx, 200 ; target far away? jae !start ; far away -> start, else fire !special cmp 0, @7 ; target moving jne !fire ; if moving just -> fire shr dx, 1 ; not moving decrease scanarc, fire opo 15, 0 ; fire, target doesn't move !fire opo 15, 0 ; fire ; jeq !start ; start over ; jne !start ; start over !Detonate ipo 6 ax cmp ax, 10 jbe !start opo 22, 24 jmp !start !flip opo 12, 128 ; turn turret round jae !begin ; start over and set scanarc = 64 opo 14, 64 jmp !begin