| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2019-05-03 14:17:19 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2019-05-03 14:17:19 +0200 | 
| commit | 112dbe2aa3e4771d71754a357627ba4449e8c974 (patch) | |
| tree | 273624e799464df39e4d276da09fa9ee3100eab8 /src/shared | |
| parent | f0b1a04a8a4903596ed3347aaf0a97bc1ce9ba44 (diff) | |
Base dmg icon, dmg types help.
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/battle/Battle/Lang/English.elm | 77 | ||||
| -rw-r--r-- | src/shared/battle/Battle/View/Help/DamageType.elm | 62 | 
2 files changed, 139 insertions, 0 deletions
| diff --git a/src/shared/battle/Battle/Lang/English.elm b/src/shared/battle/Battle/Lang/English.elm index 15109a3..c7265cf 100644 --- a/src/shared/battle/Battle/Lang/English.elm +++ b/src/shared/battle/Battle/Lang/English.elm @@ -8,6 +8,7 @@ import Html.Events  -- Battle ----------------------------------------------------------------------  import Battle.Struct.Attributes  import Battle.Struct.Statistics +import Battle.Struct.DamageType  -- Local Module ----------------------------------------------------------------  import Struct.Event @@ -67,6 +68,19 @@ double_hits = "Double Hit Chance"  critical_hits : String  critical_hits = "Critical Hit Chance" +---- Damage Types -------------------------------------------------------------- +slash : String +slash = "Slashing Damage" + +blunt : String +blunt = "Bludgeoning Damage" + +pierce : String +pierce = "Piercing Damage" + +base : String +base = "Universal Damage" +  -- Help ------------------------------------------------------------------------  ---- Attributes ----------------------------------------------------------------  constitution_help : (Html.Html Struct.Event.Type) @@ -342,6 +356,49 @@ get_stats_reference_html cat =        ]     ) +---- Damage Types -------------------------------------------------------------- +slash_help : (Html.Html Struct.Event.Type) +slash_help = +   (Html.div +      [ +      ] +      [ +         (Html.text "Tis but a scratch. You had worse.") +      ] +   ) + +blunt_help : (Html.Html Struct.Event.Type) +blunt_help = +   (Html.div +      [ +      ] +      [ +         (Html.text "At least words will never harm you.") +      ] +   ) + +pierce_help : (Html.Html Struct.Event.Type) +pierce_help = +   (Html.div +      [ +      ] +      [ +         (Html.text "Improves your aerodynamics.") +      ] +   ) + +base_help : (Html.Html Struct.Event.Type) +base_help = +   (Html.div +      [ +      ] +      [ +         (Html.text +            "Defensive only. This is applied to every type of incoming damage." +         ) +      ] +   ) +  get_atts_reference_html : (        Battle.Struct.Attributes.Category ->        (Html.Html Struct.Event.Type) @@ -445,3 +502,23 @@ get_statistic_category_help cat =        Battle.Struct.Statistics.CriticalHits ->           ((critical_hits), (critical_hits_help)) + +get_damage_type_help : ( +      Battle.Struct.DamageType.Type -> +      (String, (Html.Html Struct.Event.Type)) +   ) +get_damage_type_help cat = +   case cat of +      Battle.Struct.DamageType.Base -> +         ((base), (base_help)) + +      Battle.Struct.DamageType.Slash -> +         ((slash), (slash_help)) + +      Battle.Struct.DamageType.Blunt -> +         ((blunt), (blunt_help)) + +      Battle.Struct.DamageType.Pierce -> +         ((pierce), (pierce_help)) + +      _ -> ("None Damage", (Html.div [] [(Html.text "Should not appear.")])) diff --git a/src/shared/battle/Battle/View/Help/DamageType.elm b/src/shared/battle/Battle/View/Help/DamageType.elm new file mode 100644 index 0000000..4be1867 --- /dev/null +++ b/src/shared/battle/Battle/View/Help/DamageType.elm @@ -0,0 +1,62 @@ +module Battle.View.Help.DamageType exposing (get_html_contents) + +-- Elm ------------------------------------------------------------------------- +import Html +import Html.Attributes + +-- Battle ---------------------------------------------------------------------- +import Battle.Struct.DamageType +import Battle.Lang.English + +-- Local Module ---------------------------------------------------------------- +import Struct.Event + +-------------------------------------------------------------------------------- +-- LOCAL ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_header_html : ( +      Battle.Struct.DamageType.Type -> +      String -> +      (Html.Html Struct.Event.Type) +   ) +get_header_html cat name = +   (Html.h1 +      [] +      [ +         (Html.div +            [(Html.Attributes.class "help-guide-icon")] +            [] +         ), +         (Html.text " "), +         (Html.div +            [ +               (Html.Attributes.class "omnimod-icon"), +               (Html.Attributes.class +                  ( +                     "omnimod-icon-" +                     ++ (Battle.Struct.DamageType.encode cat) +                  ) +               ) +            ] +            [ +            ] +         ), +         (Html.text name) +      ] +   ) + +-------------------------------------------------------------------------------- +-- EXPORTED -------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_html_contents : ( +      Battle.Struct.DamageType.Type -> +      (List (Html.Html Struct.Event.Type)) +   ) +get_html_contents cat = +   let +      (name, tooltip) = (Battle.Lang.English.get_damage_type_help cat) +   in +   [ +      (get_header_html cat name), +      tooltip +   ] | 


