summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/battle')
-rw-r--r--src/shared/battle/Battle/Struct/Attributes.elm33
-rw-r--r--src/shared/battle/Battle/View/Attribute.elm51
2 files changed, 84 insertions, 0 deletions
diff --git a/src/shared/battle/Battle/Struct/Attributes.elm b/src/shared/battle/Battle/Struct/Attributes.elm
index 134209d..bb6c06e 100644
--- a/src/shared/battle/Battle/Struct/Attributes.elm
+++ b/src/shared/battle/Battle/Struct/Attributes.elm
@@ -11,6 +11,14 @@ module Battle.Struct.Attributes exposing
get_critical_hits,
get_damage_modifier,
get_damage_multiplier,
+ get_true_movement_points,
+ get_true_max_health,
+ get_true_dodges,
+ get_true_parries,
+ get_true_accuracy,
+ get_true_double_hits,
+ get_true_critical_hits,
+ get_true_damage_modifier,
decode_category,
encode_category,
mod,
@@ -109,6 +117,31 @@ get_damage_modifier t = (max 0 t.damage_modifier)
get_damage_multiplier : Type -> Float
get_damage_multiplier t = ((toFloat (max 0 t.damage_modifier)) / 100.0)
+get_true_movement_points : Type -> Int
+get_true_movement_points t = t.movement_points
+
+get_true_max_health : Type -> Int
+get_true_max_health t = t.max_health
+
+get_true_dodges : Type -> Int
+get_true_dodges t = t.dodges
+
+get_true_parries : Type -> Int
+get_true_parries t = t.parries
+
+get_true_accuracy : Type -> Int
+get_true_accuracy t = t.accuracy
+
+get_true_double_hits : Type -> Int
+get_true_double_hits t = t.double_hits
+
+get_true_critical_hits : Type -> Int
+get_true_critical_hits t = t.critical_hits
+
+get_true_damage_modifier : Type -> Int
+get_true_damage_modifier t = t.damage_modifier
+
+
mod : Category -> Int -> Type -> Type
mod cat v t =
case cat of
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))