summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/struct/weapon.erl')
-rw-r--r-- | src/struct/weapon.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/struct/weapon.erl b/src/struct/weapon.erl index d96886c..80cb925 100644 --- a/src/struct/weapon.erl +++ b/src/struct/weapon.erl @@ -55,6 +55,7 @@ [ random_id/0, from_id/1, + can_parry/1, apply_to_attributes/2 ] ). @@ -102,6 +103,9 @@ get_ranges (Wp) -> get_damages (Wp) -> damages_of_type(Wp#weapon.range_type, Wp#weapon.damage_mod). +-spec can_parry (struct()) -> boolean(). +can_parry (Wp) -> (Wp#weapon.range_type == melee). + -spec from_id (id()) -> struct(). from_id (0) -> #weapon{ |