summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-09-12 10:42:33 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-09-12 10:42:33 +0200 |
commit | ce03028ccd575af1dc38b26d23569601d3b5d491 (patch) | |
tree | ddb943e743aa2389ea63079e36a0f063d60e0155 /src/shared/battle/Battle/Struct | |
parent | aadf3043f8647c033cc14ba8a4d5ad01dd9057fb (diff) |
Improves presentation of attributes in battle.
Diffstat (limited to 'src/shared/battle/Battle/Struct')
-rw-r--r-- | src/shared/battle/Battle/Struct/Omnimods.elm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/shared/battle/Battle/Struct/Omnimods.elm b/src/shared/battle/Battle/Struct/Omnimods.elm index 2b3c011..e9c3089 100644 --- a/src/shared/battle/Battle/Struct/Omnimods.elm +++ b/src/shared/battle/Battle/Struct/Omnimods.elm @@ -195,9 +195,14 @@ scale multiplier omnimods = (Dict.map (scale_dict_value multiplier) omnimods.defense) } -get_attribute_mod : String -> Type -> Int -get_attribute_mod att_name omnimods = - case (Dict.get att_name omnimods.attributes) of +get_attribute_mod : Battle.Struct.Attributes.Category -> Type -> Int +get_attribute_mod att omnimods = + case + (Dict.get + (Battle.Struct.Attributes.encode_category att) + omnimods.attributes + ) + of (Just e) -> e Nothing -> 0 |