action: Added simple actor_die call when an actor is attacked
authorLukas Krickl <lukas@krickl.dev>
Thu, 29 Jan 2026 08:37:48 +0000 (09:37 +0100)
committerLukas Krickl <lukas@krickl.dev>
Thu, 29 Jan 2026 08:37:48 +0000 (09:37 +0100)
src/action.s

index 19b389e921bbc07200009e4fe349fc349aefa7fa..eb113b5371503540b913de134d7dccd2841157fa 100644 (file)
@@ -32,12 +32,17 @@ action_attack:
        ; check if there is something to attack
        ld a, [hl+]
        ld c, a
-       ld h, [hl]
-       ld l, c
+       ld l, [hl]
+       ld h, c
        or a, h
        ret z ; no actor here...
        
        ; hl = actor
-       BREAK
+
+       ; TODO: for now just kill the actor
+       ; later we need actual damage calculations
+       push hl
+       pop de
+       call act_die
 
        ret