summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-08-10 18:23:48 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-08-10 18:23:48 +0200 |
commit | 120b0b7f6df0c8978aac9a423cbf8364feac4779 (patch) | |
tree | 9fd0b29790de37c8f3f6c786391a543d79b74164 /src/shared/battle/Battle/View/Statistic.elm | |
parent | 69611b72a28333c129ad25c3daae92b4215ac5d4 (diff) |
Statistics -> Attributes.
Diffstat (limited to 'src/shared/battle/Battle/View/Statistic.elm')
-rw-r--r-- | src/shared/battle/Battle/View/Statistic.elm | 259 |
1 files changed, 0 insertions, 259 deletions
diff --git a/src/shared/battle/Battle/View/Statistic.elm b/src/shared/battle/Battle/View/Statistic.elm deleted file mode 100644 index 0ced0dc..0000000 --- a/src/shared/battle/Battle/View/Statistic.elm +++ /dev/null @@ -1,259 +0,0 @@ -module Battle.View.Statistic exposing - ( - get_html, - get_all_html, - get_all_but_gauges_html, - get_signed_html, - get_all_signed_html, - get_all_but_gauges_signed_html - ) - --- Elm ------------------------------------------------------------------------- -import Html -import Html.Attributes -import Html.Events - --- Battle ---------------------------------------------------------------------- -import Battle.Struct.Statistics - --- Local Module ---------------------------------------------------------------- -import Struct.Event -import Struct.HelpRequest - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - Battle.Struct.Statistics.Category -> - Int -> - (Html.Html Struct.Event.Type) - ) -get_html statistic value = - (Html.div - [ - (Html.Events.onClick - (Struct.Event.RequestedHelp - (Struct.HelpRequest.Statistic statistic) - ) - ) - ] - [ - (Html.div - [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Statistics.encode_category statistic) - ) - ) - ] - [ - ] - ), - (Html.div - [ - (Html.Attributes.class "omnimod-value") - ] - [ - (Html.text - ( - if (Battle.Struct.Statistics.is_percent statistic) - then ((String.fromInt value) ++ "%") - else (String.fromInt value) - ) - ) - ] - ) - ] - ) - -get_signed_html : ( - Battle.Struct.Statistics.Category -> - Int -> - (Html.Html Struct.Event.Type) - ) -get_signed_html statistic value = - (Html.div - [ - ( - if (value < 0) - then (Html.Attributes.class "omnimod-negative") - else (Html.Attributes.class "omnimod-positive") - ), - (Html.Events.onClick - (Struct.Event.RequestedHelp - (Struct.HelpRequest.Statistic statistic) - ) - ) - ] - [ - (Html.div - [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Statistics.encode_category statistic) - ) - ) - ] - [ - ] - ), - (Html.div - [ - (Html.Attributes.class "omnimod-value") - ] - [ - (Html.text - ( - ( - if (value > 0) - then ("+" ++ (String.fromInt value)) - else (String.fromInt value) - ) - ++ - ( - if (Battle.Struct.Statistics.is_percent statistic) - then "%" - else "" - ) - ) - ) - ] - ) - ] - ) - -get_all_html : ( - Battle.Struct.Statistics.Type -> - (List (Html.Html Struct.Event.Type)) - ) -get_all_html stats = - [ - (get_html - Battle.Struct.Statistics.Dodges - (Battle.Struct.Statistics.get_dodges stats) - ), - (get_html - Battle.Struct.Statistics.Parries - (Battle.Struct.Statistics.get_parries stats) - ), - (get_html - Battle.Struct.Statistics.Accuracy - (Battle.Struct.Statistics.get_accuracy stats) - ), - (get_html - Battle.Struct.Statistics.DoubleHits - (Battle.Struct.Statistics.get_double_hits stats) - ), - (get_html - Battle.Struct.Statistics.CriticalHits - (Battle.Struct.Statistics.get_critical_hits stats) - ), - (get_html - Battle.Struct.Statistics.MaxHealth - (Battle.Struct.Statistics.get_max_health stats) - ), - (get_html - Battle.Struct.Statistics.MovementPoints - (Battle.Struct.Statistics.get_movement_points stats) - ) - ] - -get_all_signed_html : ( - Battle.Struct.Statistics.Type -> - (List (Html.Html Struct.Event.Type)) - ) -get_all_signed_html stats = - [ - (get_signed_html - Battle.Struct.Statistics.Dodges - (Battle.Struct.Statistics.get_dodges stats) - ), - (get_signed_html - Battle.Struct.Statistics.Parries - (Battle.Struct.Statistics.get_parries stats) - ), - (get_signed_html - Battle.Struct.Statistics.Accuracy - (Battle.Struct.Statistics.get_accuracy stats) - ), - (get_signed_html - Battle.Struct.Statistics.DoubleHits - (Battle.Struct.Statistics.get_double_hits stats) - ), - (get_signed_html - Battle.Struct.Statistics.CriticalHits - (Battle.Struct.Statistics.get_critical_hits stats) - ), - (get_signed_html - Battle.Struct.Statistics.MaxHealth - (Battle.Struct.Statistics.get_max_health stats) - ), - (get_signed_html - Battle.Struct.Statistics.MovementPoints - (Battle.Struct.Statistics.get_movement_points stats) - ) - ] - -get_all_but_gauges_html : ( - Battle.Struct.Statistics.Type -> - (List (Html.Html Struct.Event.Type)) - ) -get_all_but_gauges_html stats = - [ - (get_html - Battle.Struct.Statistics.Dodges - (Battle.Struct.Statistics.get_dodges stats) - ), - (get_html - Battle.Struct.Statistics.Parries - (Battle.Struct.Statistics.get_parries stats) - ), - (get_html - Battle.Struct.Statistics.Accuracy - (Battle.Struct.Statistics.get_accuracy stats) - ), - (get_html - Battle.Struct.Statistics.DoubleHits - (Battle.Struct.Statistics.get_double_hits stats) - ), - (get_html - Battle.Struct.Statistics.CriticalHits - (Battle.Struct.Statistics.get_critical_hits stats) - ) - ] - -get_all_but_gauges_signed_html : ( - Battle.Struct.Statistics.Type -> - (List (Html.Html Struct.Event.Type)) - ) -get_all_but_gauges_signed_html stats = - [ - (get_signed_html - Battle.Struct.Statistics.Dodges - (Battle.Struct.Statistics.get_dodges stats) - ), - (get_signed_html - Battle.Struct.Statistics.Parries - (Battle.Struct.Statistics.get_parries stats) - ), - (get_signed_html - Battle.Struct.Statistics.Accuracy - (Battle.Struct.Statistics.get_accuracy stats) - ), - (get_signed_html - Battle.Struct.Statistics.DoubleHits - (Battle.Struct.Statistics.get_double_hits stats) - ), - (get_signed_html - Battle.Struct.Statistics.CriticalHits - (Battle.Struct.Statistics.get_critical_hits stats) - ) - ] |