;|------------------------------| ;| type 5 of x series | ;| Alpha variation | ;|______________________________| ;This robot is really slow but it does the damage. ;The heat controll system does not work well. ;_________________________________________________ #config scanner=3 #config armor=2 #config engine=1 #config heatsinks=3 #config weapon=2 #def heatV #def speedV #def numV #msg I'm REALLY slow :( mov ax, 1 int 3 mov dx, 64 !heat ipo 2, heatV cmp heatV 175 ja !ohno !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 2 jbe !decide shr dx, 1 !decide cmp @7 0 je !fire3 !peashoot opo 11, 100 opo 15 @3 ipo 10, numV opo 14, numV ipo 2, heatV cmp heatV 175 ja !ohno ; 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. ipo 2, heatV cmp heatV 175 ja !ohno jmp !start opo 18 !fire3 opo 11, 5 ipo 11, speedV err speedV opo 11,5 ipo 2, heatV cmp heatV 50 ja !peashoot opo 15, @3 opo 15 @3 opo 15 @3 ipo 10, numV opo 14, numV ipo 2, heatV cmp heatV 150 ja !ohno opo 18 ; 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. ipo 2, heatV cmp heatV 175 ja !ohno opo 11, 90 jmp !nobody !turn and ax, 255 sub ax, bx opo 14, ax opo 14, 0 jmp !heat !nobody cmp dx 64 jae !flip shl dx 1 jmp !start !flip ipo 10, numV opo 12 128 opo 14 numV ; jmp !heat !ohno opo 18 opo 11,90 ipo 10, numV opo 11, 75 opo 14, numV cmp heatV 100 jb !start