summaryrefslogtreecommitdiff |
diff options
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)) |