action: added tile getter to attack action
authorLukas Krickl <lukas@krickl.dev>
Mon, 26 Jan 2026 03:22:23 +0000 (04:22 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 26 Jan 2026 03:22:23 +0000 (04:22 +0100)
src/action.s

index b62f050e55c46e6043a7157a9c9fc6ed7fa49a17..707ffb2904b3dcf14bc0d4f4a1c6981e59058cef 100644 (file)
@@ -21,5 +21,14 @@ dw action_attack
        ;               de: actor
        ;               bc: target tile
 action_attack:
-       BREAK
+       push de
+       call map_get_tile
+       ; hl = tile ptr
+       pop de
+       
+       ld bc, t_act
+       add hl, bc ; hl = tact
+
+       ; check if there is something to attack
+
        ret