unit: Added new stats
authorLukas Krickl <lukas@krickl.dev>
Tue, 10 Jun 2025 18:41:11 +0000 (20:41 +0200)
committerLukas Krickl <lukas@krickl.dev>
Tue, 10 Jun 2025 18:41:11 +0000 (20:41 +0200)
src/defs.s
src/macros.inc
src/unit.s

index a9121a60250a7b80ae22a810c3090ba7b0c17416..6bc0c0ffacce9e2c768c25c1ecea9994cc16b062 100644 (file)
   ; to define an actor the following macros must be used in order
   ; st_def
   ; act_def
-  ; act_stat_def
+  ; act_stat_def1
+  ; act_stat_def2
   ; act_attr_def or act_attr_def_empty
   ; act_inventory_def or act_inventory_empty
   ; act_equipment_def or act_equipment_empty
 .de act_p0, 1
 
 
-  ; stats
+  ; stats1
 .de act_level, 1
 .de act_hp, stat_size
 .de act_mp, stat_size
+.de act_fatigue, stat_size
 .de act_ac, stat_size
+.de act_moves, stat_size ; moves for each turn
+.de act_init, 1 ; initiative value
+
+  ; stats2
 .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
+.de act_luck, stat_size
+.de act_will, stat_size
+.de act_charisma, stat_size
+.de act_endurance, stat_size
+.de act_speed, stat_size
+
   ; attributes
 
   ; inventory
index 5e3da3484734911d744e54721354bc4f587a8d92..2e0ddffc7bc55930cf565bc4e75df7baacbde9b3 100644 (file)
   .db $5 ; p0
 #endmacro
   
-  ; defines an actor's stats
+  ; defines an actor's stats (1/2)
   ;   $1 level
   ;   $2 health points
   ;   $3 mana points
-  ;   $4 armor
-  ;   $5 str
-  ;   $6 int
-  ;   $7 dex
-  ;   $8 moves
-  ;   $9 initiative
-#macro act_stat_def
+  ;   $4 fatigue points
+  ;   $5 armor
+  ;   $6 moves
+  ;   $7 initiative
+#macro act_stat_def1
   .db $1 ; level
   .db $2, $2 ; hp hp max
   .db $3, $3 ; mp mp max
-  .db $4, $4 ; ac ac max
-  .db $5, $5 ; str str max
-  .db $6, $6 ; int int max
-  .db $7, $7 ; dex dex max
-  .db $8, $8 ; moves moves max
-  .db $9 ; initiative
+  .db $4, $4 ; fatigue fatigue max
+  .db $5, $5 ; ac ac max
+  .db $6, $6 ; moves moves max
+  .db $7 ; initiative
+#endmacro
+
+  ;   $1 str
+  ;   $2 int
+  ;   $3 dex
+  ;   $4 luck
+  ;   $5 willpower 
+  ;   $6 charisma 
+  ;   $7 endurance
+  ;   $8 speed
+#macro act_stat_def2
+  .db $1, $1 ; str str max
+  .db $2, $2 ; int int max
+  .db $3, $3 ; dex dex max
+  .db $4, $4 ; luck luck max
+  .db $5, $5 ; will will max
+  .db $6, $6 ; char char max
+  .db $7, $7 ; endurance endurance max
+  .db $8, $8 ; speed speed max
 #endmacro
 
   ; defines actor state callbacks
index 668ef1bceb093f6ef06b9d27d2fbdfb7189c3b07..0de652afce05e2ee3f617818a36496f4ce32dc8b 100644 (file)
@@ -801,7 +801,8 @@ unit_dice_display_set:
 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, 1, 2, 3, 0, 0, 0, 4, 6 
+  act_stat_def1 1, 1, 1, 1, 1, 3, 3 
+  act_stat_def2 1, 1, 1, 1, 1, 1, 1, 1 
   act_attr_def_empty
   act_inventory_empty
   act_equipment_empty
@@ -813,7 +814,8 @@ 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, 1, 2, 3, 0, 0, 0, 0, 5  
+  act_stat_def1 1, 1, 1, 1, 1, 0, 3 
+  act_stat_def2 1, 1, 1, 1, 1, 1, 1, 1 
   act_attr_def_empty
   act_inventory_empty
   act_equipment_empty
@@ -825,7 +827,8 @@ unit_demo_2:
 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, 1, 2, 3, 0, 0, 0, 4, 5 
+  act_stat_def1 1, 1, 1, 1, 1, 4, 5 
+  act_stat_def2 1, 1, 1, 1, 1, 1, 1, 1 
   act_attr_def_empty
   act_inventory_empty
   act_equipment_empty