From d9fbf8d5a22dd65a035b008d1ba01e47e653dcab Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Fri, 15 Aug 2025 07:05:54 +0200 Subject: [PATCH] defs: Added battle order to actors --- src/defs.s | 4 ++++ src/macros.inc | 2 ++ src/wram.s | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/defs.s b/src/defs.s index 94993d5..85d6fe0 100644 --- a/src/defs.s +++ b/src/defs.s @@ -173,6 +173,10 @@ ; last collision with actor ; set during unit_collision_woth_any_other .de act_rt_collided_with, 2 + ; indicates which order the actor has in battle mode + ; the actors attack rotuine should wait until battle_order == their battle order + ; and then perform an action +.de act_rt_battle_order, 1 ; sub-tile drawing vars ; during this animation the actor is already technically in its new diff --git a/src/macros.inc b/src/macros.inc index 0a75620..f2ca1a6 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -190,6 +190,8 @@ .db 0 ; act_rt_sub_tile ; act_rt_loot_table_dat dw 0 + ; battle order + .db 0 #endmacro ; defines an actor's stats (1/2) diff --git a/src/wram.s b/src/wram.s index 0855400..d8d9b84 100644 --- a/src/wram.s +++ b/src/wram.s @@ -178,5 +178,8 @@ act_sg: .adv act_sg_size * UNITS_MAX * FLOOR_MAP_COUNT act_sg_end: battle_records: .adv br_size * BR_MAX + ; current battle number + ; compate to act_rt_battle_order to see whose turn it is +battle_order: .adv 1 state_end: -- 2.30.2