summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-17 00:55:26 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-17 00:55:26 +0100
commitb6fa3b730fe0c4249e714545ca88d2729c815a9b (patch)
treeb14c8e4952a22f8d2943283ca9870a05ccf086e0 /src/roster-editor
parenta3c380b2813c9928a2ee600c276295c7803e9e66 (diff)
...
Diffstat (limited to 'src/roster-editor')
-rw-r--r--src/roster-editor/src/View/Omnimods.elm181
1 files changed, 0 insertions, 181 deletions
diff --git a/src/roster-editor/src/View/Omnimods.elm b/src/roster-editor/src/View/Omnimods.elm
deleted file mode 100644
index d1ae7b7..0000000
--- a/src/roster-editor/src/View/Omnimods.elm
+++ /dev/null
@@ -1,181 +0,0 @@
-module View.Omnimods exposing
- (
- get_html_with_modifier,
- get_html
- )
-
--- Elm -------------------------------------------------------------------------
-import List
-
-import Html
-import Html.Attributes
-import Html.Events
-
--- Battle ----------------------------------------------------------------------
-import Battle.Struct.Omnimods
-
--- Local Module ----------------------------------------------------------------
-import Struct.Event
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_mod_html : (String, Int) -> (Html.Html Struct.Event.Type)
-get_mod_html mod =
- let
- (category, value) = mod
- in
- (Html.div
- [
- (Html.Attributes.class "info-card-mod")
- ]
- [
- (Html.div
- [
- (Html.Attributes.class "omnimod-icon"),
- (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 value))
- ]
- )
-
-get_multiplied_mod_html : Float -> (String, Int) -> (Html.Html Struct.Event.Type)
-get_multiplied_mod_html multiplier mod =
- let
- (category, value) = mod
- in
- (Html.div
- [
- (Html.Attributes.class "character-card-mod")
- ]
- [
- (Html.div
- [
- (Html.Attributes.class "omnimod-icon"),
- (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 value)
- ++ " ("
- ++(String.fromInt (ceiling ((toFloat value) * multiplier)))
- ++ ")"
- )
- )
- ]
- )
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html_with_modifier : (
- Float ->
- Battle.Struct.Omnimods.Type ->
- (Html.Html Struct.Event.Type)
- )
-get_html_with_modifier attack_multiplier omnimods =
- (Html.div
- [
- (Html.Attributes.class "omnimod-listing")
- ]
- [
- (Html.div
- [
- (Html.Attributes.class "omnimod-attack-mods")
- ]
- (List.map
- (get_multiplied_mod_html attack_multiplier)
- (Battle.Struct.Omnimods.get_attack_mods omnimods)
- )
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-defense-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_defense_mods omnimods)
- )
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-attribute-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_attributes_mods omnimods)
- )
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-statistics-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_statistics_mods omnimods)
- )
- )
- ]
- )
-
-get_html : Battle.Struct.Omnimods.Type -> (Html.Html Struct.Event.Type)
-get_html omnimods =
- (Html.div
- [
- (Html.Attributes.class "omnimod-listing")
- ]
- [
- (Html.div
- [
- (Html.Attributes.class "omnimod-attack-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_attack_mods omnimods)
- )
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-defense-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_defense_mods omnimods)
- )
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-attribute-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_attributes_mods omnimods)
- )
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-statistics-mods")
- ]
- (List.map
- (get_mod_html)
- (Battle.Struct.Omnimods.get_statistics_mods omnimods)
- )
- )
- ]
- )