; and the actor's stats
; inputs:
; de: actor attacking
-actor_attack:
+act_attack:
+ ret
+
+ ; loads attribute table of an actor
+ ; inputs:
+ ; de: actor
+ ; returns:
+ ; bc: attribute table
+act_load_attr_table:
+ ld a, [hl] ; load type
+ add a, a
+ ld hl, act_attr_table
+ add a, a
+ ld b, 0
+ ld c, a ; bc = offset into attr table
+ add hl, bc ; hl = attr ptr
+
+ ld a, [hl+]
+ ld c, [hl]
+ ld b, a
+
+ ; bc = attribute
+
ret
; returns:
; a: attribute value + item bounus + buffs - debuffs
attr_get_str:
+ call act_load_attr_table
+ ; bc = attributes
+ ld hl, attr_str
+ add hl, bc
+ ld a, [hl] ; a = str
ret
; calculates the attack damage