; Partisan.at2 ; a "robot" for "AT-Robots 2" ; 2002 by Stephan Edel ; V 0.5 #config scanner=1 ; 350 #config weapon=3 ; 1.2 gun #config engine=3 ; 1.2 engine #config heatsinks=3 ; 1.25 #def t_range #def heat #def damage #def damage2 OPO 11, 100 ;go ahead INT 3, 1 ;keepshift on IPO 6, damage MOV @385 -52 MOV @386 -26 ; MOV @387 0 MOV @388 26 MOV @389 52 MOV @390 -16 MOV @391 -8 ; MOV @392 0 MOV @393 8 MOV @394 16 MOV @395 -5 MOV @396 -2 ; MOV @397 0 MOV @398 2 MOV @399 5 ; MOV @400 0 MOV @401 3 MOV @402 6 MOV @403 8 MOV @404 10 MOV @405 12 MOV @406 15 MOV @407 15 MOV @408 17 MOV @409 17 MOV @410 17 MOV @411 16 MOV @412 14 MOV @413 11 MOV @414 8 MOV @415 3 ; MOV @416 0 MOV @417 -3 MOV @418 -8 MOV @419 -11 MOV @420 -14 MOV @421 -16 MOV @422 -17 MOV @423 -17 MOV @424 -17 MOV @425 -15 MOV @426 -15 MOV @427 -12 MOV @428 -10 MOV @429 -8 MOV @430 -6 MOV @431 -3 ; MOV @432 0 !acquire IPO 6, damage2 CMP damage, damage2 MOV damage, damage2 JNE !evasive OPO 17, 64 ;scanner width OPO 14, 0 ;go straight OPO 11, 100 ;go ahead! IPO 7, t_range ;get range to target CMP t_range, 1415 ;compare range with 1415 (arena diameter) JLS !found ; if smaller, jump to .. OPO 12, 128 ; turn turret IPO 7, t_range ;get range to target CMP t_range, 1415 ;compare range with 1415 (arena diameter) JLS !found ; if smaller, jump to .. !cruise INT 2 ;X,Y to EX,FX IPO 3, AX ;compass CMP EX, 100 JLS !west_wall CMP EX, 900 JGR !east_wall CMP FX, 100 JLS !north_wall CMP FX, 900 JGR !south_wall JMP !acquire !west_wall NEG AX OPO 14, AX OPO 14, 64 JMP !acquire !east_wall NEG AX OPO 14, AX OPO 14, 192 JMP !acquire !north_wall NEG AX OPO 14, AX OPO 14, 128 JMP !acquire !south_wall NEG AX OPO 14, AX JMP !acquire !found OPO 18, 1 ;overburn on IPO 8, AX ; get "accuracy" ADD AX, 387 ; construct memory adress with turning angle OPO 12, [AX] ; shift turret OPO 17, 20 ; scanner width IPO 7, t_range ; activate scanner IPO 8, AX ; get "accuracy" ADD AX, 392 ;construct memory adress with turning angle OPO 12, [AX] ; shift turret OPO 17, 7 ; scanner width IPO 7, t_range ; activate scanner IPO 8, AX ; get "accuracy" ADD AX, 392 ;construct memory adress with turning angle OPO 12, [AX] !fire INT 9 ;Target Info CMP FX, 10 ;target speed CMP t_range, 1415 ;compare range with 1415 (arena diameter) JGR !acquire ; if smaller, jump to .. JLE !duck SHR EX, 3 ;RShift, keep sign ADD EX, 416 ;memory map OPO 12, [EX] !duck OPO 15, 0 ; Fire! OPO 18, 0 ;overburn OFF JMP !acquire !evasive OPO 11, 100 ;go ahead! ; IPO 10, AX ;random number ; SAR AX, 9 ;sign-preserving right-shift OPO 14, 50 ;turn OPO 11, 100 ;go ahead! JMP !acquire