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
; 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
; 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
; $4: x
; $5: hp
; $6: mp
+ ; $7: armor
+ ; $8: ring
+ ; $9: weapon
#macro actdef
.db $1, $2, $3, $4
; dir, p0 and state
dw $6
; buff/debuff
.db 0, 0
+ .db $7, $8, $9
#endmacro
; defines an attribute list
; $3: wisdom
; $4: stamina
; $5: resistances
+ ; $6: proficiency
#macro attrdef
- .db $1, $2, $3, $4, $5
+ .db $1, $2, $3, $4, $5, $6
#endmacro