unit_player:
st_def 0x00, unit_player_init, st_unit_idle
act_def ACT_T_DEMO_1, 0, 2, 2, 0
- act_stat_def1 1, 1, 1, 1
+ act_stat_def1 1, 3, 1, 1
act_stat_def2 1, 1, 90, 1
act_st_def st_unit_player_update, st_unit_idle
act_def_meta player_draw, 0x8C, OAM_FPRIO, NULL
; this call also checks if the unit may need to
; hand over control to a new unit
; this is done when moves are 0
+ ; if the player unit is here we set the turn as finished
; inputs:
; de: unit
unit_delay_to_active:
+ ; check if de is player
+ ; if so set turn as finished
+ ld a, player_unit LO
+ cp a, e
+ jr nz, @not_player REL
+ ld a, player_unit HI
+ cp a, d
+ jr nz, @not_player REL
+
+ call unit_set_player_turn_taken
+
+@not_player:
; do not proceed if an attack animation is ongoing
ld a, [gameplay_flags]
and a, GPF_ATTACK_ONGOING