| 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 | |
| parent | 69611b72a28333c129ad25c3daae92b4215ac5d4 (diff) | |
Statistics -> Attributes.
Diffstat (limited to 'src/shared/battle/Battle/View')
| -rw-r--r-- | src/shared/battle/Battle/View/Attribute.elm (renamed from src/shared/battle/Battle/View/Statistic.elm) | 136 | ||||
| -rw-r--r-- | src/shared/battle/Battle/View/Help/Attribute.elm (renamed from src/shared/battle/Battle/View/Help/Statistic.elm) | 12 | ||||
| -rw-r--r-- | src/shared/battle/Battle/View/Omnimods.elm | 20 | 
3 files changed, 84 insertions, 84 deletions
diff --git a/src/shared/battle/Battle/View/Statistic.elm b/src/shared/battle/Battle/View/Attribute.elm index 0ced0dc..ae2edf3 100644 --- a/src/shared/battle/Battle/View/Statistic.elm +++ b/src/shared/battle/Battle/View/Attribute.elm @@ -1,4 +1,4 @@ -module Battle.View.Statistic exposing +module Battle.View.Attribute exposing     (        get_html,        get_all_html, @@ -14,7 +14,7 @@ import Html.Attributes  import Html.Events  -- Battle ---------------------------------------------------------------------- -import Battle.Struct.Statistics +import Battle.Struct.Attributes  -- Local Module ----------------------------------------------------------------  import Struct.Event @@ -28,16 +28,16 @@ import Struct.HelpRequest  -- EXPORTED --------------------------------------------------------------------  --------------------------------------------------------------------------------  get_html : ( -      Battle.Struct.Statistics.Category -> +      Battle.Struct.Attributes.Category ->        Int ->        (Html.Html Struct.Event.Type)     ) -get_html statistic value = +get_html attribute value =     (Html.div        [           (Html.Events.onClick              (Struct.Event.RequestedHelp -               (Struct.HelpRequest.Statistic statistic) +               (Struct.HelpRequest.Attribute attribute)              )           )        ] @@ -48,7 +48,7 @@ get_html statistic value =                 (Html.Attributes.class                    (                       "omnimod-icon-" -                     ++ (Battle.Struct.Statistics.encode_category statistic) +                     ++ (Battle.Struct.Attributes.encode_category attribute)                    )                 )              ] @@ -62,7 +62,7 @@ get_html statistic value =              [                 (Html.text                    ( -                     if (Battle.Struct.Statistics.is_percent statistic) +                     if (Battle.Struct.Attributes.is_percent attribute)                       then ((String.fromInt value) ++ "%")                       else (String.fromInt value)                    ) @@ -73,11 +73,11 @@ get_html statistic value =     )  get_signed_html : ( -      Battle.Struct.Statistics.Category -> +      Battle.Struct.Attributes.Category ->        Int ->        (Html.Html Struct.Event.Type)     ) -get_signed_html statistic value = +get_signed_html attribute value =     (Html.div        [           ( @@ -87,7 +87,7 @@ get_signed_html statistic value =           ),           (Html.Events.onClick              (Struct.Event.RequestedHelp -               (Struct.HelpRequest.Statistic statistic) +               (Struct.HelpRequest.Attribute attribute)              )           )        ] @@ -98,7 +98,7 @@ get_signed_html statistic value =                 (Html.Attributes.class                    (                       "omnimod-icon-" -                     ++ (Battle.Struct.Statistics.encode_category statistic) +                     ++ (Battle.Struct.Attributes.encode_category attribute)                    )                 )              ] @@ -119,7 +119,7 @@ get_signed_html statistic value =                       )                       ++                       ( -                        if (Battle.Struct.Statistics.is_percent statistic) +                        if (Battle.Struct.Attributes.is_percent attribute)                          then "%"                          else ""                       ) @@ -131,129 +131,129 @@ get_signed_html statistic value =     )  get_all_html : ( -      Battle.Struct.Statistics.Type -> +      Battle.Struct.Attributes.Type ->        (List (Html.Html Struct.Event.Type))     ) -get_all_html stats = +get_all_html atts =     [        (get_html -         Battle.Struct.Statistics.Dodges -         (Battle.Struct.Statistics.get_dodges stats) +         Battle.Struct.Attributes.Dodges +         (Battle.Struct.Attributes.get_dodges atts)        ),        (get_html -         Battle.Struct.Statistics.Parries -         (Battle.Struct.Statistics.get_parries stats) +         Battle.Struct.Attributes.Parries +         (Battle.Struct.Attributes.get_parries atts)        ),        (get_html -         Battle.Struct.Statistics.Accuracy -         (Battle.Struct.Statistics.get_accuracy stats) +         Battle.Struct.Attributes.Accuracy +         (Battle.Struct.Attributes.get_accuracy atts)        ),        (get_html -         Battle.Struct.Statistics.DoubleHits -         (Battle.Struct.Statistics.get_double_hits stats) +         Battle.Struct.Attributes.DoubleHits +         (Battle.Struct.Attributes.get_double_hits atts)        ),        (get_html -         Battle.Struct.Statistics.CriticalHits -         (Battle.Struct.Statistics.get_critical_hits stats) +         Battle.Struct.Attributes.CriticalHits +         (Battle.Struct.Attributes.get_critical_hits atts)        ),        (get_html -         Battle.Struct.Statistics.MaxHealth -         (Battle.Struct.Statistics.get_max_health stats) +         Battle.Struct.Attributes.MaxHealth +         (Battle.Struct.Attributes.get_max_health atts)        ),        (get_html -         Battle.Struct.Statistics.MovementPoints -         (Battle.Struct.Statistics.get_movement_points stats) +         Battle.Struct.Attributes.MovementPoints +         (Battle.Struct.Attributes.get_movement_points atts)        )     ]  get_all_signed_html : ( -      Battle.Struct.Statistics.Type -> +      Battle.Struct.Attributes.Type ->        (List (Html.Html Struct.Event.Type))     ) -get_all_signed_html stats = +get_all_signed_html atts =     [        (get_signed_html -         Battle.Struct.Statistics.Dodges -         (Battle.Struct.Statistics.get_dodges stats) +         Battle.Struct.Attributes.Dodges +         (Battle.Struct.Attributes.get_dodges atts)        ),        (get_signed_html -         Battle.Struct.Statistics.Parries -         (Battle.Struct.Statistics.get_parries stats) +         Battle.Struct.Attributes.Parries +         (Battle.Struct.Attributes.get_parries atts)        ),        (get_signed_html -         Battle.Struct.Statistics.Accuracy -         (Battle.Struct.Statistics.get_accuracy stats) +         Battle.Struct.Attributes.Accuracy +         (Battle.Struct.Attributes.get_accuracy atts)        ),        (get_signed_html -         Battle.Struct.Statistics.DoubleHits -         (Battle.Struct.Statistics.get_double_hits stats) +         Battle.Struct.Attributes.DoubleHits +         (Battle.Struct.Attributes.get_double_hits atts)        ),        (get_signed_html -         Battle.Struct.Statistics.CriticalHits -         (Battle.Struct.Statistics.get_critical_hits stats) +         Battle.Struct.Attributes.CriticalHits +         (Battle.Struct.Attributes.get_critical_hits atts)        ),        (get_signed_html -         Battle.Struct.Statistics.MaxHealth -         (Battle.Struct.Statistics.get_max_health stats) +         Battle.Struct.Attributes.MaxHealth +         (Battle.Struct.Attributes.get_max_health atts)        ),        (get_signed_html -         Battle.Struct.Statistics.MovementPoints -         (Battle.Struct.Statistics.get_movement_points stats) +         Battle.Struct.Attributes.MovementPoints +         (Battle.Struct.Attributes.get_movement_points atts)        )     ]  get_all_but_gauges_html : ( -      Battle.Struct.Statistics.Type -> +      Battle.Struct.Attributes.Type ->        (List (Html.Html Struct.Event.Type))     ) -get_all_but_gauges_html stats = +get_all_but_gauges_html atts =     [        (get_html -         Battle.Struct.Statistics.Dodges -         (Battle.Struct.Statistics.get_dodges stats) +         Battle.Struct.Attributes.Dodges +         (Battle.Struct.Attributes.get_dodges atts)        ),        (get_html -         Battle.Struct.Statistics.Parries -         (Battle.Struct.Statistics.get_parries stats) +         Battle.Struct.Attributes.Parries +         (Battle.Struct.Attributes.get_parries atts)        ),        (get_html -         Battle.Struct.Statistics.Accuracy -         (Battle.Struct.Statistics.get_accuracy stats) +         Battle.Struct.Attributes.Accuracy +         (Battle.Struct.Attributes.get_accuracy atts)        ),        (get_html -         Battle.Struct.Statistics.DoubleHits -         (Battle.Struct.Statistics.get_double_hits stats) +         Battle.Struct.Attributes.DoubleHits +         (Battle.Struct.Attributes.get_double_hits atts)        ),        (get_html -         Battle.Struct.Statistics.CriticalHits -         (Battle.Struct.Statistics.get_critical_hits stats) +         Battle.Struct.Attributes.CriticalHits +         (Battle.Struct.Attributes.get_critical_hits atts)        )     ]  get_all_but_gauges_signed_html : ( -      Battle.Struct.Statistics.Type -> +      Battle.Struct.Attributes.Type ->        (List (Html.Html Struct.Event.Type))     ) -get_all_but_gauges_signed_html stats = +get_all_but_gauges_signed_html atts =     [        (get_signed_html -         Battle.Struct.Statistics.Dodges -         (Battle.Struct.Statistics.get_dodges stats) +         Battle.Struct.Attributes.Dodges +         (Battle.Struct.Attributes.get_dodges atts)        ),        (get_signed_html -         Battle.Struct.Statistics.Parries -         (Battle.Struct.Statistics.get_parries stats) +         Battle.Struct.Attributes.Parries +         (Battle.Struct.Attributes.get_parries atts)        ),        (get_signed_html -         Battle.Struct.Statistics.Accuracy -         (Battle.Struct.Statistics.get_accuracy stats) +         Battle.Struct.Attributes.Accuracy +         (Battle.Struct.Attributes.get_accuracy atts)        ),        (get_signed_html -         Battle.Struct.Statistics.DoubleHits -         (Battle.Struct.Statistics.get_double_hits stats) +         Battle.Struct.Attributes.DoubleHits +         (Battle.Struct.Attributes.get_double_hits atts)        ),        (get_signed_html -         Battle.Struct.Statistics.CriticalHits -         (Battle.Struct.Statistics.get_critical_hits stats) +         Battle.Struct.Attributes.CriticalHits +         (Battle.Struct.Attributes.get_critical_hits atts)        )     ] diff --git a/src/shared/battle/Battle/View/Help/Statistic.elm b/src/shared/battle/Battle/View/Help/Attribute.elm index 0e1f056..f7bd9e1 100644 --- a/src/shared/battle/Battle/View/Help/Statistic.elm +++ b/src/shared/battle/Battle/View/Help/Attribute.elm @@ -1,11 +1,11 @@ -module Battle.View.Help.Statistic exposing (get_html_contents) +module Battle.View.Help.Attribute exposing (get_html_contents)  -- Elm -------------------------------------------------------------------------  import Html  import Html.Attributes  -- Battle ---------------------------------------------------------------------- -import Battle.Struct.Statistics +import Battle.Struct.Attributes  import Battle.Lang.English  -- Local Module ---------------------------------------------------------------- @@ -15,7 +15,7 @@ import Struct.Event  -- LOCAL -----------------------------------------------------------------------  --------------------------------------------------------------------------------  get_header_html : ( -      Battle.Struct.Statistics.Category -> +      Battle.Struct.Attributes.Category ->        String ->        (Html.Html Struct.Event.Type)     ) @@ -34,7 +34,7 @@ get_header_html cat name =                 (Html.Attributes.class                    (                       "omnimod-icon-" -                     ++ (Battle.Struct.Statistics.encode_category cat) +                     ++ (Battle.Struct.Attributes.encode_category cat)                    )                 )              ] @@ -49,12 +49,12 @@ get_header_html cat name =  -- EXPORTED --------------------------------------------------------------------  --------------------------------------------------------------------------------  get_html_contents : ( -      Battle.Struct.Statistics.Category -> +      Battle.Struct.Attributes.Category ->        (List (Html.Html Struct.Event.Type))     )  get_html_contents cat =     let -      (name, tooltip) = (Battle.Lang.English.get_statistic_category_help cat) +      (name, tooltip) = (Battle.Lang.English.get_attribute_category_help cat)     in     [        (get_header_html cat name), diff --git a/src/shared/battle/Battle/View/Omnimods.elm b/src/shared/battle/Battle/View/Omnimods.elm index a41afba..8d8c4ce 100644 --- a/src/shared/battle/Battle/View/Omnimods.elm +++ b/src/shared/battle/Battle/View/Omnimods.elm @@ -14,10 +14,10 @@ import Html.Events  -- Battle ----------------------------------------------------------------------  import Battle.Struct.DamageType  import Battle.Struct.Omnimods -import Battle.Struct.Statistics +import Battle.Struct.Attributes  import Battle.View.DamageType -import Battle.View.Statistic +import Battle.View.Attribute  -- Local Module ----------------------------------------------------------------  import Struct.Event @@ -70,16 +70,16 @@ get_html_with_modifier attack_multiplier omnimods =           ),           (Html.div              [ -               (Html.Attributes.class "omnimod-statistics-mods") +               (Html.Attributes.class "omnimod-attribute-mods")              ]              (List.map                 (\(k, v) -> -                  (Battle.View.Statistic.get_signed_html -                     (Battle.Struct.Statistics.decode_category k) +                  (Battle.View.Attribute.get_signed_html +                     (Battle.Struct.Attributes.decode_category k)                       v                    )                 ) -               (Battle.Struct.Omnimods.get_statistics_mods omnimods) +               (Battle.Struct.Omnimods.get_attribute_mods omnimods)              )           )        ] @@ -122,16 +122,16 @@ get_html omnimods =           ),           (Html.div              [ -               (Html.Attributes.class "omnimod-statistics-mods") +               (Html.Attributes.class "omnimod-attributes-mods")              ]              (List.map                 (\(k, v) -> -                  (Battle.View.Statistic.get_signed_html -                     (Battle.Struct.Statistics.decode_category k) +                  (Battle.View.Attribute.get_signed_html +                     (Battle.Struct.Attributes.decode_category k)                       v                    )                 ) -               (Battle.Struct.Omnimods.get_statistics_mods omnimods) +               (Battle.Struct.Omnimods.get_attribute_mods omnimods)              )           )        ]  | 


