From 125eb8ba1e1707bd5468a96131a740abef3c6f43 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Wed, 20 Mar 2019 17:30:22 +0100 Subject: ... --- src/shared/battle/Battle/Struct/Attributes.elm | 2 +- src/shared/battle/Battle/Struct/Statistics.elm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/shared/battle/Battle/Struct') diff --git a/src/shared/battle/Battle/Struct/Attributes.elm b/src/shared/battle/Battle/Struct/Attributes.elm index 6f6fe10..db16b5c 100644 --- a/src/shared/battle/Battle/Struct/Attributes.elm +++ b/src/shared/battle/Battle/Struct/Attributes.elm @@ -169,7 +169,7 @@ decode_category str = "spe" -> Speed _ -> Strength -encode_category : Category -> string +encode_category : Category -> String encode_category cat = case cat of Constitution -> "con" diff --git a/src/shared/battle/Battle/Struct/Statistics.elm b/src/shared/battle/Battle/Struct/Statistics.elm index 43bd27d..97547fe 100644 --- a/src/shared/battle/Battle/Struct/Statistics.elm +++ b/src/shared/battle/Battle/Struct/Statistics.elm @@ -13,7 +13,8 @@ module Battle.Struct.Statistics exposing decode_category, encode_category, mod, - new_raw + new_raw, + is_percent ) -- Elm ------------------------------------------------------------------------- @@ -220,3 +221,6 @@ encode_category cat = Accuracy -> "accu" DoubleHits -> "dhit" CriticalHits -> "crit" + +is_percent : Category -> Bool +is_percent cat = ((cat /= MaxHealth) && (cat /= MovementPoints)) -- cgit v1.2.3-70-g09d2