summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-02-05 10:42:06 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-02-05 10:42:06 +0100
commit99ae9db56df692441b236991c0b726545ce145b2 (patch)
tree9eee3b425fc83d86b1a00024662ca4be752d9d06
parentf6b6e11220f0d2a226439754ffc0a9356b0f847b (diff)
Adds max {H,M}P icons, +- mod visual separation.
Using colors (hue) shift doesn't work well enough. I'm pretty sure it won't work for colorblind people, and it kind of messes with the current color theme. Having a visual separation for the positive and negative effects does help, though...
-rw-r--r--src/asset/www/svg/damage_type/mhealth.svg83
-rw-r--r--src/asset/www/svg/damage_type/mmovpts.svg86
-rw-r--r--src/css/src/shared/omnimod-icons.scss20
-rw-r--r--src/roster-editor/src/View/CharacterCard.elm28
-rw-r--r--src/roster-editor/src/View/Omnimods.elm27
5 files changed, 231 insertions, 13 deletions
diff --git a/src/asset/www/svg/damage_type/mhealth.svg b/src/asset/www/svg/damage_type/mhealth.svg
new file mode 100644
index 0000000..ea6c5ce
--- /dev/null
+++ b/src/asset/www/svg/damage_type/mhealth.svg
@@ -0,0 +1,83 @@
+<?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="mhealth.svg">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.25"
+ inkscape:cx="-65.1747"
+ inkscape:cy="-240.869"
+ 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)">
+ <rect
+ style="fill:#a02c2c;stroke:#483e37;stroke-width:1.460989;stroke-linejoin:round;paint-order:markers stroke fill"
+ id="rect1053"
+ width="12.8239"
+ height="14.3045"
+ x="1.58805"
+ y="281.848"
+ rx="2.92198"
+ ry="0.973994" />
+ <g
+ aria-label="HP"
+ style="font-size:7.577653px;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:#e9ddaf;stroke:#483e37;stroke-width:0.189441"
+ id="text1057">
+ <path
+ d="M 8.3404,291.625 H 6.16109 V 291.362 Q 6.24989,291.355 6.41639,291.34 6.58659,291.325 6.64949,291.296 6.76049,291.251 6.81229,291.162 6.86409,291.07 6.86409,290.926 V 289.057 H 4.39617 V 290.885 Q 4.39617,291.014 4.43687,291.103 4.48127,291.192 4.60707,291.259 4.66997,291.292 4.82908,291.325 4.99188,291.359 5.08438,291.362 V 291.625 H 2.90506 V 291.362 Q 2.99386,291.355 3.16036,291.34 3.33057,291.325 3.39347,291.296 3.50447,291.251 3.55627,291.162 3.60807,291.07 3.60807,290.926 V 287.137 Q 3.60807,287.018 3.55997,286.922 3.51187,286.822 3.39347,286.767 3.29357,286.719 3.14926,286.682 3.00866,286.645 2.90506,286.637 V 286.375 H 5.08438 V 286.637 Q 4.98078,286.641 4.82908,286.671 4.68107,286.7 4.60707,286.726 4.48127,286.771 4.43687,286.874 4.39617,286.978 4.39617,287.1 V 288.728 H 6.86409 V 287.137 Q 6.86409,287.018 6.81599,286.922 6.76789,286.822 6.64949,286.767 6.54959,286.719 6.40529,286.682 6.26469,286.645 6.16109,286.637 V 286.375 H 8.3404 V 286.637 Q 8.2368,286.641 8.0851,286.671 7.9371,286.7 7.8631,286.726 7.7373,286.771 7.6929,286.874 7.6522,286.978 7.6522,287.1 V 290.885 Q 7.6522,291.014 7.6929,291.103 7.7373,291.192 7.8631,291.259 7.926,291.292 8.0851,291.325 8.2479,291.359 8.3404,291.362 Z"
+ style="-inkscape-font-specification:Georgia"
+ id="path2053" />
+ <path
+ d="M 13.0949,287.67 Q 13.0949,288.08 12.9321,288.399 12.773,288.713 12.4881,288.92 12.2069,289.127 11.8702,289.224 11.5335,289.32 11.1561,289.32 H 10.5678 V 290.911 Q 10.5678,291.04 10.6085,291.14 10.6529,291.236 10.7861,291.288 10.8527,291.314 11.0192,291.336 11.1894,291.359 11.33,291.362 V 291.625 H 9.07671 V 291.362 Q 9.16551,291.355 9.33201,291.336 9.50221,291.318 9.56881,291.288 9.67981,291.24 9.72791,291.148 9.77971,291.055 9.77971,290.911 V 287.122 Q 9.77971,286.993 9.74271,286.889 9.70571,286.785 9.56881,286.734 9.42821,286.685 9.28761,286.667 9.15071,286.645 9.05081,286.637 V 286.375 H 11.4484 Q 12.181,286.375 12.6361,286.73 13.0949,287.081 13.0949,287.67 Z M 11.9701,288.565 Q 12.0959,288.387 12.1366,288.199 12.1773,288.006 12.1773,287.855 12.1773,287.644 12.1255,287.425 12.0774,287.207 11.9553,287.044 11.8258,286.87 11.6149,286.774 11.404,286.678 11.0895,286.678 H 10.5678 V 288.998 H 10.9452 Q 11.3448,288.998 11.5927,288.876 11.8443,288.75 11.9701,288.565 Z"
+ style="-inkscape-font-specification:Georgia"
+ id="path2055" />
+ </g>
+ </g>
+</svg>
diff --git a/src/asset/www/svg/damage_type/mmovpts.svg b/src/asset/www/svg/damage_type/mmovpts.svg
new file mode 100644
index 0000000..123def7
--- /dev/null
+++ b/src/asset/www/svg/damage_type/mmovpts.svg
@@ -0,0 +1,86 @@
+<?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="mmovpts.svg">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.65686"
+ inkscape:cx="24.9491"
+ inkscape:cy="41.2986"
+ 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></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-281)">
+ <rect
+ style="fill:#6f7c91;stroke:#483e37;stroke-width:1.460989;stroke-linejoin:round;paint-order:markers stroke fill"
+ id="rect1053"
+ width="12.8239"
+ height="14.3045"
+ x="1.58805"
+ y="281.848"
+ rx="2.92198"
+ ry="0.973994" />
+ <g
+ aria-label="MP"
+ style="font-size:7.577653px;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:#e9ddaf;stroke:#483e37;stroke-width:0.189441"
+ id="text1057"
+ transform="translate(0)">
+ <path
+ d="M 8.88801,291.625 H 6.56809 V 291.362 Q 6.69389,291.359 6.88999,291.336 7.08979,291.314 7.16379,291.273 7.2785,291.203 7.3303,291.114 7.3858,291.022 7.3858,290.885 V 287.067 H 7.3303 L 5.53948,291.54 H 5.35448 L 3.64877,286.974 H 3.60067 V 290.108 Q 3.60067,290.563 3.65617,290.8 3.71537,291.037 3.83377,291.14 3.91517,291.218 4.17047,291.288 4.42578,291.359 4.50348,291.362 V 291.625 H 2.38336 V 291.362 Q 2.54986,291.347 2.73116,291.307 2.91616,291.266 3.01607,291.185 3.14557,291.081 3.19367,290.866 3.24177,290.652 3.24177,290.149 V 287.462 Q 3.24177,287.229 3.18627,287.081 3.13077,286.933 3.02717,286.841 2.91246,286.741 2.74596,286.693 2.57946,286.645 2.41666,286.637 V 286.375 H 4.20747 L 5.70968,290.311 6.99359,287.018 Q 7.06389,286.837 7.11199,286.641 7.16379,286.441 7.16749,286.375 H 8.88061 V 286.637 Q 8.77701,286.641 8.6142,286.671 8.4551,286.7 8.3811,286.726 8.2553,286.771 8.2109,286.874 8.1665,286.978 8.1665,287.1 V 290.885 Q 8.1665,291.014 8.2109,291.103 8.2553,291.192 8.3811,291.259 8.4477,291.296 8.6179,291.329 8.78811,291.359 8.88801,291.362 Z"
+ style="-inkscape-font-specification:Georgia"
+ id="path2077"
+ inkscape:connector-curvature="0" />
+ <path
+ d="M 13.6166,287.67 Q 13.6166,288.08 13.4538,288.399 13.2947,288.713 13.0098,288.92 12.7286,289.127 12.3919,289.224 12.0552,289.32 11.6778,289.32 H 11.0895 V 290.911 Q 11.0895,291.04 11.1302,291.14 11.1746,291.236 11.3078,291.288 11.3744,291.314 11.5409,291.336 11.7111,291.359 11.8517,291.362 V 291.625 H 9.59841 V 291.362 Q 9.68721,291.355 9.85371,291.336 10.0239,291.318 10.0905,291.288 10.2015,291.24 10.2496,291.148 10.3014,291.055 10.3014,290.911 V 287.122 Q 10.3014,286.993 10.2644,286.889 10.2274,286.785 10.0905,286.734 9.94991,286.685 9.80931,286.667 9.67241,286.645 9.57251,286.637 V 286.375 H 11.9701 Q 12.7027,286.375 13.1578,286.73 13.6166,287.081 13.6166,287.67 Z M 12.4918,288.565 Q 12.6176,288.387 12.6583,288.199 12.699,288.006 12.699,287.855 12.699,287.644 12.6472,287.425 12.5991,287.207 12.477,287.044 12.3475,286.87 12.1366,286.774 11.9257,286.678 11.6112,286.678 H 11.0895 V 288.998 H 11.4669 Q 11.8665,288.998 12.1144,288.876 12.366,288.75 12.4918,288.565 Z"
+ style="-inkscape-font-specification:Georgia"
+ id="path2079"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+</svg>
diff --git a/src/css/src/shared/omnimod-icons.scss b/src/css/src/shared/omnimod-icons.scss
index 546b7b6..99ad7fe 100644
--- a/src/css/src/shared/omnimod-icons.scss
+++ b/src/css/src/shared/omnimod-icons.scss
@@ -114,3 +114,23 @@
{
background-image: url(/asset/svg/damage_type/strength.svg);
}
+
+.omnimod-icon-mheal
+{
+ background-image: url(/asset/svg/damage_type/mhealth.svg);
+}
+
+.omnimod-icon-mpts
+{
+ background-image: url(/asset/svg/damage_type/mmovpts.svg);
+}
+
+.omnimod-icon-negative
+{
+ filter: hue-rotate(310deg);
+}
+
+.omnimod-icon-positive
+{
+ filter: hue-rotate(30deg);
+}
diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm
index 569a97b..d99003b 100644
--- a/src/roster-editor/src/View/CharacterCard.elm
+++ b/src/roster-editor/src/View/CharacterCard.elm
@@ -246,7 +246,7 @@ get_weapon_details damage_multiplier weapon is_active_wp =
]
[
(get_weapon_field_header damage_multiplier weapon),
- (View.Omnimods.get_html_for_main_weapon
+ (View.Omnimods.get_html_with_modifier
damage_multiplier
(Struct.Weapon.get_omnimods weapon)
)
@@ -265,10 +265,11 @@ get_weapon_details damage_multiplier weapon is_active_wp =
)
get_armor_details : (
+ Float ->
Struct.Armor.Type ->
(Html.Html Struct.Event.Type)
)
-get_armor_details armor =
+get_armor_details damage_modifier armor =
(Html.div
[
(Html.Attributes.class "character-card-armor"),
@@ -286,15 +287,19 @@ get_armor_details armor =
(Html.text (Struct.Armor.get_name armor))
]
),
- (View.Omnimods.get_html (Struct.Armor.get_omnimods armor))
+ (View.Omnimods.get_html_with_modifier
+ damage_modifier
+ (Struct.Armor.get_omnimods armor)
+ )
]
)
get_glyph_board_details : (
+ Float ->
Struct.GlyphBoard.Type ->
(Html.Html Struct.Event.Type)
)
-get_glyph_board_details board =
+get_glyph_board_details damage_modifier board =
(Html.div
[
(Html.Attributes.class "character-card-glyph-board"),
@@ -312,7 +317,10 @@ get_glyph_board_details board =
(Html.text (Struct.GlyphBoard.get_name board))
]
),
- (View.Omnimods.get_html (Struct.GlyphBoard.get_omnimods board))
+ (View.Omnimods.get_html_with_modifier
+ damage_modifier
+ (Struct.GlyphBoard.get_omnimods board)
+ )
]
)
@@ -493,8 +501,14 @@ get_full_html char =
(Struct.Character.get_primary_weapon char)
(not is_using_secondary)
),
- (get_armor_details armor),
- (get_glyph_board_details (Struct.Character.get_glyph_board char)),
+ (get_armor_details
+ damage_modifier
+ armor
+ ),
+ (get_glyph_board_details
+ damage_modifier
+ (Struct.Character.get_glyph_board char)
+ ),
(get_relevant_stats char_statistics),
(get_attributes (Struct.Character.get_attributes char)),
(get_weapon_details
diff --git a/src/roster-editor/src/View/Omnimods.elm b/src/roster-editor/src/View/Omnimods.elm
index 3856347..35f9606 100644
--- a/src/roster-editor/src/View/Omnimods.elm
+++ b/src/roster-editor/src/View/Omnimods.elm
@@ -1,6 +1,6 @@
module View.Omnimods exposing
(
- get_html_for_main_weapon,
+ get_html_with_modifier,
get_html
)
@@ -31,7 +31,12 @@ get_mod_html mod =
(Html.div
[
(Html.Attributes.class "omnimod-icon"),
- (Html.Attributes.class ("omnimod-icon-" ++ category))
+ (Html.Attributes.class ("omnimod-icon-" ++ category)),
+ (
+ if (value < 0)
+ then (Html.Attributes.class "omnimod-icon-negative")
+ else (Html.Attributes.class "omnimod-icon-positive")
+ )
]
[
]
@@ -53,13 +58,23 @@ get_multiplied_mod_html multiplier mod =
(Html.div
[
(Html.Attributes.class "omnimod-icon"),
- (Html.Attributes.class ("omnimod-icon-" ++ category))
+ (Html.Attributes.class ("omnimod-icon-" ++ category)),
+ (
+ if (value < 0)
+ then (Html.Attributes.class "omnimod-icon-negative")
+ else (Html.Attributes.class "omnimod-icon-positive")
+ )
]
[
]
),
(Html.text
- (String.fromInt (ceiling ((toFloat value) * multiplier)))
+ (
+ (String.fromInt value)
+ ++ " ("
+ ++(String.fromInt (ceiling ((toFloat value) * multiplier)))
+ ++ ")"
+ )
)
]
)
@@ -67,12 +82,12 @@ get_multiplied_mod_html multiplier mod =
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-get_html_for_main_weapon : (
+get_html_with_modifier : (
Float ->
Struct.Omnimods.Type ->
(Html.Html Struct.Event.Type)
)
-get_html_for_main_weapon attack_multiplier omnimods =
+get_html_with_modifier attack_multiplier omnimods =
(Html.div
[
(Html.Attributes.class "omnimod-listing")