summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-03-20 17:30:22 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-03-20 17:30:22 +0100 |
commit | 125eb8ba1e1707bd5468a96131a740abef3c6f43 (patch) | |
tree | 28216937c3d3403906f347108ab19d89f0afa828 /src/shared/battle/Battle/Struct | |
parent | b6fa3b730fe0c4249e714545ca88d2729c815a9b (diff) |
...
Diffstat (limited to 'src/shared/battle/Battle/Struct')
-rw-r--r-- | src/shared/battle/Battle/Struct/Attributes.elm | 2 | ||||
-rw-r--r-- | src/shared/battle/Battle/Struct/Statistics.elm | 6 |
2 files changed, 6 insertions, 2 deletions
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)) |