summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-09-06 22:54:35 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-09-06 22:54:35 +0200
commit1eaca6c3fcd4b36b38a51d639341179ce3858eba (patch)
tree1d6a1c0132dd5feb426f3c5874bf51669dfb2c0a /src/shared/battle/Battle/View/Attribute.elm
parent8ef8145f77d6a4d82378b6abd03f62b74dc45118 (diff)
Highlights negative values.
Diffstat (limited to 'src/shared/battle/Battle/View/Attribute.elm')
-rw-r--r--src/shared/battle/Battle/View/Attribute.elm51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm
index 49fe7a8..9b2a8c7 100644
--- a/src/shared/battle/Battle/View/Attribute.elm
+++ b/src/shared/battle/Battle/View/Attribute.elm
@@ -2,6 +2,7 @@ module Battle.View.Attribute exposing
(
get_html,
get_all_html,
+ get_true_all_html,
get_all_but_gauges_html,
get_signed_html,
get_all_signed_html,
@@ -39,6 +40,16 @@ get_html attribute value =
(Struct.Event.RequestedHelp
(Struct.HelpRequest.Attribute attribute)
)
+ ),
+ (Html.Attributes.class
+ (
+ if (value < 0)
+ then "omnimod-negative-value"
+ else
+ if (value > 0)
+ then "omnimod-positive-value"
+ else "omnimod-nil-value"
+ )
)
]
[
@@ -170,6 +181,46 @@ get_all_html atts =
)
]
+get_true_all_html : (
+ Battle.Struct.Attributes.Type ->
+ (List (Html.Html Struct.Event.Type))
+ )
+get_true_all_html atts =
+ [
+ (get_html
+ Battle.Struct.Attributes.Dodges
+ (Battle.Struct.Attributes.get_true_dodges atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.Parries
+ (Battle.Struct.Attributes.get_true_parries atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.Accuracy
+ (Battle.Struct.Attributes.get_true_accuracy atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.DoubleHits
+ (Battle.Struct.Attributes.get_true_double_hits atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.CriticalHits
+ (Battle.Struct.Attributes.get_true_critical_hits atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.MaxHealth
+ (Battle.Struct.Attributes.get_true_max_health atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.MovementPoints
+ (Battle.Struct.Attributes.get_true_movement_points atts)
+ ),
+ (get_html
+ Battle.Struct.Attributes.DamageModifier
+ (Battle.Struct.Attributes.get_true_damage_modifier atts)
+ )
+ ]
+
get_all_signed_html : (
Battle.Struct.Attributes.Type ->
(List (Html.Html Struct.Event.Type))