summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-10 18:10:08 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-10 18:10:08 +0100 |
commit | d7b161da1c502402e0c0063c3ffbaa9042bfb24d (patch) | |
tree | 354ac75eb8a140dff80d7a5175b660eeeca35500 /src/type | |
parent | 73f531db4d999217447aff616313f6532a579610 (diff) |
Starting to add weapons to the mix.stats_calc
Diffstat (limited to 'src/type')
-rw-r--r-- | src/type/weapon.erl | 11 | ||||
-rw-r--r-- | src/type/weapon_shim.erl | 10 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/type/weapon.erl b/src/type/weapon.erl index b5e5e0c..c5533de 100644 --- a/src/type/weapon.erl +++ b/src/type/weapon.erl @@ -35,6 +35,7 @@ -export ( [ + from_id/1, get_category/1, get_ranges/1 ] @@ -78,3 +79,13 @@ get_min_power (Wp) -> Wp#weapon.pwr_min. get_ranges (Wp) -> ranges_of_type(Wp#weapon.type). get_category (Wp) -> category_of_type(Wp#weapon.type). + +from_id (0) -> + #weapon{ + id = 0, + name = "Shim Weapon 0", + icon = "0", + type = sword, + pwr_min = 10, + pwr_max = 90 + }. diff --git a/src/type/weapon_shim.erl b/src/type/weapon_shim.erl index 52d9069..6225e25 100644 --- a/src/type/weapon_shim.erl +++ b/src/type/weapon_shim.erl @@ -33,12 +33,4 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -rand() -> - #weapon{ - id = 0, - name = "Shim Weapon 0", - icon = "0", - type = sword, - pwr_min = 10, - pwr_max = 90 - }. +rand() -> 0. |