summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-13 16:02:58 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-13 16:02:58 +0200
commitb60978b4dacb355fbd12779fb4f8089a7321883d (patch)
tree266b396622e7ed3b3e9f33d1e585fa08e54da46d /src/shared/struct/shr_armor.erl
parent7a303fc22b00a1d60600a9802e5e392521221d82 (diff)
Split data into tacticians-data.
Diffstat (limited to 'src/shared/struct/shr_armor.erl')
-rw-r--r--src/shared/struct/shr_armor.erl20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/shared/struct/shr_armor.erl b/src/shared/struct/shr_armor.erl
index 65445ca..fa516f3 100644
--- a/src/shared/struct/shr_armor.erl
+++ b/src/shared/struct/shr_armor.erl
@@ -69,41 +69,49 @@ get_coefficient (Ar) -> Ar#armor.coef.
get_category (Ar) -> Ar#armor.category.
-spec from_id (id()) -> type().
+
from_id (0) ->
- #armor{
+ #armor
+ {
id = 0,
name = <<"None">>,
category = leather,
coef = 0.0
};
from_id (1) ->
- #armor{
+ #armor
+ {
id = 1,
name = <<"Last Meal's Pelts">>,
category = leather,
coef = 0.5
};
from_id (2) ->
- #armor{
+ #armor
+ {
id = 2,
name = <<"Bits of Wall">>,
category = plate,
coef = 0.5
};
from_id (3) ->
- #armor{
+ #armor
+ {
id = 3,
name = <<"Garden Fence">>,
category = chain,
coef = 0.5
};
from_id (4) ->
- #armor{
+ #armor
+ {
id = 4,
name = <<"Morrigan's Pity">>,
category = kinetic,
coef = 0.5
- }.
+ };
+from_id(_) ->
+ from_id(0).
-spec random_id () -> id().
random_id () -> shr_roll:between(0, 4).