unit_cpu: Made the default AI follow the player a little bit less
authorLukas Krickl <lukas@krickl.dev>
Thu, 21 Aug 2025 18:27:24 +0000 (20:27 +0200)
committerLukas Krickl <lukas@krickl.dev>
Thu, 21 Aug 2025 18:27:24 +0000 (20:27 +0200)
src/unit_cpu.s

index 961ecb06a27802ddfaeca90d065ff4da4e988fb9..2325cad277580fed04dc466c73a1fa1ca3a9b2c9 100644 (file)
@@ -24,7 +24,7 @@ unit_handle_cpu_inputs:
        ; there's a change the
        ; unit will just move randomly anyway
        call rand
-       and a, 0x7F
+       and a, 0x2
        cp a, 0
        jp z, @random_move
 
@@ -45,7 +45,7 @@ unit_handle_cpu_inputs:
        ; are we in scan range?
        cp a, UNIT_SCAN_RANGE_Y
        jr nc, @not_in_y_range REL
-       cp a, 1 
+       cp a, 0 
        jr z, @not_in_y_range REL
 
        ; which direction?
@@ -74,7 +74,7 @@ unit_handle_cpu_inputs:
        ; are we in scan range?
        cp a, UNIT_SCAN_RANGE_X
        jr nc, @not_in_x_range REL
-       cp a, 1 
+       cp a, 0 
        jr z, @not_in_x_range REL
 
        ; which direction?