ld [player+act_hp+1], a
_player_set_target -1, 0
+
+ ; set default actions
+ ld a, action_attack HI
+ ld [player_action_a], a
+ ld [player_action_b], a
+
+ ld a, action_attack LO
+ ld [player_action_a+1], a
+ ld [player_action_b+1], a
ret
ret
- ; player attack call
-player_attack:
+ ; player perform action a
+player_do_action_a:
call player_load_target_tile
call map_get_tile
- ret
+ ld a, [player_action_a]
+ ld h, a
+ ld a, [player_action_a+1]
+ ld l, a
+ jp action_exec
; moves the player
; does not move out of bounds
input_just
jr z, @not_attack REL
ld de, player
- call player_attack
+ call player_do_action_a
@not_attack:
ld b, DIRLEFT