summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-26 17:16:08 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-26 17:16:08 +0100 |
commit | 6494b74a45e27085fd81836f7b8c969431e8ff3c (patch) | |
tree | e344a24fa2e9a2ee198314c0552c46b235072009 /src/struct/weapon.erl | |
parent | fd4d031ab5b31763d376c663cc049f62ee389243 (diff) |
Got it to work, I think.
Diffstat (limited to 'src/struct/weapon.erl')
-rw-r--r-- | src/struct/weapon.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/struct/weapon.erl b/src/struct/weapon.erl index ca74ada..41f99f8 100644 --- a/src/struct/weapon.erl +++ b/src/struct/weapon.erl @@ -24,16 +24,17 @@ ( [ get_id/1, - random_id/0 + get_range_type/1, + get_ranges/1, + get_damages/1 ] ). -export ( [ + random_id/0, from_id/1, - get_ranges/1, - get_damages/1, apply_to_attributes/2 ] ). @@ -57,6 +58,8 @@ damages_of_type (melee, light) -> {15, 30}. %%%% Accessors get_id (Wp) -> Wp#weapon.id. +get_range_type (Wp) -> Wp#weapon.range_type. + get_ranges (Wp) -> ranges_of_type(Wp#weapon.range_type, Wp#weapon.range_mod). get_damages (Wp) -> @@ -293,7 +296,7 @@ random_id () -> apply_to_attributes (Attributes, Weapon) -> Dexterity = attributes:get_dexterity(Attributes), - Speed = attributes:get_dexterity(Attributes), + Speed = attributes:get_speed(Attributes), RangeModifier = Weapon#weapon.range_mod, DamageModifier = Weapon#weapon.damage_mod, WithRangeModifier = |