summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-28 17:46:41 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-28 17:46:41 +0100 |
commit | 1b59bdfc0d923a1ebfcebf4d6efceb2f2f4579a4 (patch) | |
tree | d000a796fd61b27d8031cbdf691f1be73fdb5cb0 /src/struct | |
parent | 5235345620c0d4a6669ccc6badc387902ea8c92a (diff) |
Moved the mess from 'character_turn' into 'attack'.
Diffstat (limited to 'src/struct')
-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{ |