summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-05-03 14:17:19 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-05-03 14:17:19 +0200
commit112dbe2aa3e4771d71754a357627ba4449e8c974 (patch)
tree273624e799464df39e4d276da09fa9ee3100eab8 /src
parentf0b1a04a8a4903596ed3347aaf0a97bc1ce9ba44 (diff)
Base dmg icon, dmg types help.
Diffstat (limited to 'src')
-rw-r--r--src/asset/www/svg/damage_type/base.svg67
-rw-r--r--src/battle/src/View/MessageBoard/Help.elm6
-rw-r--r--src/css/src/shared/omnimod-icons.scss14
-rw-r--r--src/map-editor/src/Struct/HelpRequest.elm8
-rw-r--r--src/map-editor/src/View/MessageBoard/Help.elm14
-rw-r--r--src/roster-editor/src/View/MessageBoard/Help.elm6
-rw-r--r--src/shared/battle/Battle/Lang/English.elm77
-rw-r--r--src/shared/battle/Battle/View/Help/DamageType.elm62
8 files changed, 252 insertions, 2 deletions
diff --git a/src/asset/www/svg/damage_type/base.svg b/src/asset/www/svg/damage_type/base.svg
new file mode 100644
index 0000000..953182c
--- /dev/null
+++ b/src/asset/www/svg/damage_type/base.svg
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16mm"
+ height="16mm"
+ viewBox="0 0 16 16"
+ version="1.1"
+ id="svg8"
+ inkscape:version="0.92.2 2405546, 2018-03-11"
+ sodipodi:docname="base.svg">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.82843"
+ inkscape:cx="70.451"
+ inkscape:cy="40.2567"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:snap-global="false"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-nodes="false"
+ inkscape:window-width="1678"
+ inkscape:window-height="1029"
+ inkscape:window-x="1"
+ inkscape:window-y="516"
+ inkscape:window-maximized="0"
+ inkscape:pagecheckerboard="true" />
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-281)">
+ <circle
+ style="fill:#e9ddaf;stroke:#483e37;stroke-width:0.5;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke markers fill"
+ id="path1302"
+ cx="8"
+ cy="289"
+ r="1.04525" />
+ </g>
+</svg>
diff --git a/src/battle/src/View/MessageBoard/Help.elm b/src/battle/src/View/MessageBoard/Help.elm
index 9511f96..7b1984e 100644
--- a/src/battle/src/View/MessageBoard/Help.elm
+++ b/src/battle/src/View/MessageBoard/Help.elm
@@ -6,6 +6,7 @@ import Html.Attributes
-- Battle ----------------------------------------------------------------------
import Battle.View.Help.Attribute
+import Battle.View.Help.DamageType
import Battle.View.Help.Statistic
-- Local Module ----------------------------------------------------------------
@@ -44,6 +45,9 @@ get_html model =
(Struct.HelpRequest.Statistic stat_cat) ->
(Battle.View.Help.Statistic.get_html_contents stat_cat)
- _ -> [(Html.text "Help is not available for this, yet.")]
+ (Struct.HelpRequest.DamageType dmg_cat) ->
+ (Battle.View.Help.DamageType.get_html_contents dmg_cat)
+
+-- _ -> [(Html.text "Help is not available for this, yet.")]
)
)
diff --git a/src/css/src/shared/omnimod-icons.scss b/src/css/src/shared/omnimod-icons.scss
index fa86703..a57a34a 100644
--- a/src/css/src/shared/omnimod-icons.scss
+++ b/src/css/src/shared/omnimod-icons.scss
@@ -23,6 +23,11 @@
background-image: url(/asset/svg/damage_type/slash.svg);
}
+.omnimod-icon-bse
+{
+ background-image: url(/asset/svg/damage_type/base.svg);
+}
+
.omnimod-icon-blu
{
background-image: url(/asset/svg/damage_type/impact.svg);
@@ -60,6 +65,15 @@
background-size: 1em, 1.5em;
}
+.omnimod-defense-mods .omnimod-icon-bse
+{
+ background-image:
+ url(/asset/svg/damage_type/base.svg),
+ url(/asset/svg/damage_type/shield.svg)
+ ;
+ background-size: 1em, 1.5em;
+}
+
.omnimod-icon-dodg
{
background-image: url(/asset/svg/damage_type/dodge.svg);
diff --git a/src/map-editor/src/Struct/HelpRequest.elm b/src/map-editor/src/Struct/HelpRequest.elm
index 50d2ee6..6fa0af2 100644
--- a/src/map-editor/src/Struct/HelpRequest.elm
+++ b/src/map-editor/src/Struct/HelpRequest.elm
@@ -1,7 +1,15 @@
module Struct.HelpRequest exposing (Type(..))
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Attributes
+import Battle.Struct.Statistics
+import Battle.Struct.DamageType
+
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
--------------------------------------------------------------------------------
type Type =
None
+ | Attribute Battle.Struct.Attributes.Category
+ | Statistic Battle.Struct.Statistics.Category
+ | DamageType Battle.Struct.DamageType.Type
diff --git a/src/map-editor/src/View/MessageBoard/Help.elm b/src/map-editor/src/View/MessageBoard/Help.elm
index eea0c8a..c663e08 100644
--- a/src/map-editor/src/View/MessageBoard/Help.elm
+++ b/src/map-editor/src/View/MessageBoard/Help.elm
@@ -4,6 +4,11 @@ module View.MessageBoard.Help exposing (get_html)
import Html
import Html.Attributes
+-- Battle ----------------------------------------------------------------------
+import Battle.View.Help.Attribute
+import Battle.View.Help.DamageType
+import Battle.View.Help.Statistic
+
-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.HelpRequest
@@ -27,6 +32,15 @@ get_html model =
]
(
case model.help_request of
+ (Struct.HelpRequest.Attribute att_cat) ->
+ (Battle.View.Help.Attribute.get_html_contents att_cat)
+
+ (Struct.HelpRequest.Statistic stat_cat) ->
+ (Battle.View.Help.Statistic.get_html_contents stat_cat)
+
+ (Struct.HelpRequest.DamageType dmg_cat) ->
+ (Battle.View.Help.DamageType.get_html_contents dmg_cat)
+
Struct.HelpRequest.None ->
(View.MessageBoard.Help.Guide.get_html_contents model)
)
diff --git a/src/roster-editor/src/View/MessageBoard/Help.elm b/src/roster-editor/src/View/MessageBoard/Help.elm
index dde800c..4c64601 100644
--- a/src/roster-editor/src/View/MessageBoard/Help.elm
+++ b/src/roster-editor/src/View/MessageBoard/Help.elm
@@ -6,6 +6,7 @@ import Html.Attributes
-- Battle ----------------------------------------------------------------------
import Battle.View.Help.Attribute
+import Battle.View.Help.DamageType
import Battle.View.Help.Statistic
-- Local Module ----------------------------------------------------------------
@@ -40,6 +41,9 @@ get_html model =
(Struct.HelpRequest.Statistic stat_cat) ->
(Battle.View.Help.Statistic.get_html_contents stat_cat)
- _ -> (View.MessageBoard.Help.Guide.get_html_contents model)
+ (Struct.HelpRequest.DamageType dmg_cat) ->
+ (Battle.View.Help.DamageType.get_html_contents dmg_cat)
+
+ -- _ -> (View.MessageBoard.Help.Guide.get_html_contents model)
)
)
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
+ ]