aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/battle/src/Struct/Omnimods.elm8
-rw-r--r--src/battle/src/View/Controlled/CharacterCard.elm6
-rw-r--r--src/battle/src/View/SubMenu/Status/TileInfo.elm52
3 files changed, 59 insertions, 7 deletions
diff --git a/src/battle/src/Struct/Omnimods.elm b/src/battle/src/Struct/Omnimods.elm
index e98540a..5876454 100644
--- a/src/battle/src/Struct/Omnimods.elm
+++ b/src/battle/src/Struct/Omnimods.elm
@@ -7,6 +7,8 @@ module Struct.Omnimods exposing
apply_to_statistics,
get_attack_damage,
get_damage_sum,
+ get_attributes_mods,
+ get_statistics_mods,
get_attack_mods,
get_defense_mods,
decoder
@@ -165,6 +167,12 @@ get_attack_damage dmg_modifier atk_omni def_omni =
atk_omni.attack
)
+get_attributes_mods : Type -> (List (String, Int))
+get_attributes_mods omnimods = (Dict.toList omnimods.attributes)
+
+get_statistics_mods : Type -> (List (String, Int))
+get_statistics_mods omnimods = (Dict.toList omnimods.statistics)
+
get_attack_mods : Type -> (List (String, Int))
get_attack_mods omnimods = (Dict.toList omnimods.attack)
diff --git a/src/battle/src/View/Controlled/CharacterCard.elm b/src/battle/src/View/Controlled/CharacterCard.elm
index a26f8bb..cc11e0e 100644
--- a/src/battle/src/View/Controlled/CharacterCard.elm
+++ b/src/battle/src/View/Controlled/CharacterCard.elm
@@ -248,7 +248,7 @@ get_mod_html mod =
in
(Html.div
[
- (Html.Attributes.class "battle-character-card-mod")
+ (Html.Attributes.class "battle-info-card-mod")
]
[
(Html.text
@@ -292,7 +292,7 @@ get_weapon_details omnimods damage_multiplier weapon =
(get_weapon_field_header damage_multiplier weapon),
(Html.div
[
- (Html.Attributes.class "battle-character-card-weapon-stats")
+ (Html.Attributes.class "battle-info-card-omnimods-listing")
]
(List.map
(get_multiplied_mod_html damage_multiplier)
@@ -338,7 +338,7 @@ get_armor_details omnimods armor =
),
(Html.div
[
- (Html.Attributes.class "battle-character-card-armor-stats")
+ (Html.Attributes.class "battle-info-card-omnimods-listing")
]
(List.map
(get_mod_html)
diff --git a/src/battle/src/View/SubMenu/Status/TileInfo.elm b/src/battle/src/View/SubMenu/Status/TileInfo.elm
index 920b5ce..cace444 100644
--- a/src/battle/src/View/SubMenu/Status/TileInfo.elm
+++ b/src/battle/src/View/SubMenu/Status/TileInfo.elm
@@ -6,12 +6,13 @@ import Dict
import Html
import Html.Attributes
--- Struct.Map -------------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
import Constants.Movement
import Struct.Map
import Struct.Event
import Struct.Location
+import Struct.Omnimods
import Struct.Model
import Struct.Tile
@@ -58,7 +59,7 @@ get_name model tile =
]
)
-get_cost : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
+get_cost : Struct.Tile.Instance -> (Html.Html Struct.Event.Type)
get_cost tile =
let
cost = (Struct.Tile.get_instance_cost tile)
@@ -79,7 +80,7 @@ get_cost tile =
]
)
-get_location : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
+get_location : Struct.Tile.Instance -> (Html.Html Struct.Event.Type)
get_location tile =
let
tile_location = (Struct.Tile.get_location tile)
@@ -102,6 +103,48 @@ get_location tile =
]
)
+get_mod_html : (String, Int) -> (Html.Html Struct.Event.Type)
+get_mod_html mod =
+ let
+ (category, value) = mod
+ in
+ (Html.div
+ [
+ (Html.Attributes.class "battle-info-card-mod")
+ ]
+ [
+ (Html.text
+ (category ++ ": " ++ (toString value))
+ )
+ ]
+ )
+
+get_omnimods_listing : (List (String, Int)) -> (Html.Html Struct.Event.Type)
+get_omnimods_listing mod_list =
+ (Html.div
+ [
+ (Html.Attributes.class "battle-info-card-omnimods-listing")
+ ]
+ (List.map (get_mod_html) mod_list)
+ )
+
+get_omnimods : Struct.Omnimods.Type -> (Html.Html Struct.Event.Type)
+get_omnimods omnimods =
+ (Html.div
+ [
+ (Html.Attributes.class "battle-info-card-omnimods")
+ ]
+ [
+ (Html.text "Attribute Modifiers"),
+ (get_omnimods_listing (Struct.Omnimods.get_attributes_mods omnimods)),
+ (Html.text "Statistics Modifiers"),
+ (get_omnimods_listing (Struct.Omnimods.get_statistics_mods omnimods)),
+ (Html.text "Attack Modifiers"),
+ (get_omnimods_listing (Struct.Omnimods.get_attack_mods omnimods)),
+ (Html.text "Defense Modifiers"),
+ (get_omnimods_listing (Struct.Omnimods.get_defense_mods omnimods))
+ ]
+ )
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -130,7 +173,8 @@ get_html model loc =
(get_location tile),
(get_cost tile)
]
- )
+ ),
+ (get_omnimods ((Struct.Model.tile_omnimods_fun model) loc))
]
)