; Mike 01/09/01 ; ;#config weapon=1 ; gives 1 point #config scanner=3 ; gives 2 points #config engine=5 ; consumes 3 points ;#config heatsinks=1 ; gives a point #config armor=1 ; gives a point #msg Mike !begin jmp !init !data *128, 84, 96, 64 ; 0-3 *160, 182, 118, 20 ; 4-7 *148, 246, 54, 32 ; 8-11 *192, 224, 212, 0 ; 12-15 !init opo 17, 6 ; scan arc opo 13, 192 ; aim gun left mov ax, 1 int 3 ; Keepshift on. #def speed mov speed, 100 !start opo 11, speed ; Throttle to 100% !scan ipo 7, fx ; Scan for enemy cmp fx 1500 ja !noscan ; No one found? Decide what to do !fire ; Someone was found ipo 2, fx cmp fx, 130 jgr !aim opo 15, 0 ; fire cmp fx, 90 jgr !aim opo 15, 1 ; fire opo 15, -1 cmp fx, 50 jgr !aim opo 15, 4 ; fire opo 15, -4 ; fire !aim mov ax, @2 ; gun offset test @2, 128 ; pointing left? jz !aimright !aimleft sub ax, 4 opo 13, ax jnz !nav !aimright add ax, 8 opo 13, ax jmp !nav !noscan mov ax, @2 ; gun offset add ax, 6 opo 13, ax !nav int 2 ipo 1, ax ; get curr speed cmp ax, 0 jne !go cmp speed, 100 jeq !back !fwd mov speed, 100 jne !go !back mov speed, -75 !go opo 11, speed ; Throttle to 100% shr ex, 8 shl ex, 2 shr fx, 8 add ex, fx add ex, 1028 ; !data mov ex, [ex] ; desired heading into ex ipo 3, fx ; curr heading into fx sub ex, fx ; sar ex, 1 ; / by 2 opo 14, ex ; change heading ipo 8, ax ; armour check cmp ax, 34 jgr !start int 4 ; overburn on jmp !start ; start over