summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/battle/Battle/Struct/Statistics.elm')
-rw-r--r--src/shared/battle/Battle/Struct/Statistics.elm12
1 files changed, 12 insertions, 0 deletions
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"