Fixed actor lookup returning actors of type NULL
call unit_attack_get_attack_tile
call unit_find_at
- ldnull bc
ld a, h
or a, l
pop de
- ret z ; no unit found
+ jp z, @miss ; no unit found
push hl
pop bc
ldnull bc
ret
+@miss:
+ ld hl, STR_MISS
+ ld de, UI_STATUS_LINE
+ call puts
+ call ui_request_redraw
+ ldnull bc
+ ret
; default attack state
.str "hit for "
.db 0
+STR_MISS:
+.str "miss"
+.db 0
+
STR_SLASH:
.str "/"
.db 0
push af
push hl
+ push hl
+ ; do not find type null
+ ld de, act_type
+ add hl, de
+ ld a, [hl]
+ pop hl
+ cp a, 0
+ jr z, @no_match REL
+
ld de, act_pos_y
add hl, de
; hl = y pos