stats: cleaned up stats
authorLukas Krickl <lukas@krickl.dev>
Wed, 16 Jul 2025 14:30:50 +0000 (16:30 +0200)
committerLukas Krickl <lukas@krickl.dev>
Wed, 16 Jul 2025 14:30:50 +0000 (16:30 +0200)
Replaced some stats with resistances

TODO.md
src/defs.s
src/macros.inc
src/player.s
src/unit_demo.s

diff --git a/TODO.md b/TODO.md
index fc4f18a11b0c6a60090f6b84a02ab89e0de722d9..b928605e67ac3cb0cd91b38923ba77df55a66bac 100644 (file)
--- a/TODO.md
+++ b/TODO.md
 [ ] Doors may be opened and can unveil more of the map 
 [ ] Implement partial map redraws. Allow queueing up a map redraw which then is processed over several frames. Allow setting a start address, tiles per row and rows to redraw.
 
+# Items
+
+[ ] Each item can have all stats either as a positive or negative effect
+[ ] Each item can also increase or decrease attack damage
 
 ## Units
 
index 3829502670dfec0791a82606ee51dc88b79db429..439e30a0a8ca8686f815cfed78f13b471e236874 100644 (file)
   ; act_def
   ; act_stat_def1
   ; act_stat_def2
-  ; act_skill_def or act_skill_def_empty
   ; act_inventory_def or act_inventory_empty
   ; act_equipment_def or act_equipment_empty
   ; act_effects_def or act_effects_empty
 .de act_level, 1
 .de act_hp, stat_size
 .de act_mp, stat_size
-.de act_fatigue, stat_size
 .de act_ac, stat_size 
 
   ; stats2
 .de act_str, stat_size
 .de act_int, stat_size
 .de act_dex, stat_size
+  
+  ; increases chance to hit
 .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
-  ; describes skills
+  ; resistances 
+.de act_poison_res, stat_size
+.de act_fire_res, stat_size
+.de act_lightning_res, stat_size
+
+  ; decreases time between moves
+.de act_speed, stat_size
 
   ; inventory
   ; stores items, for all actors but player
index 6e2ec453271d16af97a3320edb56f332b58101c5..f21796dd3fc6a5093a3496ee0cc14a0408a2587e 100644 (file)
   ;   $1 level
   ;   $2 health points
   ;   $3 mana points
-  ;   $4 fatigue points
   ;   $5 armor
 #macro act_stat_def1
   .db $1 ; level
   .db $2 ; hp hp max
   .db $3 ; mp mp max
-  .db $4 ; fatigue fatigue max
-  .db $5 ; ac
+  .db $4 ; ac
 #endmacro
 
   ;   $1 str
   ;   $2 int
   ;   $3 dex
   ;   $4 luck
-  ;   $5 willpower 
-  ;   $6 charisma 
-  ;   $7 endurance
+  ;   $5 poison res 
+  ;   $6 fire res 
+  ;   $7 lightning res 
   ;   $8 speed
 #macro act_stat_def2
   .db $1 ; str str max
   .db $2 ; int int max
   .db $3 ; dex dex max
   .db $4 ; luck luck max
-  .db $5 ; will will max
-  .db $6 ; char char max
-  .db $7 ; endurance endurance max
+  .db $5 ; poison resist 
+  .db $6 ; fire resist 
+  .db $7 ; lightning resist 
   .db $8 ; speed speed max
 #endmacro
 
 #endmacro
 
 
-  ; defines an actors attributes
-  ; such as weapon skills
-#macro act_skill_def
-#endmacro
-  
-  ; default attributes
-#macro act_skill_def_empty
-  act_skill_def
-#endmacro
-
   ; defines an actors inventory content
 #macro act_inventory_def
 #endmacro
index be4b0f20258b64f5bb7018b299b2cfe6e42970c6..ff2887785b6e4439de0918beff831563eb590d8e 100644 (file)
@@ -197,9 +197,8 @@ map_exit_relative_adjust:
 unit_player:
   st_def 0x00, unit_player_init, st_unit_idle
   act_def ACT_T_DEMO_1, 0, 2, 2, 0
-  act_stat_def1 1, 1, 1, 1, 1
+  act_stat_def1 1, 1, 1, 1
   act_stat_def2 1, 1, 1, 1, 1, 1, 1, 90 
-  act_skill_def_empty
   act_inventory_empty
   act_equipment_empty
   act_effects_empty
index e1f5f9c015ca49ad2fb7c91ca1fcdfece1779683..1d0318b157cc2d3705aa3b0fc193fae9aae13ede 100644 (file)
@@ -42,9 +42,8 @@ unit_demo_1_cpu_update_idle:
 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_def1 1, 1, 1, 1, 1
+  act_stat_def1 1, 1, 1, 1
   act_stat_def2 1, 1, 1, 1, 1, 1, 1, 32 
-  act_skill_def_empty
   act_inventory_empty
   act_equipment_empty
   act_effects_empty
@@ -54,9 +53,8 @@ unit_demo_2:
 unit_demo_warrior:
   st_def 0x00, unit_demo_1_init, st_unit_demo_1_cpu_update
   act_def ACT_T_DEMO_1, 0, 4, 4, 0 
-  act_stat_def1 1, 1, 1, 1, 1 
+  act_stat_def1 1, 1, 1, 1 
   act_stat_def2 1, 1, 1, 1, 1, 1, 1, 32
-  act_skill_def_empty
   act_inventory_empty
   act_equipment_empty
   act_effects_empty
@@ -66,9 +64,8 @@ unit_demo_warrior:
 unit_demo_mage:
   st_def 0x00, unit_demo_1_init, st_unit_demo_1_cpu_update
   act_def ACT_T_DEMO_1, 0, 4, 4, 0 
-  act_stat_def1 1, 1, 1, 1, 1 
+  act_stat_def1 1, 1, 1, 1 
   act_stat_def2 1, 1, 1, 1, 1, 1, 1, 32
-  act_skill_def_empty
   act_inventory_empty
   act_equipment_empty
   act_effects_empty
@@ -78,9 +75,8 @@ unit_demo_mage:
 unit_demo_thief:
   st_def 0x00, unit_demo_1_init, st_unit_demo_1_cpu_update
   act_def ACT_T_DEMO_1, 0, 4, 4, 0 
-  act_stat_def1 1, 1, 1, 1, 1 
+  act_stat_def1 1, 1, 1, 1 
   act_stat_def2 1, 1, 1, 1, 1, 1, 1, 32
-  act_skill_def_empty
   act_inventory_empty
   act_equipment_empty
   act_effects_empty
@@ -91,9 +87,8 @@ unit_demo_thief:
 unit_demo_priest:
   st_def 0x00, unit_demo_1_init, st_unit_demo_1_cpu_update
   act_def ACT_T_DEMO_1, 0, 4, 4, 0 
-  act_stat_def1 1, 1, 1, 1, 1 
+  act_stat_def1 1, 1, 1, 1 
   act_stat_def2 1, 1, 1, 1, 1, 1, 1, 32
-  act_skill_def_empty
   act_inventory_empty
   act_equipment_empty
   act_effects_empty