defs: Added battle order to actors
authorLukas Krickl <lukas@krickl.dev>
Fri, 15 Aug 2025 05:05:54 +0000 (07:05 +0200)
committerLukas Krickl <lukas@krickl.dev>
Fri, 15 Aug 2025 05:05:54 +0000 (07:05 +0200)
src/defs.s
src/macros.inc
src/wram.s

index 94993d546fa4503727c9f9060ded633622a529be..85d6fe04bd70d8e2331b1f3ab743093611af8015 100644 (file)
   ; 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 
index 0a75620613096e7b4a2d6e942c8b67badb5b6fe8..f2ca1a60e8773816e8eacae77d88f0ce9f102979 100644 (file)
   .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)
index 0855400da18e99d4df5e5351941e233b7b298645..d8d9b84aa4b77203c8cf5bae58dacc372a90f275 100644 (file)
@@ -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: