summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-26 13:52:29 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-26 13:52:29 +0100 |
commit | fd4d031ab5b31763d376c663cc049f62ee389243 (patch) | |
tree | cd09a29bb888acf772fa1aee59fe95e8bd75fe4e /src/struct/attributes.erl | |
parent | 66ec11ce5d2e227846d6e6b2899cda851a70fc04 (diff) |
Got it to run, at last.
Diffstat (limited to 'src/struct/attributes.erl')
-rw-r--r-- | src/struct/attributes.erl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/struct/attributes.erl b/src/struct/attributes.erl index 022cad2..bb68032 100644 --- a/src/struct/attributes.erl +++ b/src/struct/attributes.erl @@ -39,6 +39,14 @@ ] ). +%%%% Accessors +-export +( + [ + random/0 + ] +). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -66,3 +74,14 @@ set_speed (Val, Att) -> Att#attributes{ speed = Val }. set_strength (Val, Att) -> Att#attributes{ strength = Val }. + +random () -> + #attributes + { + constitution = roll:percentage(), + dexterity = roll:percentage(), + intelligence = roll:percentage(), + mind = roll:percentage(), + speed = roll:percentage(), + strength = roll:percentage() + }. |