summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-03-17 00:55:26 +0100 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-03-17 00:55:26 +0100 |
commit | b6fa3b730fe0c4249e714545ca88d2729c815a9b (patch) | |
tree | b14c8e4952a22f8d2943283ca9870a05ccf086e0 /src/shared/battle/Battle/Struct | |
parent | a3c380b2813c9928a2ee600c276295c7803e9e66 (diff) |
...
Diffstat (limited to 'src/shared/battle/Battle/Struct')
-rw-r--r-- | src/shared/battle/Battle/Struct/Attributes.elm | 11 | ||||
-rw-r--r-- | src/shared/battle/Battle/Struct/Statistics.elm | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/shared/battle/Battle/Struct/Attributes.elm b/src/shared/battle/Battle/Struct/Attributes.elm index ee12dbd..6f6fe10 100644 --- a/src/shared/battle/Battle/Struct/Attributes.elm +++ b/src/shared/battle/Battle/Struct/Attributes.elm @@ -18,6 +18,7 @@ module Battle.Struct.Attributes exposing get, new, decode_category, + encode_category, default ) @@ -167,3 +168,13 @@ decode_category str = "min" -> Mind "spe" -> Speed _ -> Strength + +encode_category : Category -> string +encode_category cat = + case cat of + Constitution -> "con" + Dexterity -> "dex" + Intelligence -> "int" + Mind -> "min" + Speed -> "spe" + Strength -> "str" diff --git a/src/shared/battle/Battle/Struct/Statistics.elm b/src/shared/battle/Battle/Struct/Statistics.elm index e21b4f6..43bd27d 100644 --- a/src/shared/battle/Battle/Struct/Statistics.elm +++ b/src/shared/battle/Battle/Struct/Statistics.elm @@ -11,6 +11,7 @@ module Battle.Struct.Statistics exposing get_critical_hits, get_damage_modifier, decode_category, + encode_category, mod, new_raw ) @@ -208,3 +209,14 @@ decode_category str = "accu" -> Accuracy "dhit" -> DoubleHits _ -> CriticalHits + +encode_category : Category -> String +encode_category cat = + case cat of + MaxHealth -> "mheal" + MovementPoints -> "mpts" + Dodges -> "dodg" + Parries -> "pary" + Accuracy -> "accu" + DoubleHits -> "dhit" + CriticalHits -> "crit" |