unit: added more stats to each unit
authorLukas Krickl <lukas@krickl.dev>
Fri, 30 May 2025 12:39:37 +0000 (14:39 +0200)
committerLukas Krickl <lukas@krickl.dev>
Fri, 30 May 2025 12:39:37 +0000 (14:39 +0200)
src/defs.s
src/macros.inc
src/unit.s

index e146d1a126b700ae06dab38ce4f8baf7b3027aa1..b376e708927c3a66ce1cf3e5f21f6d1dceacd6dc 100644 (file)
 
   ; stats
 .de act_hp, stat_size
-.de act_atk, stat_size
-.de act_shield, stat_size
+.de act_mp, stat_size
+.de act_ac, stat_size
+.de act_str, stat_size
+.de act_int, stat_size
+.de act_dex, stat_size
 .de act_moves, stat_size ; moves for each turn
 .de act_init, 1 ; initiative value
 
index 296612f36b766a80e64c8c1d25ef7d4bb669506d..8961abf072e1a2abcb641154ec2dd22d893beb5f 100644 (file)
 #endmacro
   
   ; defines an actor's stats
-  ;   $1 hp
-  ;   $2 atk
-  ;   $3 shiled
-  ;   $4 moves
-  ;   $5 initiative
+  ;   $1 health points
+  ;   $2 mana points
+  ;   $3 armor
+  ;   $4 str
+  ;   $5 int
+  ;   $6 dex
+  ;   $7 moves
+  ;   $8 initiative
 #macro act_stat_def
   .db $1, $1 ; hp hp max
-  .db $2, $2 ; atk atk max
-  .db $3, $3 ; shiled shield max
-  .db $4, $4 ; moves moves max
-  .db $5 ; initiative
+  .db $2, $2 ; mp mp max
+  .db $3, $3 ; ac ac max
+  .db $4, $4 ; str str max
+  .db $5, $5 ; int int max
+  .db $6, $6 ; dex dex max
+  .db $7, $7 ; moves moves max
+  .db $8 ; initiative
 #endmacro
 
   ; defines actor state callbacks
index d3f6030d3f618cfa3634c853a20afbe63884167c..7727d24da0ddef865e3f5402449a63004a201c6e 100644 (file)
@@ -640,7 +640,7 @@ unit_get_tile:
 unit_demo_1:
   st_def 0x00, unit_demo_1_init, st_unit_idle
   act_def ACT_T_DEMO_1, 0, 2, 2, 0
-  act_stat_def 1, 2, 3, 4, 6 
+  act_stat_def 1, 2, 3, 0, 0, 0, 4, 6 
   act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
   act_def_draw unit_draw, 0x84, 0
 
@@ -648,14 +648,14 @@ unit_demo_1:
 unit_demo_2:
   st_def 0x00, unit_demo_1_init, st_unit_idle
   act_def ACT_T_DEMO_1, 0, 3, 3, 0 
-  act_stat_def 1, 2, 3, 1, 5  
+  act_stat_def 1, 2, 3, 0, 0, 0, 1, 5  
   act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
   act_def_draw unit_draw, 0x84, 0
 
 unit_demo_3:
   st_def 0x00, unit_demo_1_init, st_unit_idle
   act_def ACT_T_DEMO_1, 0, 4, 4, 0 
-  act_stat_def 1, 2, 3, 0, 5 
+  act_stat_def 1, 2, 3, 0, 0, 0, 0, 
   act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
   act_def_draw unit_draw, 0x84, 0