From 99be22ac3b67513f11f09b84be639ef5808195e0 Mon Sep 17 00:00:00 2001 From: Pecusx Date: Fri, 25 Aug 2023 14:56:24 +0200 Subject: [PATCH] Long Shlong is even more beautiful :) And other AI optimizations. --- ai.asm | 41 ++++++++++++++++++----------------------- scorch.asm | 2 +- scorch.bin | Bin 32768 -> 32768 bytes scorch.xex | Bin 56579 -> 56563 bytes 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/ai.asm b/ai.asm index e88a2b0..5a22671 100644 --- a/ai.asm +++ b/ai.asm @@ -359,13 +359,8 @@ NotNegativeEnergy adw Force #100 RandBoundaryHigh jsr RandomizeForce ; if target distance lower than 24 - set weapon to Baby Missile (for security :) - jsr GetDistance - cmp #6 ; 24/4 - bcs HighForce - lda #ind_Baby_Missile - sta ActiveWeapon,x -HighForce - rts + jmp GetDistance + ;rts .endp ;---------------------------------------------- .proc Spoiler @@ -391,13 +386,8 @@ NotNegativeEnergy adw Force #50 RandBoundaryHigh jsr RandomizeForce ; if target distance lower than 24 - set weapon to Baby Missile (for security :) - jsr GetDistance - cmp #6 ; 24/4 - bcs HighForce - lda #ind_Baby_Missile - sta ActiveWeapon,x -HighForce - rts + jmp GetDistance + ;rts .endp ;---------------------------------------------- .proc Cyborg @@ -419,14 +409,9 @@ HighForce sta ForceTableL,x lda Force+1 sta ForceTableH,x - ; if target distance lower than 32 - set weapon to Baby Missile (for security :) - jsr GetDistance - cmp #8 ;32/4 - bcs HighForce - lda #ind_Baby_Missile - sta ActiveWeapon,x -HighForce - rts + ; if target distance lower than 24 - set weapon to Baby Missile (for security :) + jmp GetDistance + ;rts .endp ;---------------------------------------------- @@ -1079,7 +1064,7 @@ loop ; This procedure must be called immediately after targeting. ; xdraw value should remain unchanged from the end of the Flight procedure. ; -; result in A +; if target distance lower than 24 - set weapon to Baby Missile ;---------------------------------------------- ;xdraw/4 lda xdraw+1 @@ -1095,6 +1080,16 @@ YisLower eor #$ff adc #1 XisLower + ;rts + cpx TargetTankNr ; If tank is aiming at itself don't change weapon, + beq NoChangeToBM ; he is the only one without a Long Shlong :) + ; if target distance lower than 24 - set weapon to Baby Missile (for security :) + cmp #6 ; 24/4 + bcs HighDistance + lda #ind_Baby_Missile + sta ActiveWeapon,x +HighDistance +NoChangeToBM rts .endp diff --git a/scorch.asm b/scorch.asm index 3c431e2..eb9f0b6 100644 --- a/scorch.asm +++ b/scorch.asm @@ -26,7 +26,7 @@ ;--------------------------------------------------- .macro build - dta d"1.36" ; number of this build (4 bytes) + dta d"1.37" ; number of this build (4 bytes) .endm .macro RMTSong diff --git a/scorch.bin b/scorch.bin index 7f891c18cdfe8c12c29a208a4eea93f74459f801..12b187f8ad57b1c4a8af7c1351de82552bf61782 100644 GIT binary patch delta 522 zcmZo@U}|V!+VGT(QGD|=wh{@(E1RR`r-?J_ZT@7I%*trLIn2hDk#Ya#IkrqTC`TOJ)?kFjHjK=jnIn z_|GkxI~@p*0paw?XTt-Te$Ab%5K+(dW3B?#By$nSzrTa zDFFEkBXz}n_~wC>h0a{b0JIn+H(?G)?tP@L8c6Q{43Jz3Ty6o2!mqhY7tPJ%UAlN~ z2`^B|=CCL(MwWZC72+nRL>maY%(hs1{vbL50MVCfvGqz5?7_G^|22%77 zsOa8oiKSOEfr_5N6xqjU3(C*2Sh@(Pbv+yvu)gA v?#T->1vX`^V`lW9ygqjdhyBXdPfLGDI!yM?lVlHGId{Iq&Wz33c~b=eZ-?a| delta 570 zcmZo@U}|V!+VGT(QEc-wwh{@(Pn)CVr-?J#ZT@7I%*yD$In2hDk@5WIIkrqYD=#B%PiSzrTa zDFFEkBXt!ObmpC8+rYY#VQvp^0!TyX%#{p4CxBF~n*&nyG*Z_JRn`9)AXO=FRSQ@Y zB<3w$G&hfT>EgL1ydcFKFe5ixL~${){F$v#GubWLKrm^x#nLM;SzE6hyRwqCwFD^I z9<9x|c=G0GO%@f9q6a`le`ZT8y^;x3^bDp*F-BX^c8R{5knVj25HHJ_Iug{&r;lHx=)6yT30h7J+B-xW!&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