From b6fa3b730fe0c4249e714545ca88d2729c815a9b Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sun, 17 Mar 2019 00:55:26 +0100 Subject: ... --- src/shared/battle/Battle/Struct/Attributes.elm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/shared/battle/Battle/Struct/Attributes.elm') 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" -- cgit v1.2.3-70-g09d2