action: Added actor getter
authorLukas Krickl <lukas@krickl.dev>
Tue, 27 Jan 2026 16:26:13 +0000 (17:26 +0100)
committerLukas Krickl <lukas@krickl.dev>
Tue, 27 Jan 2026 16:26:13 +0000 (17:26 +0100)
src/action.s

index 707ffb2904b3dcf14bc0d4f4a1c6981e59058cef..19b389e921bbc07200009e4fe349fc349aefa7fa 100644 (file)
@@ -30,5 +30,14 @@ action_attack:
        add hl, bc ; hl = tact
 
        ; check if there is something to attack
+       ld a, [hl+]
+       ld c, a
+       ld h, [hl]
+       ld l, c
+       or a, h
+       ret z ; no actor here...
+       
+       ; hl = actor
+       BREAK
 
        ret