From da0ed864d52230d6ca0e216e2e6ee9516ff350fe Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Thu, 28 Aug 2025 09:59:50 +0200 Subject: [PATCH] unit: dealy to active now automatically sets player turn done when the player is delaying --- src/player.s | 2 +- src/unit.s | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/player.s b/src/player.s index 2a67824..52b016a 100644 --- a/src/player.s +++ b/src/player.s @@ -323,7 +323,7 @@ unit_player_attack: 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 diff --git a/src/unit.s b/src/unit.s index 7e93070..6202662 100644 --- a/src/unit.s +++ b/src/unit.s @@ -752,9 +752,22 @@ unit_sleep: ; 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 -- 2.30.2