From: Lukas Krickl Date: Fri, 15 Aug 2025 05:05:54 +0000 (+0200) Subject: defs: Added battle order to actors X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=d9fbf8d5a22dd65a035b008d1ba01e47e653dcab;p=gbrg%2F.git defs: Added battle order to actors --- 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: