summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-09-12 12:49:38 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-09-12 12:49:38 +0200
commit18bd70b35597a0581cfe59f07927e03492a8be81 (patch)
tree6572816e7b998a61dad90a49e60c97203b92ba34 /src/shared/battle/Battle/Struct/Omnimods.elm
parentce03028ccd575af1dc38b26d23569601d3b5d491 (diff)
Adds min values when displaying omnimods in battle.
Diffstat (limited to 'src/shared/battle/Battle/Struct/Omnimods.elm')
-rw-r--r--src/shared/battle/Battle/Struct/Omnimods.elm20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/shared/battle/Battle/Struct/Omnimods.elm b/src/shared/battle/Battle/Struct/Omnimods.elm
index e9c3089..80d97a5 100644
--- a/src/shared/battle/Battle/Struct/Omnimods.elm
+++ b/src/shared/battle/Battle/Struct/Omnimods.elm
@@ -3,6 +3,7 @@ module Battle.Struct.Omnimods exposing
Type,
new,
merge,
+ merge_attributes,
none,
apply_to_attributes,
get_attack_damage,
@@ -120,6 +121,25 @@ merge omni_a omni_b =
defense = (merge_mods omni_a.defense omni_b.defense)
}
+merge_attributes : Battle.Struct.Attributes.Type -> Type -> Type
+merge_attributes attributes omnimods =
+ (merge
+ omnimods
+ (new
+ (List.map
+ (\att ->
+ (
+ (Battle.Struct.Attributes.encode_category att),
+ (Battle.Struct.Attributes.get_true att attributes)
+ )
+ )
+ (Battle.Struct.Attributes.get_categories)
+ )
+ []
+ []
+ )
+ )
+
apply_to_attributes : (
Type ->
Battle.Struct.Attributes.Type ->