;|------------------------------| ;| type 6 of x series | ;|______________________________| ;This robot is one of the best robot's ive made ;_________________________________________________ #config scanner=3 #config armor=2 #config engine=3 #config heatsinks=3 #config weapon=0 #def heatV #def speedV #def numV #msg Prepare to die!! mov ax, 1 int 3 mov dx, 64 !start opo 11, 100 opo 17, dx ipo 7, fx cmp fx 700 ja !nobody !gotcha mov bx, dx ; BX = DX (dx is the scan width) mpy bx, @3 ; bx = scanwidth*accuracy sar bx, 1 ; bx = scanwidth*accuracy/2 opo 12, bx ; turn turret by that amount. cmp dx 1 jbe !decide shr dx, 1 !decide cmp @7 0 je !fire3 !peashoot opo 15 @3 opo 15 @3 ; Set course towards target mov bx, @1 ; get current desired heading ; (not actual heading) ipo 3, ax ; Get actual heading add ax, @2 ; And add to it our turret offset opo 14, ax ; AX is now our new desired heading. jmp !start !fire3 ipo 2, ax ; check heat cmp ax, 250 ; hotter than 250? jgr !start ; if so, forget target, continue scan. opo 15, @3 opo 15 @3 opo 15 @3 ; Set course towards target mov bx, @1 ; get current desired heading ; (not actual heading) ipo 3, ax ; Get actual heading add ax, 2 ; And add to it our turret offset opo 14, ax ; AX is now our new desired heading. opo 11, 90 jmp !start !turn and ax, 255 sub ax, bx opo 14, ax opo 14, 0 !nobody cmp dx 64 jae !flip shl dx 1 jmp !start !flip ipo 10, numV opo 12 128 opo 14 numV