actor: Added proficiency and item equipment slots
authorLukas Krickl <lukas@krickl.dev>
Sat, 20 Dec 2025 06:21:36 +0000 (07:21 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sat, 20 Dec 2025 06:21:36 +0000 (07:21 +0100)
src/attributes.s
src/defs.s
src/levels.s
src/macros.inc

index 1b25463dab8fc476e08dd82bb16891ef39e31120..2f84a9af4b2292e9319de40ac0b13786de189721 100644 (file)
@@ -6,7 +6,7 @@ act_attr_table:
        dw attr_bat
 
 attr_null:
-attrdef 0, 0, 0, 0, 0
+attrdef 0, 0, 0, 0, 0, 0
 
 attr_bat:
-attrdef 1, 0, 0, 1, 0
+attrdef 1, 0, 0, 1, 0, 0
index 89c17c876e398dce89ea047e5c2e7e1e3f5c3e1b..ef87af2d3136539ae9d81cac6953be03eb9b3b89 100644 (file)
        ; NNNN0000: debuff status
        ;       0000NNNN: debuff type
 .de act_debuff, 1
+       ; item ids for each slot
+       ; each slot type has its own table
+       ; of items
+.de act_armor, 1
+.de act_ring, 1
+.de act_weapon, 1
 .de act_size, 0
 
  
        ; resistances are 2 bit values
        ; see resistance masks
 .de attr_res, 1
+       ; proficiency are 1 bit values
+       ; see proficency masks
+.de attr_prof, 1
 .de attr_size, 0
 
        ; resistance masks
 .def int ATTR_RES_FIRE = 0b00110000
 .def int ATTR_RES_FROST = 0b00001100
 .def int ATTR_RES_LIGHTNING = 0b00000011
+
+       ; proficiency masks
+.def int ATTR_PROF_HEAVY_ARMOR = 0b10000000
+.def int ATTR_PROF_LIGHT_ARMOR = 0b01000000
+.def int ATTR_PROF_SHORT_BLADE = 0b00100000
+.def int ATTR_PROF_LONG_BLADE = 0b00010000
+.def int ATTR_PROF_BOW = 0b00001000
+.def int ATTR_PROF_AXE = 0b00000100
+.def int ATTR_PROF_MACE = 0b00000010
+.def int ATTR_PROF_MAGIC = 0b00000001
+
+.def int ITEM_NONE = 0
index 87a1d2a695034e2f2b99c310178ad23facce0beb..e65f1e7b7b9f475fc9ca63168ce7bae8676fc412 100644 (file)
@@ -14,8 +14,8 @@ l1:
        
        ; l1 actor table
 l1_acts:
-       actdef ACT_T_BAT, 0, 4, 6, 2, 1
-       actdef ACT_T_BAT, 0, 0, 2, 2, 1
+       actdef ACT_T_BAT, 0, 4, 6, 2, 1, ITEM_NONE, ITEM_NONE, ITEM_NONE
+       actdef ACT_T_BAT, 0, 0, 2, 2, 1, ITEM_NONE, ITEM_NONE, ITEM_NONE
        .db 0 ; terminate
        
 
index 16a57d55ad1945187a9b20076abead86897e6ec4..cc1a6b35754f6a6a5c2c07f96b739c72ecd5db07 100644 (file)
@@ -185,6 +185,9 @@ $1:
        ;               $4: x
        ;               $5: hp
        ;               $6: mp
+       ;               $7: armor
+       ;               $8: ring
+       ;               $9: weapon
 #macro actdef
        .db $1, $2, $3, $4
        ; dir, p0 and state
@@ -193,6 +196,7 @@ $1:
        dw $6
        ; buff/debuff
        .db 0, 0 
+       .db $7, $8, $9
 #endmacro
        
        ; defines an attribute list
@@ -202,6 +206,7 @@ $1:
        ;               $3: wisdom
        ;               $4: stamina
        ;               $5: resistances 
+       ;               $6: proficiency
 #macro attrdef
-       .db $1, $2, $3, $4, $5
+       .db $1, $2, $3, $4, $5, $6
 #endmacro