summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-15 22:26:49 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-15 22:26:49 +0100
commit0a2aa713a3e9babfeab8be394cd7066265184458 (patch)
treed402a10cfee6ac22f2ca447b9cd97dc34c750729
parent5c00d2938a4780beb2653d8bef96e3cdee8c3e45 (diff)
[Broken] Got 'roster-editor' to compile.
-rw-r--r--src/roster-editor/src/Comm/AddArmor.elm11
-rw-r--r--src/roster-editor/src/Comm/AddChar.elm2
-rw-r--r--src/roster-editor/src/Comm/AddGlyph.elm2
-rw-r--r--src/roster-editor/src/Comm/AddGlyphBoard.elm2
-rw-r--r--src/roster-editor/src/Comm/AddPortrait.elm17
-rw-r--r--src/roster-editor/src/Comm/AddWeapon.elm14
-rw-r--r--src/roster-editor/src/Comm/JoinBattle.elm2
-rw-r--r--src/roster-editor/src/Comm/LoadArmors.elm4
-rw-r--r--src/roster-editor/src/Comm/LoadGlyphBoards.elm2
-rw-r--r--src/roster-editor/src/Comm/LoadGlyphs.elm2
-rw-r--r--src/roster-editor/src/Comm/LoadPortraits.elm4
-rw-r--r--src/roster-editor/src/Comm/LoadRoster.elm2
-rw-r--r--src/roster-editor/src/Comm/LoadWeapons.elm2
-rw-r--r--src/roster-editor/src/Comm/Send.elm2
-rw-r--r--src/roster-editor/src/Comm/SetInventory.elm2
-rw-r--r--src/roster-editor/src/Comm/UpdateRoster.elm2
-rw-r--r--src/roster-editor/src/ElmModule/Init.elm6
-rw-r--r--src/roster-editor/src/ElmModule/Subscriptions.elm4
-rw-r--r--src/roster-editor/src/ElmModule/Update.elm5
-rw-r--r--src/roster-editor/src/ElmModule/View.elm2
-rw-r--r--src/roster-editor/src/Main.elm8
-rw-r--r--src/roster-editor/src/Struct/Character.elm95
-rw-r--r--src/roster-editor/src/Struct/CharacterRecord.elm27
-rw-r--r--src/roster-editor/src/Struct/Event.elm16
-rw-r--r--src/roster-editor/src/Struct/Glyph.elm12
-rw-r--r--src/roster-editor/src/Struct/GlyphBoard.elm20
-rw-r--r--src/roster-editor/src/Struct/HelpRequest.elm4
-rw-r--r--src/roster-editor/src/Struct/Inventory.elm2
-rw-r--r--src/roster-editor/src/Struct/Model.elm72
-rw-r--r--src/roster-editor/src/Struct/ServerReply.elm16
-rw-r--r--src/roster-editor/src/Struct/UI.elm7
-rw-r--r--src/roster-editor/src/Update/DisplayCharacterInfo.elm53
-rw-r--r--src/roster-editor/src/Update/GoToMainMenu.elm4
-rw-r--r--src/roster-editor/src/Update/HandleServerReply.elm39
-rw-r--r--src/roster-editor/src/Update/JoinBattle.elm5
-rw-r--r--src/roster-editor/src/Update/SelectCharacter.elm2
-rw-r--r--src/roster-editor/src/Update/SelectTab.elm3
-rw-r--r--src/roster-editor/src/Update/SendLoadRosterRequest.elm3
-rw-r--r--src/roster-editor/src/Update/SendRoster.elm2
-rw-r--r--src/roster-editor/src/Update/SetArmor.elm8
-rw-r--r--src/roster-editor/src/Update/SetGlyph.elm2
-rw-r--r--src/roster-editor/src/Update/SetGlyphBoard.elm2
-rw-r--r--src/roster-editor/src/Update/SetName.elm4
-rw-r--r--src/roster-editor/src/Update/SetPortrait.elm8
-rw-r--r--src/roster-editor/src/Update/SetRequestedHelp.elm3
-rw-r--r--src/roster-editor/src/Update/SetWeapon.elm8
-rw-r--r--src/roster-editor/src/Update/SwitchWeapons.elm6
-rw-r--r--src/roster-editor/src/Update/ToggleBattleIndex.elm3
-rw-r--r--src/roster-editor/src/View/ArmorSelection.elm25
-rw-r--r--src/roster-editor/src/View/Character.elm25
-rw-r--r--src/roster-editor/src/View/CharacterCard.elm96
-rw-r--r--src/roster-editor/src/View/CharacterIcon.elm7
-rw-r--r--src/roster-editor/src/View/CharacterSelection.elm3
-rw-r--r--src/roster-editor/src/View/Controlled.elm7
-rw-r--r--src/roster-editor/src/View/CurrentTab.elm2
-rw-r--r--src/roster-editor/src/View/Gauge.elm2
-rw-r--r--src/roster-editor/src/View/GlyphBoardSelection.elm11
-rw-r--r--src/roster-editor/src/View/GlyphManagement.elm10
-rw-r--r--src/roster-editor/src/View/GlyphSelection.elm14
-rw-r--r--src/roster-editor/src/View/MainMenu.elm2
-rw-r--r--src/roster-editor/src/View/MessageBoard.elm2
-rw-r--r--src/roster-editor/src/View/MessageBoard/Error.elm2
-rw-r--r--src/roster-editor/src/View/MessageBoard/Help.elm2
-rw-r--r--src/roster-editor/src/View/MessageBoard/Help/Guide.elm2
-rw-r--r--src/roster-editor/src/View/Omnimods.elm26
-rw-r--r--src/roster-editor/src/View/PortraitSelection.elm19
-rw-r--r--src/roster-editor/src/View/SubMenu/Characters.elm4
-rw-r--r--src/roster-editor/src/View/SubMenu/Settings.elm2
-rw-r--r--src/roster-editor/src/View/SubMenu/Status.elm55
-rw-r--r--src/roster-editor/src/View/SubMenu/Status/CharacterInfo.elm34
-rw-r--r--src/roster-editor/src/View/SubMenu/Status/TileInfo.elm181
-rw-r--r--src/roster-editor/src/View/WeaponSelection.elm42
72 files changed, 449 insertions, 649 deletions
diff --git a/src/roster-editor/src/Comm/AddArmor.elm b/src/roster-editor/src/Comm/AddArmor.elm
index c93a709..bef92bb 100644
--- a/src/roster-editor/src/Comm/AddArmor.elm
+++ b/src/roster-editor/src/Comm/AddArmor.elm
@@ -3,8 +3,10 @@ module Comm.AddArmor exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+
+-- Local Module ----------------------------------------------------------------
import Struct.ServerReply
--------------------------------------------------------------------------------
@@ -14,11 +16,12 @@ import Struct.ServerReply
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-internal_decoder : Struct.Armor.Type -> Struct.ServerReply.Type
+internal_decoder : BattleCharacters.Struct.Armor.Type -> Struct.ServerReply.Type
internal_decoder ar = (Struct.ServerReply.AddArmor ar)
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
decode : (Json.Decode.Decoder Struct.ServerReply.Type)
-decode = (Json.Decode.map (internal_decoder) (Struct.Armor.decoder))
+decode =
+ (Json.Decode.map (internal_decoder) (BattleCharacters.Struct.Armor.decoder))
diff --git a/src/roster-editor/src/Comm/AddChar.elm b/src/roster-editor/src/Comm/AddChar.elm
index a546bf0..15eff83 100644
--- a/src/roster-editor/src/Comm/AddChar.elm
+++ b/src/roster-editor/src/Comm/AddChar.elm
@@ -3,7 +3,7 @@ module Comm.AddChar exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.CharacterRecord
import Struct.ServerReply
diff --git a/src/roster-editor/src/Comm/AddGlyph.elm b/src/roster-editor/src/Comm/AddGlyph.elm
index a07c0d6..95f470e 100644
--- a/src/roster-editor/src/Comm/AddGlyph.elm
+++ b/src/roster-editor/src/Comm/AddGlyph.elm
@@ -3,7 +3,7 @@ module Comm.AddGlyph exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Glyph
import Struct.ServerReply
diff --git a/src/roster-editor/src/Comm/AddGlyphBoard.elm b/src/roster-editor/src/Comm/AddGlyphBoard.elm
index bee381f..09169d4 100644
--- a/src/roster-editor/src/Comm/AddGlyphBoard.elm
+++ b/src/roster-editor/src/Comm/AddGlyphBoard.elm
@@ -3,7 +3,7 @@ module Comm.AddGlyphBoard exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Roster Editor ---------------------------------------------------------------
+-- Local Module-----------------------------------------------------------------
import Struct.GlyphBoard
import Struct.ServerReply
diff --git a/src/roster-editor/src/Comm/AddPortrait.elm b/src/roster-editor/src/Comm/AddPortrait.elm
index 8eb731c..8fd29af 100644
--- a/src/roster-editor/src/Comm/AddPortrait.elm
+++ b/src/roster-editor/src/Comm/AddPortrait.elm
@@ -3,8 +3,10 @@ module Comm.AddPortrait exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Roster Editor ---------------------------------------------------------------
-import Struct.Portrait
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Portrait
+
+-- Local Module ----------------------------------------------------------------
import Struct.ServerReply
--------------------------------------------------------------------------------
@@ -14,11 +16,18 @@ import Struct.ServerReply
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-internal_decoder : Struct.Portrait.Type -> Struct.ServerReply.Type
+internal_decoder : (
+ BattleCharacters.Struct.Portrait.Type ->
+ Struct.ServerReply.Type
+ )
internal_decoder pt = (Struct.ServerReply.AddPortrait pt)
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
decode : (Json.Decode.Decoder Struct.ServerReply.Type)
-decode = (Json.Decode.map (internal_decoder) (Struct.Portrait.decoder))
+decode =
+ (Json.Decode.map
+ (internal_decoder)
+ (BattleCharacters.Struct.Portrait.decoder)
+ )
diff --git a/src/roster-editor/src/Comm/AddWeapon.elm b/src/roster-editor/src/Comm/AddWeapon.elm
index 4342f52..73c526f 100644
--- a/src/roster-editor/src/Comm/AddWeapon.elm
+++ b/src/roster-editor/src/Comm/AddWeapon.elm
@@ -3,8 +3,10 @@ module Comm.AddWeapon exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Roster Editor ---------------------------------------------------------------
-import Struct.Weapon
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.ServerReply
--------------------------------------------------------------------------------
@@ -14,11 +16,15 @@ import Struct.ServerReply
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-internal_decoder : Struct.Weapon.Type -> Struct.ServerReply.Type
+internal_decoder : (
+ BattleCharacters.Struct.Weapon.Type ->
+ Struct.ServerReply.Type
+ )
internal_decoder wp = (Struct.ServerReply.AddWeapon wp)
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
decode : (Json.Decode.Decoder Struct.ServerReply.Type)
-decode = (Json.Decode.map (internal_decoder) (Struct.Weapon.decoder))
+decode =
+ (Json.Decode.map (internal_decoder) (BattleCharacters.Struct.Weapon.decoder))
diff --git a/src/roster-editor/src/Comm/JoinBattle.elm b/src/roster-editor/src/Comm/JoinBattle.elm
index 470ea66..eb204df 100644
--- a/src/roster-editor/src/Comm/JoinBattle.elm
+++ b/src/roster-editor/src/Comm/JoinBattle.elm
@@ -8,7 +8,7 @@ import Json.Encode
-- Shared ----------------------------------------------------------------------
import Struct.Flags
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/LoadArmors.elm b/src/roster-editor/src/Comm/LoadArmors.elm
index 2fe04c1..4d2fa56 100644
--- a/src/roster-editor/src/Comm/LoadArmors.elm
+++ b/src/roster-editor/src/Comm/LoadArmors.elm
@@ -1,8 +1,6 @@
module Comm.LoadArmors exposing (try)
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/LoadGlyphBoards.elm b/src/roster-editor/src/Comm/LoadGlyphBoards.elm
index 1a74715..17a3cca 100644
--- a/src/roster-editor/src/Comm/LoadGlyphBoards.elm
+++ b/src/roster-editor/src/Comm/LoadGlyphBoards.elm
@@ -2,7 +2,7 @@ module Comm.LoadGlyphBoards exposing (try)
-- Elm -------------------------------------------------------------------------
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/LoadGlyphs.elm b/src/roster-editor/src/Comm/LoadGlyphs.elm
index c64602d..c85f72a 100644
--- a/src/roster-editor/src/Comm/LoadGlyphs.elm
+++ b/src/roster-editor/src/Comm/LoadGlyphs.elm
@@ -2,7 +2,7 @@ module Comm.LoadGlyphs exposing (try)
-- Elm -------------------------------------------------------------------------
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/LoadPortraits.elm b/src/roster-editor/src/Comm/LoadPortraits.elm
index 554dff2..c740cbe 100644
--- a/src/roster-editor/src/Comm/LoadPortraits.elm
+++ b/src/roster-editor/src/Comm/LoadPortraits.elm
@@ -1,8 +1,6 @@
module Comm.LoadPortraits exposing (try)
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/LoadRoster.elm b/src/roster-editor/src/Comm/LoadRoster.elm
index 524605f..babe0f6 100644
--- a/src/roster-editor/src/Comm/LoadRoster.elm
+++ b/src/roster-editor/src/Comm/LoadRoster.elm
@@ -3,7 +3,7 @@ module Comm.LoadRoster exposing (try)
-- Elm -------------------------------------------------------------------------
import Json.Encode
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/LoadWeapons.elm b/src/roster-editor/src/Comm/LoadWeapons.elm
index 4a63f23..9916886 100644
--- a/src/roster-editor/src/Comm/LoadWeapons.elm
+++ b/src/roster-editor/src/Comm/LoadWeapons.elm
@@ -2,7 +2,7 @@ module Comm.LoadWeapons exposing (try)
-- Elm -------------------------------------------------------------------------
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/Comm/Send.elm b/src/roster-editor/src/Comm/Send.elm
index c156a23..605fe1e 100644
--- a/src/roster-editor/src/Comm/Send.elm
+++ b/src/roster-editor/src/Comm/Send.elm
@@ -6,7 +6,7 @@ import Http
import Json.Decode
import Json.Encode
---- Roster Editor --------------------------------------------------------------
+--- Local Module ---------------------------------------------------------------
import Comm.AddArmor
import Comm.AddChar
import Comm.AddGlyph
diff --git a/src/roster-editor/src/Comm/SetInventory.elm b/src/roster-editor/src/Comm/SetInventory.elm
index 0c6d9d7..d7258ea 100644
--- a/src/roster-editor/src/Comm/SetInventory.elm
+++ b/src/roster-editor/src/Comm/SetInventory.elm
@@ -3,7 +3,7 @@ module Comm.SetInventory exposing (decode)
-- Elm -------------------------------------------------------------------------
import Json.Decode
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Inventory
import Struct.ServerReply
diff --git a/src/roster-editor/src/Comm/UpdateRoster.elm b/src/roster-editor/src/Comm/UpdateRoster.elm
index f2d57fc..fb29aee 100644
--- a/src/roster-editor/src/Comm/UpdateRoster.elm
+++ b/src/roster-editor/src/Comm/UpdateRoster.elm
@@ -7,7 +7,7 @@ import List
import Json.Encode
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.Send
import Constants.IO
diff --git a/src/roster-editor/src/ElmModule/Init.elm b/src/roster-editor/src/ElmModule/Init.elm
index fb22c4d..dbf228e 100644
--- a/src/roster-editor/src/ElmModule/Init.elm
+++ b/src/roster-editor/src/ElmModule/Init.elm
@@ -1,8 +1,9 @@
module ElmModule.Init exposing (init)
--- Elm -------------------------------------------------------------------------
+-- Shared ----------------------------------------------------------------------
+import Struct.Flags
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.LoadRoster
import Comm.LoadArmors
import Comm.LoadWeapons
@@ -11,7 +12,6 @@ import Comm.LoadGlyphs
import Comm.LoadGlyphBoards
import Struct.Event
-import Struct.Flags
import Struct.Model
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/ElmModule/Subscriptions.elm b/src/roster-editor/src/ElmModule/Subscriptions.elm
index 198833a..c2b9fbe 100644
--- a/src/roster-editor/src/ElmModule/Subscriptions.elm
+++ b/src/roster-editor/src/ElmModule/Subscriptions.elm
@@ -1,8 +1,6 @@
module ElmModule.Subscriptions exposing (..)
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Model
import Struct.Event
diff --git a/src/roster-editor/src/ElmModule/Update.elm b/src/roster-editor/src/ElmModule/Update.elm
index 7e95a3a..cf1c396 100644
--- a/src/roster-editor/src/ElmModule/Update.elm
+++ b/src/roster-editor/src/ElmModule/Update.elm
@@ -1,8 +1,6 @@
module ElmModule.Update exposing (update)
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
import Struct.UI
@@ -30,7 +28,6 @@ import Update.ToggleBattleIndex
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-
update : (
Struct.Event.Type ->
Struct.Model.Type ->
diff --git a/src/roster-editor/src/ElmModule/View.elm b/src/roster-editor/src/ElmModule/View.elm
index bf086e3..46c4cd4 100644
--- a/src/roster-editor/src/ElmModule/View.elm
+++ b/src/roster-editor/src/ElmModule/View.elm
@@ -4,7 +4,7 @@ module ElmModule.View exposing (view)
import Html
import Html.Attributes
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/Main.elm b/src/roster-editor/src/Main.elm
index cd4554e..4974d67 100644
--- a/src/roster-editor/src/Main.elm
+++ b/src/roster-editor/src/Main.elm
@@ -1,10 +1,12 @@
--- Elm ------------------------------------------------------------------------
+-- Elm -------------------------------------------------------------------------
import Browser
--- Roster Editor ---------------------------------------------------------------
+-- Shared ----------------------------------------------------------------------
+import Struct.Flags
+
+-- Local Module ----------------------------------------------------------------
import Struct.Model
import Struct.Event
-import Struct.Flags
import ElmModule.Init
import ElmModule.Subscriptions
diff --git a/src/roster-editor/src/Struct/Character.elm b/src/roster-editor/src/Struct/Character.elm
index 45e2cbf..e6ef776 100644
--- a/src/roster-editor/src/Struct/Character.elm
+++ b/src/roster-editor/src/Struct/Character.elm
@@ -31,15 +31,19 @@ module Struct.Character exposing
-- Elm -------------------------------------------------------------------------
import Array
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
-import Struct.Attributes
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Omnimods
+import Battle.Struct.Attributes
+import Battle.Struct.Statistics
+
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Glyph
import Struct.GlyphBoard
-import Struct.Omnimods
-import Struct.Portrait
-import Struct.Statistics
-import Struct.Weapon
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -49,16 +53,16 @@ type alias Type =
ix : Int,
battle_ix : Int,
name : String,
- portrait : Struct.Portrait.Type,
- attributes : Struct.Attributes.Type,
- statistics : Struct.Statistics.Type,
- primary_weapon : Struct.Weapon.Type,
- secondary_weapon : Struct.Weapon.Type,
+ portrait : BattleCharacters.Struct.Portrait.Type,
+ attributes : Battle.Struct.Attributes.Type,
+ statistics : Battle.Struct.Statistics.Type,
+ primary_weapon : BattleCharacters.Struct.Weapon.Type,
+ secondary_weapon : BattleCharacters.Struct.Weapon.Type,
is_using_secondary : Bool,
- armor : Struct.Armor.Type,
+ armor : BattleCharacters.Struct.Armor.Type,
glyph_board : Struct.GlyphBoard.Type,
glyphs : (Array.Array Struct.Glyph.Type),
- current_omnimods : Struct.Omnimods.Type,
+ current_omnimods : Battle.Struct.Omnimods.Type,
was_edited : Bool
}
@@ -69,16 +73,16 @@ refresh_omnimods : Type -> Type
refresh_omnimods char =
let
current_omnimods =
- (Struct.Omnimods.merge
- (Struct.Omnimods.merge
- (Struct.Weapon.get_omnimods
+ (Battle.Struct.Omnimods.merge
+ (Battle.Struct.Omnimods.merge
+ (BattleCharacters.Struct.Weapon.get_omnimods
(
if (char.is_using_secondary)
then char.secondary_weapon
else char.primary_weapon
)
)
- (Struct.Armor.get_omnimods char.armor)
+ (BattleCharacters.Struct.Armor.get_omnimods char.armor)
)
(Struct.GlyphBoard.get_omnimods_with_glyphs
char.glyphs
@@ -86,14 +90,14 @@ refresh_omnimods char =
)
)
current_attributes =
- (Struct.Omnimods.apply_to_attributes
+ (Battle.Struct.Omnimods.apply_to_attributes
current_omnimods
- (Struct.Attributes.default)
+ (Battle.Struct.Attributes.default)
)
current_statistics =
- (Struct.Omnimods.apply_to_statistics
+ (Battle.Struct.Omnimods.apply_to_statistics
current_omnimods
- (Struct.Statistics.new_raw current_attributes)
+ (Battle.Struct.Statistics.new_raw current_attributes)
)
in
{char |
@@ -109,10 +113,10 @@ refresh_omnimods char =
new : (
Int ->
String ->
- (Maybe Struct.Portrait.Type) ->
- (Maybe Struct.Weapon.Type) ->
- (Maybe Struct.Weapon.Type) ->
- (Maybe Struct.Armor.Type) ->
+ (Maybe BattleCharacters.Struct.Portrait.Type) ->
+ (Maybe BattleCharacters.Struct.Weapon.Type) ->
+ (Maybe BattleCharacters.Struct.Weapon.Type) ->
+ (Maybe BattleCharacters.Struct.Armor.Type) ->
(Maybe Struct.GlyphBoard.Type) ->
(List (Maybe Struct.Glyph.Type)) ->
Type
@@ -127,27 +131,30 @@ new index name m_portrait m_main_wp m_sec_wp m_armor m_board m_glyphs =
(
case m_portrait of
(Just portrait) -> portrait
- Nothing -> (Struct.Portrait.default)
+ Nothing -> (BattleCharacters.Struct.Portrait.default)
+ ),
+ attributes = (Battle.Struct.Attributes.default),
+ statistics =
+ (Battle.Struct.Statistics.new_raw
+ (Battle.Struct.Attributes.default)
),
- attributes = (Struct.Attributes.default),
- statistics = (Struct.Statistics.new_raw (Struct.Attributes.default)),
primary_weapon =
(
case m_main_wp of
(Just w) -> w
- Nothing -> (Struct.Weapon.default)
+ Nothing -> (BattleCharacters.Struct.Weapon.default)
),
secondary_weapon =
(
case m_sec_wp of
(Just w) -> w
- Nothing -> (Struct.Weapon.default)
+ Nothing -> (BattleCharacters.Struct.Weapon.default)
),
armor =
(
case m_armor of
(Just armor) -> armor
- Nothing -> (Struct.Armor.default)
+ Nothing -> (BattleCharacters.Struct.Armor.default)
),
glyph_board =
(
@@ -167,7 +174,7 @@ new index name m_portrait m_main_wp m_sec_wp m_armor m_board m_glyphs =
)
),
is_using_secondary = False,
- current_omnimods = (Struct.Omnimods.none),
+ current_omnimods = (Battle.Struct.Omnimods.none),
was_edited = False
}
)
@@ -187,40 +194,40 @@ get_name c = c.name
set_name : String -> Type -> Type
set_name name char = {char | name = name}
-get_portrait : Type -> Struct.Portrait.Type
+get_portrait : Type -> BattleCharacters.Struct.Portrait.Type
get_portrait c = c.portrait
-set_portrait : Struct.Portrait.Type -> Type -> Type
+set_portrait : BattleCharacters.Struct.Portrait.Type -> Type -> Type
set_portrait portrait char = {char | portrait = portrait}
-get_current_omnimods : Type -> Struct.Omnimods.Type
+get_current_omnimods : Type -> Battle.Struct.Omnimods.Type
get_current_omnimods c = c.current_omnimods
-get_attributes : Type -> Struct.Attributes.Type
+get_attributes : Type -> Battle.Struct.Attributes.Type
get_attributes char = char.attributes
-get_statistics : Type -> Struct.Statistics.Type
+get_statistics : Type -> Battle.Struct.Statistics.Type
get_statistics char = char.statistics
-get_primary_weapon : Type -> Struct.Weapon.Type
+get_primary_weapon : Type -> BattleCharacters.Struct.Weapon.Type
get_primary_weapon char = char.primary_weapon
-set_primary_weapon : Struct.Weapon.Type -> Type -> Type
+set_primary_weapon : BattleCharacters.Struct.Weapon.Type -> Type -> Type
set_primary_weapon wp char = (refresh_omnimods {char | primary_weapon = wp})
-get_secondary_weapon : Type -> Struct.Weapon.Type
+get_secondary_weapon : Type -> BattleCharacters.Struct.Weapon.Type
get_secondary_weapon char = char.secondary_weapon
-set_secondary_weapon : Struct.Weapon.Type -> Type -> Type
+set_secondary_weapon : BattleCharacters.Struct.Weapon.Type -> Type -> Type
set_secondary_weapon wp char = (refresh_omnimods {char | secondary_weapon = wp})
get_is_using_secondary : Type -> Bool
get_is_using_secondary char = char.is_using_secondary
-get_armor : Type -> Struct.Armor.Type
+get_armor : Type -> BattleCharacters.Struct.Armor.Type
get_armor char = char.armor
-set_armor : Struct.Armor.Type -> Type -> Type
+set_armor : BattleCharacters.Struct.Armor.Type -> Type -> Type
set_armor armor char = (refresh_omnimods {char | armor = armor})
get_glyph_board : Type -> Struct.GlyphBoard.Type
diff --git a/src/roster-editor/src/Struct/CharacterRecord.elm b/src/roster-editor/src/Struct/CharacterRecord.elm
index 66fadbe..7209d3c 100644
--- a/src/roster-editor/src/Struct/CharacterRecord.elm
+++ b/src/roster-editor/src/Struct/CharacterRecord.elm
@@ -21,13 +21,15 @@ import Json.Decode
import Json.Decode.Pipeline
import Json.Encode
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Glyph
import Struct.GlyphBoard
-import Struct.Portrait
-import Struct.Weapon
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -81,12 +83,21 @@ from_character char =
index = (Struct.Character.get_index char),
name = (Struct.Character.get_name char),
portrait_id =
- (Struct.Portrait.get_id (Struct.Character.get_portrait char)),
- armor_id = (Struct.Armor.get_id (Struct.Character.get_armor char)),
+ (BattleCharacters.Struct.Portrait.get_id
+ (Struct.Character.get_portrait char)
+ ),
+ armor_id =
+ (BattleCharacters.Struct.Armor.get_id
+ (Struct.Character.get_armor char)
+ ),
main_weapon_id =
- (Struct.Weapon.get_id (Struct.Character.get_primary_weapon char)),
+ (BattleCharacters.Struct.Weapon.get_id
+ (Struct.Character.get_primary_weapon char)
+ ),
secondary_weapon_id =
- (Struct.Weapon.get_id (Struct.Character.get_secondary_weapon char)),
+ (BattleCharacters.Struct.Weapon.get_id
+ (Struct.Character.get_secondary_weapon char)
+ ),
glyph_board_id =
(Struct.GlyphBoard.get_id (Struct.Character.get_glyph_board char)),
glyph_ids =
diff --git a/src/roster-editor/src/Struct/Event.elm b/src/roster-editor/src/Struct/Event.elm
index 7902338..fa65c87 100644
--- a/src/roster-editor/src/Struct/Event.elm
+++ b/src/roster-editor/src/Struct/Event.elm
@@ -3,16 +3,18 @@ module Struct.Event exposing (Type(..), attempted)
-- Elm -------------------------------------------------------------------------
import Http
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Error
import Struct.Glyph
import Struct.GlyphBoard
import Struct.HelpRequest
-import Struct.Portrait
import Struct.ServerReply
import Struct.UI
-import Struct.Weapon
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -32,11 +34,11 @@ type Type =
| SetCharacterName String
- | SelectedArmor Struct.Armor.Ref
+ | SelectedArmor BattleCharacters.Struct.Armor.Ref
| SelectedGlyph Struct.Glyph.Ref
| SelectedGlyphBoard Struct.GlyphBoard.Ref
- | SelectedPortrait Struct.Portrait.Ref
- | SelectedWeapon Struct.Weapon.Ref
+ | SelectedPortrait BattleCharacters.Struct.Portrait.Ref
+ | SelectedWeapon BattleCharacters.Struct.Weapon.Ref
| SwitchWeapons
diff --git a/src/roster-editor/src/Struct/Glyph.elm b/src/roster-editor/src/Struct/Glyph.elm
index 7445084..f871d35 100644
--- a/src/roster-editor/src/Struct/Glyph.elm
+++ b/src/roster-editor/src/Struct/Glyph.elm
@@ -14,8 +14,8 @@ module Struct.Glyph exposing
import Json.Decode
import Json.Decode.Pipeline
--- Roster Editor ---------------------------------------------------------------
-import Struct.Omnimods
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Omnimods
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -24,7 +24,7 @@ type alias Type =
{
id : String,
name : String,
- omnimods : Struct.Omnimods.Type
+ omnimods : Battle.Struct.Omnimods.Type
}
type alias Ref = String
@@ -42,7 +42,7 @@ get_id g = g.id
get_name : Type -> String
get_name g = g.name
-get_omnimods : Type -> Struct.Omnimods.Type
+get_omnimods : Type -> Battle.Struct.Omnimods.Type
get_omnimods g = g.omnimods
decoder : (Json.Decode.Decoder Type)
@@ -51,7 +51,7 @@ decoder =
Type
|> (Json.Decode.Pipeline.required "id" Json.Decode.string)
|> (Json.Decode.Pipeline.required "nam" Json.Decode.string)
- |> (Json.Decode.Pipeline.required "omni" Struct.Omnimods.decoder)
+ |> (Json.Decode.Pipeline.required "omni" Battle.Struct.Omnimods.decoder)
)
none : Type
@@ -59,7 +59,7 @@ none =
{
id = "0",
name = "Empty",
- omnimods = (Struct.Omnimods.none)
+ omnimods = (Battle.Struct.Omnimods.none)
}
default : Type
diff --git a/src/roster-editor/src/Struct/GlyphBoard.elm b/src/roster-editor/src/Struct/GlyphBoard.elm
index 6ee41a4..fc848e4 100644
--- a/src/roster-editor/src/Struct/GlyphBoard.elm
+++ b/src/roster-editor/src/Struct/GlyphBoard.elm
@@ -20,9 +20,11 @@ import List
import Json.Decode
import Json.Decode.Pipeline
--- Roster Editor ---------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Omnimods
+
+-- Local Module ----------------------------------------------------------------
import Struct.Glyph
-import Struct.Omnimods
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -32,7 +34,7 @@ type alias Type =
id : String,
name : String,
slots : (List Int),
- omnimods : Struct.Omnimods.Type
+ omnimods : Battle.Struct.Omnimods.Type
}
type alias Ref = String
@@ -53,20 +55,20 @@ get_name g = g.name
get_slots : Type -> (List Int)
get_slots g = g.slots
-get_omnimods : Type -> Struct.Omnimods.Type
+get_omnimods : Type -> Battle.Struct.Omnimods.Type
get_omnimods g = g.omnimods
get_omnimods_with_glyphs : (
(Array.Array Struct.Glyph.Type) ->
Type ->
- Struct.Omnimods.Type
+ Battle.Struct.Omnimods.Type
)
get_omnimods_with_glyphs glyphs board =
(List.foldl
- (Struct.Omnimods.merge)
+ (Battle.Struct.Omnimods.merge)
board.omnimods
(List.map2
- (Struct.Omnimods.scale)
+ (Battle.Struct.Omnimods.scale)
(List.map (\e -> ((toFloat e) / 100.0)) board.slots)
(List.map (Struct.Glyph.get_omnimods) (Array.toList glyphs))
)
@@ -82,7 +84,7 @@ decoder =
"slot"
(Json.Decode.list (Json.Decode.int))
)
- |> (Json.Decode.Pipeline.required "omni" Struct.Omnimods.decoder)
+ |> (Json.Decode.Pipeline.required "omni" Battle.Struct.Omnimods.decoder)
)
none : Type
@@ -91,7 +93,7 @@ none =
id = "",
name = "None",
slots = [],
- omnimods = (Struct.Omnimods.none)
+ omnimods = (Battle.Struct.Omnimods.none)
}
default : Type
diff --git a/src/roster-editor/src/Struct/HelpRequest.elm b/src/roster-editor/src/Struct/HelpRequest.elm
index be78065..50d2ee6 100644
--- a/src/roster-editor/src/Struct/HelpRequest.elm
+++ b/src/roster-editor/src/Struct/HelpRequest.elm
@@ -1,9 +1,5 @@
module Struct.HelpRequest exposing (Type(..))
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
-
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/Struct/Inventory.elm b/src/roster-editor/src/Struct/Inventory.elm
index 9d8de60..aa0cbeb 100644
--- a/src/roster-editor/src/Struct/Inventory.elm
+++ b/src/roster-editor/src/Struct/Inventory.elm
@@ -16,8 +16,6 @@ import Json.Decode.Pipeline
import Set
--- Battle ----------------------------------------------------------------------
-
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/Struct/Model.elm b/src/roster-editor/src/Struct/Model.elm
index 8794aca..5ed5fbd 100644
--- a/src/roster-editor/src/Struct/Model.elm
+++ b/src/roster-editor/src/Struct/Model.elm
@@ -26,8 +26,14 @@ import Dict
-- Shared ----------------------------------------------------------------------
import Struct.Flags
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+import Util.Array
+
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.CharacterRecord
import Struct.Error
@@ -35,34 +41,42 @@ import Struct.Glyph
import Struct.GlyphBoard
import Struct.HelpRequest
import Struct.Inventory
-import Struct.Portrait
import Struct.UI
-import Struct.Weapon
-
-import Util.Array
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
--------------------------------------------------------------------------------
type alias Type =
{
- flags: Struct.Flags.Type,
- help_request: Struct.HelpRequest.Type,
- characters: (Array.Array Struct.Character.Type),
- stalled_characters: (List Struct.CharacterRecord.Type),
- weapons: (Dict.Dict Struct.Weapon.Ref Struct.Weapon.Type),
- armors: (Dict.Dict Struct.Armor.Ref Struct.Armor.Type),
- glyphs: (Dict.Dict Struct.Glyph.Ref Struct.Glyph.Type),
- glyph_boards: (Dict.Dict Struct.GlyphBoard.Ref Struct.GlyphBoard.Type),
- portraits: (Dict.Dict Struct.Portrait.Ref Struct.Portrait.Type),
- error: (Maybe Struct.Error.Type),
- battle_order: (Array.Array Int),
- player_id: String,
- roster_id: String,
- edited_char: (Maybe Struct.Character.Type),
- inventory: Struct.Inventory.Type,
- session_token: String,
- ui: Struct.UI.Type
+ flags : Struct.Flags.Type,
+ help_request : Struct.HelpRequest.Type,
+ characters : (Array.Array Struct.Character.Type),
+ stalled_characters : (List Struct.CharacterRecord.Type),
+ weapons :
+ (Dict.Dict
+ BattleCharacters.Struct.Weapon.Ref
+ BattleCharacters.Struct.Weapon.Type
+ ),
+ armors :
+ (Dict.Dict
+ BattleCharacters.Struct.Armor.Ref
+ BattleCharacters.Struct.Armor.Type
+ ),
+ glyphs : (Dict.Dict Struct.Glyph.Ref Struct.Glyph.Type),
+ glyph_boards : (Dict.Dict Struct.GlyphBoard.Ref Struct.GlyphBoard.Type),
+ portraits :
+ (Dict.Dict
+ BattleCharacters.Struct.Portrait.Ref
+ BattleCharacters.Struct.Portrait.Type
+ ),
+ error : (Maybe Struct.Error.Type),
+ battle_order : (Array.Array Int),
+ player_id : String,
+ roster_id : String,
+ edited_char : (Maybe Struct.Character.Type),
+ inventory : Struct.Inventory.Type,
+ session_token : String,
+ ui : Struct.UI.Type
}
--------------------------------------------------------------------------------
@@ -179,34 +193,34 @@ enable_character_records model =
else
model
-add_weapon : Struct.Weapon.Type -> Type -> Type
+add_weapon : BattleCharacters.Struct.Weapon.Type -> Type -> Type
add_weapon wp model =
{model |
weapons =
(Dict.insert
- (Struct.Weapon.get_id wp)
+ (BattleCharacters.Struct.Weapon.get_id wp)
wp
model.weapons
)
}
-add_armor : Struct.Armor.Type -> Type -> Type
+add_armor : BattleCharacters.Struct.Armor.Type -> Type -> Type
add_armor ar model =
{model |
armors =
(Dict.insert
- (Struct.Armor.get_id ar)
+ (BattleCharacters.Struct.Armor.get_id ar)
ar
model.armors
)
}
-add_portrait : Struct.Portrait.Type -> Type -> Type
+add_portrait : BattleCharacters.Struct.Portrait.Type -> Type -> Type
add_portrait pt model =
{model |
portraits =
(Dict.insert
- (Struct.Portrait.get_id pt)
+ (BattleCharacters.Struct.Portrait.get_id pt)
pt
model.portraits
)
diff --git a/src/roster-editor/src/Struct/ServerReply.elm b/src/roster-editor/src/Struct/ServerReply.elm
index 50a7f09..7201bac 100644
--- a/src/roster-editor/src/Struct/ServerReply.elm
+++ b/src/roster-editor/src/Struct/ServerReply.elm
@@ -1,15 +1,15 @@
module Struct.ServerReply exposing (Type(..))
--- Elm -------------------------------------------------------------------------
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+import BattleCharacters.Struct.Weapon
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+-- Local Module ----------------------------------------------------------------
import Struct.CharacterRecord
import Struct.Glyph
import Struct.GlyphBoard
import Struct.Inventory
-import Struct.Portrait
-import Struct.Weapon
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -20,11 +20,11 @@ type Type =
| Disconnected
| GoTo String
| SetInventory Struct.Inventory.Type
- | AddArmor Struct.Armor.Type
+ | AddArmor BattleCharacters.Struct.Armor.Type
| AddGlyph Struct.Glyph.Type
| AddGlyphBoard Struct.GlyphBoard.Type
- | AddPortrait Struct.Portrait.Type
- | AddWeapon Struct.Weapon.Type
+ | AddPortrait BattleCharacters.Struct.Portrait.Type
+ | AddWeapon BattleCharacters.Struct.Weapon.Type
| AddCharacter Struct.CharacterRecord.Type
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/Struct/UI.elm b/src/roster-editor/src/Struct/UI.elm
index 4bda5b5..59244d2 100644
--- a/src/roster-editor/src/Struct/UI.elm
+++ b/src/roster-editor/src/Struct/UI.elm
@@ -15,10 +15,6 @@ module Struct.UI exposing
toggle_display_tile_cost
)
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
-
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -50,7 +46,8 @@ default : Type
default =
{
displayed_tab = CharacterSelectionTab,
- glyph_slot = -1
+ glyph_slot = -1,
+ display_tile_cost = False
}
-- Tab -------------------------------------------------------------------------
diff --git a/src/roster-editor/src/Update/DisplayCharacterInfo.elm b/src/roster-editor/src/Update/DisplayCharacterInfo.elm
deleted file mode 100644
index e482e2f..0000000
--- a/src/roster-editor/src/Update/DisplayCharacterInfo.elm
+++ /dev/null
@@ -1,53 +0,0 @@
-module Update.DisplayCharacterInfo exposing (apply_to)
--- Elm -------------------------------------------------------------------------
-import Array
-import Task
-
--- Map -------------------------------------------------------------------
-import Action.Scroll
-
-import Struct.Character
-import Struct.Event
-import Struct.Model
-import Struct.UI
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-scroll_to_char : Struct.Model.Type -> Int -> (Cmd Struct.Event.Type)
-scroll_to_char model char_ix =
- case (Array.get char_ix model.characters) of
- (Just char) ->
- (Task.attempt
- (Struct.Event.attempted)
- (Action.Scroll.to
- (Struct.Character.get_location char)
- model.ui
- )
- )
-
- Nothing ->
- Cmd.none
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-apply_to : (
- Struct.Model.Type ->
- Int ->
- (Struct.Model.Type, (Cmd Struct.Event.Type))
- )
-apply_to model target_ref =
- (
- {model |
- ui =
- (Struct.UI.set_displayed_tab
- Struct.UI.StatusTab
- (Struct.UI.set_previous_action
- (Just (Struct.UI.SelectedCharacter target_ref))
- model.ui
- )
- )
- },
- (scroll_to_char model target_ref)
- )
diff --git a/src/roster-editor/src/Update/GoToMainMenu.elm b/src/roster-editor/src/Update/GoToMainMenu.elm
index f2ec989..a0471f2 100644
--- a/src/roster-editor/src/Update/GoToMainMenu.elm
+++ b/src/roster-editor/src/Update/GoToMainMenu.elm
@@ -1,9 +1,9 @@
module Update.GoToMainMenu exposing (apply_to)
--- Elm -------------------------------------------------------------------------
--- Battle ----------------------------------------------------------------------
+-- Shared ----------------------------------------------------------------------
import Action.Ports
+-- Local Module ----------------------------------------------------------------
import Constants.IO
import Struct.Model
diff --git a/src/roster-editor/src/Update/HandleServerReply.elm b/src/roster-editor/src/Update/HandleServerReply.elm
index 0836a76..3469ea7 100644
--- a/src/roster-editor/src/Update/HandleServerReply.elm
+++ b/src/roster-editor/src/Update/HandleServerReply.elm
@@ -6,6 +6,7 @@ import Dict
import Http
import Url
+
-- Shared ----------------------------------------------------------------------
import Action.Ports
@@ -13,10 +14,14 @@ import Struct.Flags
import Util.Http
--- Roster Editor ---------------------------------------------------------------
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Constants.IO
-import Struct.Armor
import Struct.CharacterRecord
import Struct.Error
import Struct.Event
@@ -24,9 +29,7 @@ import Struct.Glyph
import Struct.GlyphBoard
import Struct.Inventory
import Struct.Model
-import Struct.Portrait
import Struct.ServerReply
-import Struct.Weapon
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
@@ -35,27 +38,35 @@ import Struct.Weapon
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-weapon_getter : Struct.Model.Type -> Struct.Weapon.Ref -> Struct.Weapon.Type
+weapon_getter : (
+ Struct.Model.Type ->
+ BattleCharacters.Struct.Weapon.Ref ->
+ BattleCharacters.Struct.Weapon.Type
+ )
weapon_getter model ref =
case (Dict.get ref model.weapons) of
(Just w) -> w
- Nothing -> Struct.Weapon.none
+ Nothing -> BattleCharacters.Struct.Weapon.none
-armor_getter : Struct.Model.Type -> Struct.Armor.Ref -> Struct.Armor.Type
+armor_getter : (
+ Struct.Model.Type ->
+ BattleCharacters.Struct.Armor.Ref ->
+ BattleCharacters.Struct.Armor.Type
+ )
armor_getter model ref =
case (Dict.get ref model.armors) of
(Just w) -> w
- Nothing -> Struct.Armor.none
+ Nothing -> BattleCharacters.Struct.Armor.none
portrait_getter : (
Struct.Model.Type ->
- Struct.Portrait.Ref ->
- Struct.Portrait.Type
+ BattleCharacters.Struct.Portrait.Ref ->
+ BattleCharacters.Struct.Portrait.Type
)
portrait_getter model ref =
case (Dict.get ref model.portraits) of
(Just w) -> w
- Nothing -> Struct.Portrait.default
+ Nothing -> BattleCharacters.Struct.Portrait.default
-----------
@@ -99,7 +110,7 @@ goto url current_state =
)
add_armor : (
- Struct.Armor.Type ->
+ BattleCharacters.Struct.Armor.Type ->
(Struct.Model.Type, (List (Cmd Struct.Event.Type))) ->
(Struct.Model.Type, (List (Cmd Struct.Event.Type)))
)
@@ -108,7 +119,7 @@ add_armor ar current_state =
((Struct.Model.add_armor ar model), cmds)
add_portrait : (
- Struct.Portrait.Type ->
+ BattleCharacters.Struct.Portrait.Type ->
(Struct.Model.Type, (List (Cmd Struct.Event.Type))) ->
(Struct.Model.Type, (List (Cmd Struct.Event.Type)))
)
@@ -135,7 +146,7 @@ add_glyph_board glb current_state =
((Struct.Model.add_glyph_board glb model), cmds)
add_weapon : (
- Struct.Weapon.Type ->
+ BattleCharacters.Struct.Weapon.Type ->
(Struct.Model.Type, (List (Cmd Struct.Event.Type))) ->
(Struct.Model.Type, (List (Cmd Struct.Event.Type)))
)
diff --git a/src/roster-editor/src/Update/JoinBattle.elm b/src/roster-editor/src/Update/JoinBattle.elm
index eb164bc..d613d89 100644
--- a/src/roster-editor/src/Update/JoinBattle.elm
+++ b/src/roster-editor/src/Update/JoinBattle.elm
@@ -1,9 +1,6 @@
module Update.JoinBattle exposing (apply_to)
--- Elm -------------------------------------------------------------------------
---import Array
-
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.JoinBattle
import Struct.Event
diff --git a/src/roster-editor/src/Update/SelectCharacter.elm b/src/roster-editor/src/Update/SelectCharacter.elm
index e85dbdd..1e408be 100644
--- a/src/roster-editor/src/Update/SelectCharacter.elm
+++ b/src/roster-editor/src/Update/SelectCharacter.elm
@@ -3,7 +3,7 @@ module Update.SelectCharacter exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Array
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Error
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/Update/SelectTab.elm b/src/roster-editor/src/Update/SelectTab.elm
index a8cf436..dff9c21 100644
--- a/src/roster-editor/src/Update/SelectTab.elm
+++ b/src/roster-editor/src/Update/SelectTab.elm
@@ -1,7 +1,6 @@
module Update.SelectTab exposing (apply_to)
--- Elm -------------------------------------------------------------------------
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Model
import Struct.Event
import Struct.UI
diff --git a/src/roster-editor/src/Update/SendLoadRosterRequest.elm b/src/roster-editor/src/Update/SendLoadRosterRequest.elm
index 2bbe9da..21f8d00 100644
--- a/src/roster-editor/src/Update/SendLoadRosterRequest.elm
+++ b/src/roster-editor/src/Update/SendLoadRosterRequest.elm
@@ -1,7 +1,6 @@
module Update.SendLoadRosterRequest exposing (apply_to)
--- Elm -------------------------------------------------------------------------
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.LoadRoster
import Struct.Event
diff --git a/src/roster-editor/src/Update/SendRoster.elm b/src/roster-editor/src/Update/SendRoster.elm
index b6f0510..d752449 100644
--- a/src/roster-editor/src/Update/SendRoster.elm
+++ b/src/roster-editor/src/Update/SendRoster.elm
@@ -3,7 +3,7 @@ module Update.SendRoster exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Array
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Comm.UpdateRoster
import Struct.Character
diff --git a/src/roster-editor/src/Update/SetArmor.elm b/src/roster-editor/src/Update/SetArmor.elm
index 1440966..5878be2 100644
--- a/src/roster-editor/src/Update/SetArmor.elm
+++ b/src/roster-editor/src/Update/SetArmor.elm
@@ -3,8 +3,10 @@ module Update.SetArmor exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Dict
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
@@ -18,7 +20,7 @@ import Struct.Model
--------------------------------------------------------------------------------
apply_to : (
Struct.Model.Type ->
- Struct.Armor.Ref ->
+ BattleCharacters.Struct.Armor.Ref ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
apply_to model ref =
diff --git a/src/roster-editor/src/Update/SetGlyph.elm b/src/roster-editor/src/Update/SetGlyph.elm
index 3288d18..aff749b 100644
--- a/src/roster-editor/src/Update/SetGlyph.elm
+++ b/src/roster-editor/src/Update/SetGlyph.elm
@@ -3,7 +3,7 @@ module Update.SetGlyph exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Dict
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Glyph
diff --git a/src/roster-editor/src/Update/SetGlyphBoard.elm b/src/roster-editor/src/Update/SetGlyphBoard.elm
index 5c738a7..45f2b10 100644
--- a/src/roster-editor/src/Update/SetGlyphBoard.elm
+++ b/src/roster-editor/src/Update/SetGlyphBoard.elm
@@ -3,7 +3,7 @@ module Update.SetGlyphBoard exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Dict
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.GlyphBoard
diff --git a/src/roster-editor/src/Update/SetName.elm b/src/roster-editor/src/Update/SetName.elm
index 5879d27..002af51 100644
--- a/src/roster-editor/src/Update/SetName.elm
+++ b/src/roster-editor/src/Update/SetName.elm
@@ -1,8 +1,6 @@
module Update.SetName exposing (apply_to)
--- Elm -------------------------------------------------------------------------
-
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/Update/SetPortrait.elm b/src/roster-editor/src/Update/SetPortrait.elm
index 5b1fe62..dc29c13 100644
--- a/src/roster-editor/src/Update/SetPortrait.elm
+++ b/src/roster-editor/src/Update/SetPortrait.elm
@@ -3,11 +3,13 @@ module Update.SetPortrait exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Dict
--- Roster Editor ---------------------------------------------------------------
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Portrait
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
-import Struct.Portrait
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -18,7 +20,7 @@ import Struct.Portrait
--------------------------------------------------------------------------------
apply_to : (
Struct.Model.Type ->
- Struct.Portrait.Ref ->
+ BattleCharacters.Struct.Portrait.Ref ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
apply_to model ref =
diff --git a/src/roster-editor/src/Update/SetRequestedHelp.elm b/src/roster-editor/src/Update/SetRequestedHelp.elm
index dfc58db..45e5e93 100644
--- a/src/roster-editor/src/Update/SetRequestedHelp.elm
+++ b/src/roster-editor/src/Update/SetRequestedHelp.elm
@@ -1,7 +1,6 @@
module Update.SetRequestedHelp exposing (apply_to)
--- Elm -------------------------------------------------------------------------
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.HelpRequest
import Struct.Model
diff --git a/src/roster-editor/src/Update/SetWeapon.elm b/src/roster-editor/src/Update/SetWeapon.elm
index 24a7885..1f796b0 100644
--- a/src/roster-editor/src/Update/SetWeapon.elm
+++ b/src/roster-editor/src/Update/SetWeapon.elm
@@ -3,12 +3,14 @@ module Update.SetWeapon exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Dict
--- Roster Editor ---------------------------------------------------------------
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
import Struct.UI
-import Struct.Weapon
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -19,7 +21,7 @@ import Struct.Weapon
--------------------------------------------------------------------------------
apply_to : (
Struct.Model.Type ->
- Struct.Weapon.Ref ->
+ BattleCharacters.Struct.Weapon.Ref ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
apply_to model ref =
diff --git a/src/roster-editor/src/Update/SwitchWeapons.elm b/src/roster-editor/src/Update/SwitchWeapons.elm
index f7675f6..38f8b8f 100644
--- a/src/roster-editor/src/Update/SwitchWeapons.elm
+++ b/src/roster-editor/src/Update/SwitchWeapons.elm
@@ -3,12 +3,14 @@ module Update.SwitchWeapons exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Dict
--- Roster Editor ---------------------------------------------------------------
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
import Struct.UI
-import Struct.Weapon
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
diff --git a/src/roster-editor/src/Update/ToggleBattleIndex.elm b/src/roster-editor/src/Update/ToggleBattleIndex.elm
index 584c314..27a61c3 100644
--- a/src/roster-editor/src/Update/ToggleBattleIndex.elm
+++ b/src/roster-editor/src/Update/ToggleBattleIndex.elm
@@ -3,9 +3,10 @@ module Update.ToggleBattleIndex exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Array
--- Roster Editor ---------------------------------------------------------------
+-- Shared ----------------------------------------------------------------------
import Util.Array
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/View/ArmorSelection.elm b/src/roster-editor/src/View/ArmorSelection.elm
index 71d5e90..0a3beb5 100644
--- a/src/roster-editor/src/View/ArmorSelection.elm
+++ b/src/roster-editor/src/View/ArmorSelection.elm
@@ -7,13 +7,16 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
+-- Battle ----------------------------------------------------------------------
+import Battle.View.Omnimods
+
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
-import Struct.Omnimods
-import View.Omnimods
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -34,7 +37,7 @@ get_mod_html mod =
)
get_armor_html : (
- Struct.Armor.Type ->
+ BattleCharacters.Struct.Armor.Type ->
(Html.Html Struct.Event.Type)
)
get_armor_html armor =
@@ -43,7 +46,9 @@ get_armor_html armor =
(Html.Attributes.class "character-card-armor"),
(Html.Attributes.class "clickable"),
(Html.Events.onClick
- (Struct.Event.SelectedArmor (Struct.Armor.get_id armor))
+ (Struct.Event.SelectedArmor
+ (BattleCharacters.Struct.Armor.get_id armor)
+ )
)
]
[
@@ -52,10 +57,14 @@ get_armor_html armor =
(Html.Attributes.class "character-card-armor-name")
]
[
- (Html.text (Struct.Armor.get_name armor))
+ (Html.text
+ (BattleCharacters.Struct.Armor.get_name armor)
+ )
]
),
- (View.Omnimods.get_html (Struct.Armor.get_omnimods armor))
+ (Battle.View.Omnimods.get_html
+ (BattleCharacters.Struct.Armor.get_omnimods armor)
+ )
]
)
diff --git a/src/roster-editor/src/View/Character.elm b/src/roster-editor/src/View/Character.elm
index 2ca3636..abfa557 100644
--- a/src/roster-editor/src/View/Character.elm
+++ b/src/roster-editor/src/View/Character.elm
@@ -9,13 +9,16 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
+-- Shared ----------------------------------------------------------------------
import Util.Html
-import Struct.Armor
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Portrait
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
-import Struct.Portrait
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -39,7 +42,10 @@ get_icon_head_html char =
(Html.Attributes.class
(
"asset-character-icon-"
- ++ (Struct.Armor.get_image_id (Struct.Character.get_armor char))
+ ++
+ (BattleCharacters.Struct.Armor.get_image_id
+ (Struct.Character.get_armor char)
+ )
)
)
]
@@ -55,7 +61,10 @@ get_portrait_body_html char =
(Html.Attributes.class
(
"asset-character-portrait-"
- ++ (Struct.Portrait.get_id (Struct.Character.get_portrait char))
+ ++
+ (BattleCharacters.Struct.Portrait.get_id
+ (Struct.Character.get_portrait char)
+ )
)
)
]
@@ -72,14 +81,16 @@ get_portrait_armor_html char =
(
"asset-armor-"
++
- (Struct.Armor.get_image_id (Struct.Character.get_armor char))
+ (BattleCharacters.Struct.Armor.get_image_id
+ (Struct.Character.get_armor char)
+ )
)
),
(Html.Attributes.class
(
"asset-armor-variation-"
++
- (Struct.Portrait.get_body_id
+ (BattleCharacters.Struct.Portrait.get_body_id
(Struct.Character.get_portrait char)
)
)
diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm
index d99003b..0ddc2e6 100644
--- a/src/roster-editor/src/View/CharacterCard.elm
+++ b/src/roster-editor/src/View/CharacterCard.elm
@@ -11,20 +11,25 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
-import Struct.Armor
-import Struct.Attributes
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Attributes
+import Battle.Struct.Omnimods
+import Battle.Struct.Statistics
+
+import Battle.View.Omnimods
+
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Armor
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.GlyphBoard
-import Struct.Omnimods
-import Struct.Statistics
import Struct.UI
-import Struct.Weapon
import View.Character
import View.Gauge
-import View.Omnimods
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -67,7 +72,7 @@ get_health_bar : (
get_health_bar char =
let
max =
- (Struct.Statistics.get_max_health
+ (Battle.Struct.Statistics.get_max_health
(Struct.Character.get_statistics char)
)
in
@@ -96,7 +101,7 @@ get_movement_bar : Struct.Character.Type -> (Html.Html Struct.Event.Type)
get_movement_bar char =
let
max =
- (Struct.Statistics.get_movement_points
+ (Battle.Struct.Statistics.get_movement_points
(Struct.Character.get_statistics char)
)
in
@@ -105,7 +110,7 @@ get_movement_bar char =
"MP: "
++
(String.fromInt
- (Struct.Statistics.get_movement_points
+ (Battle.Struct.Statistics.get_movement_points
(Struct.Character.get_statistics char)
)
)
@@ -118,7 +123,7 @@ get_movement_bar char =
get_weapon_field_header : (
Float ->
- Struct.Weapon.Type ->
+ BattleCharacters.Struct.Weapon.Type ->
(Html.Html Struct.Event.Type)
)
get_weapon_field_header damage_multiplier weapon =
@@ -131,7 +136,7 @@ get_weapon_field_header damage_multiplier weapon =
[
]
[
- (Html.text (Struct.Weapon.get_name weapon))
+ (Html.text (BattleCharacters.Struct.Weapon.get_name weapon))
]
),
(Html.div
@@ -150,7 +155,11 @@ get_weapon_field_header damage_multiplier weapon =
(String.fromInt
(ceiling
(
- (toFloat (Struct.Weapon.get_damage_sum weapon))
+ (toFloat
+ (BattleCharacters.Struct.Weapon.get_damage_sum
+ weapon
+ )
+ )
* damage_multiplier
)
)
@@ -167,12 +176,16 @@ get_weapon_field_header damage_multiplier weapon =
(Html.text
(
(String.fromInt
- (Struct.Weapon.get_defense_range weapon)
+ (BattleCharacters.Struct.Weapon.get_defense_range
+ weapon
+ )
)
++ "-"
++
(String.fromInt
- (Struct.Weapon.get_attack_range weapon)
+ (BattleCharacters.Struct.Weapon.get_attack_range
+ weapon
+ )
)
)
)
@@ -203,7 +216,11 @@ get_mod_html mod =
]
)
-get_multiplied_mod_html : Float -> (String, Int) -> (Html.Html Struct.Event.Type)
+get_multiplied_mod_html : (
+ Float ->
+ (String, Int) ->
+ (Html.Html Struct.Event.Type)
+ )
get_multiplied_mod_html multiplier mod =
let
(category, value) = mod
@@ -229,7 +246,7 @@ get_multiplied_mod_html multiplier mod =
get_weapon_details : (
Float ->
- Struct.Weapon.Type ->
+ BattleCharacters.Struct.Weapon.Type ->
Bool ->
(Html.Html Struct.Event.Type)
)
@@ -246,9 +263,9 @@ get_weapon_details damage_multiplier weapon is_active_wp =
]
[
(get_weapon_field_header damage_multiplier weapon),
- (View.Omnimods.get_html_with_modifier
+ (Battle.View.Omnimods.get_html_with_modifier
damage_multiplier
- (Struct.Weapon.get_omnimods weapon)
+ (BattleCharacters.Struct.Weapon.get_omnimods weapon)
)
]
)
@@ -266,7 +283,7 @@ get_weapon_details damage_multiplier weapon is_active_wp =
get_armor_details : (
Float ->
- Struct.Armor.Type ->
+ BattleCharacters.Struct.Armor.Type ->
(Html.Html Struct.Event.Type)
)
get_armor_details damage_modifier armor =
@@ -284,12 +301,12 @@ get_armor_details damage_modifier armor =
(Html.Attributes.class "character-card-armor-name")
]
[
- (Html.text (Struct.Armor.get_name armor))
+ (Html.text (BattleCharacters.Struct.Armor.get_name armor))
]
),
- (View.Omnimods.get_html_with_modifier
+ (Battle.View.Omnimods.get_html_with_modifier
damage_modifier
- (Struct.Armor.get_omnimods armor)
+ (BattleCharacters.Struct.Armor.get_omnimods armor)
)
]
)
@@ -317,7 +334,7 @@ get_glyph_board_details damage_modifier board =
(Html.text (Struct.GlyphBoard.get_name board))
]
),
- (View.Omnimods.get_html_with_modifier
+ (Battle.View.Omnimods.get_html_with_modifier
damage_modifier
(Struct.GlyphBoard.get_omnimods board)
)
@@ -359,7 +376,7 @@ stat_val val perc =
)
get_relevant_stats : (
- Struct.Statistics.Type ->
+ Battle.Struct.Statistics.Type ->
(Html.Html Struct.Event.Type)
)
get_relevant_stats stats =
@@ -373,20 +390,20 @@ get_relevant_stats stats =
]
[
(stat_name "dodg"),
- (stat_val (Struct.Statistics.get_dodges stats) True),
+ (stat_val (Battle.Struct.Statistics.get_dodges stats) True),
(stat_name "pary"),
- (stat_val (Struct.Statistics.get_parries stats) True),
+ (stat_val (Battle.Struct.Statistics.get_parries stats) True),
(stat_name "accu"),
- (stat_val (Struct.Statistics.get_accuracy stats) False),
+ (stat_val (Battle.Struct.Statistics.get_accuracy stats) False),
(stat_name "dhit"),
- (stat_val (Struct.Statistics.get_double_hits stats) True),
+ (stat_val (Battle.Struct.Statistics.get_double_hits stats) True),
(stat_name "crit"),
- (stat_val (Struct.Statistics.get_critical_hits stats) True)
+ (stat_val (Battle.Struct.Statistics.get_critical_hits stats) True)
]
)
get_attributes : (
- Struct.Attributes.Type ->
+ Battle.Struct.Attributes.Type ->
(Html.Html Struct.Event.Type)
)
get_attributes atts =
@@ -400,17 +417,17 @@ get_attributes atts =
]
[
(stat_name "con"),
- (stat_val (Struct.Attributes.get_constitution atts) False),
+ (stat_val (Battle.Struct.Attributes.get_constitution atts) False),
(stat_name "str"),
- (stat_val (Struct.Attributes.get_strength atts) False),
+ (stat_val (Battle.Struct.Attributes.get_strength atts) False),
(stat_name "dex"),
- (stat_val (Struct.Attributes.get_dexterity atts) False),
+ (stat_val (Battle.Struct.Attributes.get_dexterity atts) False),
(stat_name "spe"),
- (stat_val (Struct.Attributes.get_speed atts) False),
+ (stat_val (Battle.Struct.Attributes.get_speed atts) False),
(stat_name "int"),
- (stat_val (Struct.Attributes.get_intelligence atts) False),
+ (stat_val (Battle.Struct.Attributes.get_intelligence atts) False),
(stat_name "min"),
- (stat_val (Struct.Attributes.get_mind atts) False)
+ (stat_val (Battle.Struct.Attributes.get_mind atts) False)
]
)
@@ -461,7 +478,10 @@ get_full_html char =
let
is_using_secondary = (Struct.Character.get_is_using_secondary char)
char_statistics = (Struct.Character.get_statistics char)
- damage_modifier = (Struct.Statistics.get_damage_modifier char_statistics)
+ damage_modifier =
+ (Battle.Struct.Statistics.get_damage_modifier
+ char_statistics
+ )
armor = (Struct.Character.get_armor char)
in
(Html.div
diff --git a/src/roster-editor/src/View/CharacterIcon.elm b/src/roster-editor/src/View/CharacterIcon.elm
index d7934d3..bd91d83 100644
--- a/src/roster-editor/src/View/CharacterIcon.elm
+++ b/src/roster-editor/src/View/CharacterIcon.elm
@@ -5,11 +5,12 @@ import Html
import Html.Attributes
import Html.Events
--- Map ------------------------------------------------------------------
-import Constants.UI
-
+-- Shared ----------------------------------------------------------------------
import Util.Html
+-- Local Module ----------------------------------------------------------------
+import Constants.UI
+
import Struct.Character
import Struct.CharacterTurn
import Struct.Event
diff --git a/src/roster-editor/src/View/CharacterSelection.elm b/src/roster-editor/src/View/CharacterSelection.elm
index 1ff4fb9..115b083 100644
--- a/src/roster-editor/src/View/CharacterSelection.elm
+++ b/src/roster-editor/src/View/CharacterSelection.elm
@@ -8,11 +8,12 @@ import List
import Html
import Html.Attributes
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
import View.CharacterCard
+
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/View/Controlled.elm b/src/roster-editor/src/View/Controlled.elm
index 0487f3c..138add9 100644
--- a/src/roster-editor/src/View/Controlled.elm
+++ b/src/roster-editor/src/View/Controlled.elm
@@ -5,12 +5,13 @@ import Html
import Html.Attributes
import Html.Lazy
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
+import Util.Html
+
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
-import Util.Html
-
import View.CharacterCard
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/View/CurrentTab.elm b/src/roster-editor/src/View/CurrentTab.elm
index 7f0cc2f..e9e54e5 100644
--- a/src/roster-editor/src/View/CurrentTab.elm
+++ b/src/roster-editor/src/View/CurrentTab.elm
@@ -3,7 +3,7 @@ module View.CurrentTab exposing (get_html)
-- Elm -------------------------------------------------------------------------
import Html
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
import Struct.UI
diff --git a/src/roster-editor/src/View/Gauge.elm b/src/roster-editor/src/View/Gauge.elm
index 09fc9c3..50dbea3 100644
--- a/src/roster-editor/src/View/Gauge.elm
+++ b/src/roster-editor/src/View/Gauge.elm
@@ -4,7 +4,7 @@ module View.Gauge exposing (get_html)
import Html
import Html.Attributes
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
--------------------------------------------------------------------------------
diff --git a/src/roster-editor/src/View/GlyphBoardSelection.elm b/src/roster-editor/src/View/GlyphBoardSelection.elm
index b6a25b2..b956e0b 100644
--- a/src/roster-editor/src/View/GlyphBoardSelection.elm
+++ b/src/roster-editor/src/View/GlyphBoardSelection.elm
@@ -7,13 +7,14 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
+import Battle.View.Omnimods
+
+-- Local Module ----------------------------------------------------------------
import Struct.GlyphBoard
import Struct.Event
import Struct.Model
-import Struct.Omnimods
-import View.Omnimods
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -55,7 +56,9 @@ get_glyph_board_html glyph_board =
(Html.text (Struct.GlyphBoard.get_name glyph_board))
]
),
- (View.Omnimods.get_html (Struct.GlyphBoard.get_omnimods glyph_board))
+ (Battle.View.Omnimods.get_html
+ (Struct.GlyphBoard.get_omnimods glyph_board)
+ )
]
)
diff --git a/src/roster-editor/src/View/GlyphManagement.elm b/src/roster-editor/src/View/GlyphManagement.elm
index 8665e09..1fce7b2 100644
--- a/src/roster-editor/src/View/GlyphManagement.elm
+++ b/src/roster-editor/src/View/GlyphManagement.elm
@@ -7,12 +7,14 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Omnimods
+
+-- Local Module ----------------------------------------------------------------
+import Struct.Character
import Struct.Event
import Struct.Glyph
import Struct.GlyphBoard
-import Struct.Omnimods
-import Struct.Character
import Struct.Model
--------------------------------------------------------------------------------
@@ -60,7 +62,7 @@ get_glyph_html modifier (index, glyph) =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_all_mods
+ (Battle.Struct.Omnimods.get_all_mods
(Struct.Glyph.get_omnimods glyph)
)
)
diff --git a/src/roster-editor/src/View/GlyphSelection.elm b/src/roster-editor/src/View/GlyphSelection.elm
index 4ee62d0..6d3eca2 100644
--- a/src/roster-editor/src/View/GlyphSelection.elm
+++ b/src/roster-editor/src/View/GlyphSelection.elm
@@ -7,22 +7,20 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
+import Battle.View.Omnimods
+
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Glyph
-import Struct.Omnimods
import Struct.Model
-import View.Omnimods
-
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
get_mod_html : (String, Int) -> (Html.Html Struct.Event.Type)
get_mod_html mod =
- let
- (category, value) = mod
- in
+ let (category, value) = mod in
(Html.div
[
(Html.Attributes.class "info-card-mod")
@@ -48,7 +46,7 @@ get_glyph_html glyph =
]
[
(Html.text (Struct.Glyph.get_name glyph)),
- (View.Omnimods.get_html (Struct.Glyph.get_omnimods glyph))
+ (Battle.View.Omnimods.get_html (Struct.Glyph.get_omnimods glyph))
]
)
diff --git a/src/roster-editor/src/View/MainMenu.elm b/src/roster-editor/src/View/MainMenu.elm
index e70b5c0..96a670a 100644
--- a/src/roster-editor/src/View/MainMenu.elm
+++ b/src/roster-editor/src/View/MainMenu.elm
@@ -10,7 +10,7 @@ import Html.Events
-- Shared ----------------------------------------------------------------------
import Util.Html
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
import Struct.UI
diff --git a/src/roster-editor/src/View/MessageBoard.elm b/src/roster-editor/src/View/MessageBoard.elm
index 433e05b..00859e7 100644
--- a/src/roster-editor/src/View/MessageBoard.elm
+++ b/src/roster-editor/src/View/MessageBoard.elm
@@ -3,7 +3,7 @@ module View.MessageBoard exposing (get_html)
-- Elm -------------------------------------------------------------------------
import Html
--- Roster Editor ---------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/View/MessageBoard/Error.elm b/src/roster-editor/src/View/MessageBoard/Error.elm
index c03467a..72de518 100644
--- a/src/roster-editor/src/View/MessageBoard/Error.elm
+++ b/src/roster-editor/src/View/MessageBoard/Error.elm
@@ -4,7 +4,7 @@ module View.MessageBoard.Error exposing (get_html)
import Html
import Html.Attributes
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Error
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/View/MessageBoard/Help.elm b/src/roster-editor/src/View/MessageBoard/Help.elm
index ff68688..eea0c8a 100644
--- a/src/roster-editor/src/View/MessageBoard/Help.elm
+++ b/src/roster-editor/src/View/MessageBoard/Help.elm
@@ -4,7 +4,7 @@ module View.MessageBoard.Help exposing (get_html)
import Html
import Html.Attributes
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.HelpRequest
import Struct.Model
diff --git a/src/roster-editor/src/View/MessageBoard/Help/Guide.elm b/src/roster-editor/src/View/MessageBoard/Help/Guide.elm
index 0cf8419..c271f78 100644
--- a/src/roster-editor/src/View/MessageBoard/Help/Guide.elm
+++ b/src/roster-editor/src/View/MessageBoard/Help/Guide.elm
@@ -4,7 +4,7 @@ module View.MessageBoard.Help.Guide exposing (get_html_contents)
import Html
import Html.Attributes
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/View/Omnimods.elm b/src/roster-editor/src/View/Omnimods.elm
index 35f9606..d1ae7b7 100644
--- a/src/roster-editor/src/View/Omnimods.elm
+++ b/src/roster-editor/src/View/Omnimods.elm
@@ -11,9 +11,11 @@ import Html
import Html.Attributes
import Html.Events
--- Roster Editor ---------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Omnimods
+
+-- Local Module ----------------------------------------------------------------
import Struct.Event
-import Struct.Omnimods
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -84,7 +86,7 @@ get_multiplied_mod_html multiplier mod =
--------------------------------------------------------------------------------
get_html_with_modifier : (
Float ->
- Struct.Omnimods.Type ->
+ Battle.Struct.Omnimods.Type ->
(Html.Html Struct.Event.Type)
)
get_html_with_modifier attack_multiplier omnimods =
@@ -99,7 +101,7 @@ get_html_with_modifier attack_multiplier omnimods =
]
(List.map
(get_multiplied_mod_html attack_multiplier)
- (Struct.Omnimods.get_attack_mods omnimods)
+ (Battle.Struct.Omnimods.get_attack_mods omnimods)
)
),
(Html.div
@@ -108,7 +110,7 @@ get_html_with_modifier attack_multiplier omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_defense_mods omnimods)
+ (Battle.Struct.Omnimods.get_defense_mods omnimods)
)
),
(Html.div
@@ -117,7 +119,7 @@ get_html_with_modifier attack_multiplier omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_attributes_mods omnimods)
+ (Battle.Struct.Omnimods.get_attributes_mods omnimods)
)
),
(Html.div
@@ -126,13 +128,13 @@ get_html_with_modifier attack_multiplier omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_statistics_mods omnimods)
+ (Battle.Struct.Omnimods.get_statistics_mods omnimods)
)
)
]
)
-get_html : Struct.Omnimods.Type -> (Html.Html Struct.Event.Type)
+get_html : Battle.Struct.Omnimods.Type -> (Html.Html Struct.Event.Type)
get_html omnimods =
(Html.div
[
@@ -145,7 +147,7 @@ get_html omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_attack_mods omnimods)
+ (Battle.Struct.Omnimods.get_attack_mods omnimods)
)
),
(Html.div
@@ -154,7 +156,7 @@ get_html omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_defense_mods omnimods)
+ (Battle.Struct.Omnimods.get_defense_mods omnimods)
)
),
(Html.div
@@ -163,7 +165,7 @@ get_html omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_attributes_mods omnimods)
+ (Battle.Struct.Omnimods.get_attributes_mods omnimods)
)
),
(Html.div
@@ -172,7 +174,7 @@ get_html omnimods =
]
(List.map
(get_mod_html)
- (Struct.Omnimods.get_statistics_mods omnimods)
+ (Battle.Struct.Omnimods.get_statistics_mods omnimods)
)
)
]
diff --git a/src/roster-editor/src/View/PortraitSelection.elm b/src/roster-editor/src/View/PortraitSelection.elm
index b630ef0..9065c9d 100644
--- a/src/roster-editor/src/View/PortraitSelection.elm
+++ b/src/roster-editor/src/View/PortraitSelection.elm
@@ -9,22 +9,29 @@ import Html.Events
import List
--- Roster Editor ---------------------------------------------------------------
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Portrait
+
+-- Local Module ----------------------------------------------------------------
import Struct.Event
-import Struct.Portrait
import Struct.Model
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-get_portrait_html : Struct.Portrait.Type -> (Html.Html Struct.Event.Type)
+get_portrait_html : (
+ BattleCharacters.Struct.Portrait.Type ->
+ (Html.Html Struct.Event.Type)
+ )
get_portrait_html pt =
(Html.div
[
(Html.Attributes.class "character-portrait-and-icon"),
(Html.Attributes.class "clickable"),
(Html.Events.onClick
- (Struct.Event.SelectedPortrait (Struct.Portrait.get_id pt))
+ (Struct.Event.SelectedPortrait
+ (BattleCharacters.Struct.Portrait.get_id pt)
+ )
)
]
[
@@ -40,7 +47,7 @@ get_portrait_html pt =
(Html.Attributes.class
(
"asset-character-portrait-"
- ++ (Struct.Portrait.get_id pt)
+ ++ (BattleCharacters.Struct.Portrait.get_id pt)
)
)
]
@@ -69,7 +76,7 @@ get_portrait_html pt =
(Html.Attributes.class
(
"asset-character-icon-"
- ++ (Struct.Portrait.get_icon_id pt)
+ ++ (BattleCharacters.Struct.Portrait.get_icon_id pt)
)
)
]
diff --git a/src/roster-editor/src/View/SubMenu/Characters.elm b/src/roster-editor/src/View/SubMenu/Characters.elm
index e433ab0..411e5e0 100644
--- a/src/roster-editor/src/View/SubMenu/Characters.elm
+++ b/src/roster-editor/src/View/SubMenu/Characters.elm
@@ -1,13 +1,13 @@
module View.SubMenu.Characters exposing (get_html)
-- Elm -------------------------------------------------------------------------
-import Array
+import Array
import Html
import Html.Attributes
import Html.Events
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
diff --git a/src/roster-editor/src/View/SubMenu/Settings.elm b/src/roster-editor/src/View/SubMenu/Settings.elm
index 0becac1..d214c7b 100644
--- a/src/roster-editor/src/View/SubMenu/Settings.elm
+++ b/src/roster-editor/src/View/SubMenu/Settings.elm
@@ -5,7 +5,7 @@ import Html
import Html.Attributes
import Html.Events
--- Map -------------------------------------------------------------------
+-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model
diff --git a/src/roster-editor/src/View/SubMenu/Status.elm b/src/roster-editor/src/View/SubMenu/Status.elm
deleted file mode 100644
index afb9f09..0000000
--- a/src/roster-editor/src/View/SubMenu/Status.elm
+++ /dev/null
@@ -1,55 +0,0 @@
-module View.SubMenu.Status exposing (get_html)
-
--- Elm -------------------------------------------------------------------------
-import Array
-
-import Html
-import Html.Attributes
-import Html.Lazy
-
--- Struct.Map -------------------------------------------------------------------
-import Struct.Event
-import Struct.Location
-import Struct.Model
-import Struct.UI
-
-import View.SubMenu.Status.CharacterInfo
-import View.SubMenu.Status.TileInfo
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type)
-get_html model =
- (Html.div
- [
- (Html.Attributes.class "footer-tabmenu-content"),
- (Html.Attributes.class "footer-tabmenu-content-status")
- ]
- [
- (case (Struct.UI.get_previous_action model.ui) of
- (Just (Struct.UI.SelectedLocation loc)) ->
- (View.SubMenu.Status.TileInfo.get_html
- model
- (Struct.Location.from_ref loc)
- )
-
- (Just (Struct.UI.SelectedCharacter target_char)) ->
- case (Array.get target_char model.characters) of
- (Just char) ->
- (Html.Lazy.lazy2
- (View.SubMenu.Status.CharacterInfo.get_html)
- model.player_ix
- char
- )
-
- _ -> (Html.text "Error: Unknown character selected.")
-
- _ ->
- (Html.text "Nothing is being focused.")
- )
- ]
- )
diff --git a/src/roster-editor/src/View/SubMenu/Status/CharacterInfo.elm b/src/roster-editor/src/View/SubMenu/Status/CharacterInfo.elm
deleted file mode 100644
index 094b8d0..0000000
--- a/src/roster-editor/src/View/SubMenu/Status/CharacterInfo.elm
+++ /dev/null
@@ -1,34 +0,0 @@
-module View.SubMenu.Status.CharacterInfo exposing (get_html)
-
--- Elm -------------------------------------------------------------------------
-import Html
-import Html.Attributes
-
--- Struct.Map -------------------------------------------------------------------
-import Struct.Character
-import Struct.Event
-
-import View.Controlled.CharacterCard
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html : (
- Int ->
- Struct.Character.Type ->
- (Html.Html Struct.Event.Type)
- )
-get_html player_ix char =
- (Html.div
- [
- (Html.Attributes.class "tabmenu-character-info")
- ]
- [
- (Html.text ("Focusing:")),
- (View.Controlled.CharacterCard.get_full_html player_ix char)
- ]
- )
diff --git a/src/roster-editor/src/View/SubMenu/Status/TileInfo.elm b/src/roster-editor/src/View/SubMenu/Status/TileInfo.elm
deleted file mode 100644
index bc382fc..0000000
--- a/src/roster-editor/src/View/SubMenu/Status/TileInfo.elm
+++ /dev/null
@@ -1,181 +0,0 @@
-module View.SubMenu.Status.TileInfo exposing (get_html)
-
--- Elm -------------------------------------------------------------------------
-import Dict
-
-import Html
-import Html.Attributes
-
--- Battle ----------------------------------------------------------------------
-import Constants.Movement
-
-import Struct.Map
-import Struct.Event
-import Struct.Location
-import Struct.Omnimods
-import Struct.Model
-import Struct.Tile
-
-import Util.Html
-
-import View.Map.Tile
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_icon : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
-get_icon tile =
- (Html.div
- [
- (Html.Attributes.class "tile-card-icon"),
- (Html.Attributes.class "info-card-picture"),
- (Html.Attributes.class
- (
- "tile-variant-"
- ++ (String.fromInt (Struct.Tile.get_local_variant_ix tile))
- )
- )
- ]
- (View.Map.Tile.get_content_html tile)
- )
-
-get_name : (
- Struct.Model.Type ->
- Struct.Tile.Instance ->
- (Html.Html Struct.Event.Type)
- )
-get_name model tile =
- case (Dict.get (Struct.Tile.get_type_id tile) model.tiles) of
- Nothing -> (Util.Html.nothing)
- (Just tile_type) ->
- (Html.div
- [
- (Html.Attributes.class "info-card-name"),
- (Html.Attributes.class "info-card-text-field"),
- (Html.Attributes.class "tile-card-name")
- ]
- [
- (Html.text (Struct.Tile.get_name tile_type))
- ]
- )
-
-get_cost : Struct.Tile.Instance -> (Html.Html Struct.Event.Type)
-get_cost tile =
- let
- cost = (Struct.Tile.get_instance_cost tile)
- text =
- if (cost > Constants.Movement.max_points)
- then
- "Obstructed"
- else
- ("Cost: " ++ (String.fromInt cost))
- in
- (Html.div
- [
- (Html.Attributes.class "info-card-text-field"),
- (Html.Attributes.class "tile-card-cost")
- ]
- [
- (Html.text text)
- ]
- )
-
-get_location : Struct.Tile.Instance -> (Html.Html Struct.Event.Type)
-get_location tile =
- let
- tile_location = (Struct.Tile.get_location tile)
- in
- (Html.div
- [
- (Html.Attributes.class "info-card-text-field"),
- (Html.Attributes.class "tile-card-location")
- ]
- [
- (Html.text
- (
- "{x: "
- ++ (String.fromInt tile_location.x)
- ++ "; y: "
- ++ (String.fromInt tile_location.y)
- ++ "}"
- )
- )
- ]
- )
-
-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.text
- (category ++ ": " ++ (String.fromInt value))
- )
- ]
- )
-
-get_omnimods_listing : (List (String, Int)) -> (Html.Html Struct.Event.Type)
-get_omnimods_listing mod_list =
- (Html.div
- [
- (Html.Attributes.class "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 "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 --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html : (
- Struct.Model.Type ->
- Struct.Location.Type ->
- (Html.Html Struct.Event.Type)
- )
-get_html model loc =
- case (Struct.Map.try_getting_tile_at loc model.map) of
- (Just tile) ->
- (Html.div
- [
- (Html.Attributes.class "info-card"),
- (Html.Attributes.class "tile-card")
- ]
- [
- (get_name model tile),
- (Html.div
- [
- (Html.Attributes.class "info-card-top"),
- (Html.Attributes.class "tile-card-top")
- ]
- [
- (get_icon tile),
- (get_location tile),
- (get_cost tile)
- ]
- ),
- (get_omnimods ((Struct.Model.tile_omnimods_fun model) loc))
- ]
- )
-
- Nothing -> (Html.text "Error: Unknown tile location selected.")
diff --git a/src/roster-editor/src/View/WeaponSelection.elm b/src/roster-editor/src/View/WeaponSelection.elm
index 4408627..2f6f514 100644
--- a/src/roster-editor/src/View/WeaponSelection.elm
+++ b/src/roster-editor/src/View/WeaponSelection.elm
@@ -10,14 +10,17 @@ import Html.Events
-- Shared ----------------------------------------------------------------------
import Util.Html
--- Roster Editor ---------------------------------------------------------------
+-- Battle ----------------------------------------------------------------------
+import Battle.View.Omnimods
+
+-- Battle Characters -----------------------------------------------------------
+import BattleCharacters.Struct.Weapon
+
+-- Local Module ----------------------------------------------------------------
import Struct.Character
import Struct.Event
import Struct.Model
-import Struct.Omnimods
-import Struct.Weapon
-import View.Omnimods
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -44,7 +47,7 @@ get_mod_html mod =
)
get_weapon_html : (
- Struct.Weapon.Type ->
+ BattleCharacters.Struct.Weapon.Type ->
(Html.Html Struct.Event.Type)
)
get_weapon_html weapon =
@@ -53,7 +56,9 @@ get_weapon_html weapon =
(Html.Attributes.class "character-card-weapon"),
(Html.Attributes.class "clickable"),
(Html.Events.onClick
- (Struct.Event.SelectedWeapon (Struct.Weapon.get_id weapon))
+ (Struct.Event.SelectedWeapon
+ (BattleCharacters.Struct.Weapon.get_id weapon)
+ )
)
]
[
@@ -66,7 +71,9 @@ get_weapon_html weapon =
[
]
[
- (Html.text (Struct.Weapon.get_name weapon))
+ (Html.text
+ (BattleCharacters.Struct.Weapon.get_name weapon)
+ )
]
),
(Html.div
@@ -78,7 +85,9 @@ get_weapon_html weapon =
]
),
(Html.text
- (String.fromInt (Struct.Weapon.get_damage_sum weapon))
+ (String.fromInt
+ (BattleCharacters.Struct.Weapon.get_damage_sum weapon)
+ )
),
(Html.div
[
@@ -91,18 +100,24 @@ get_weapon_html weapon =
(Html.text
(
(String.fromInt
- (Struct.Weapon.get_defense_range weapon)
+ (BattleCharacters.Struct.Weapon.get_defense_range
+ weapon
+ )
)
++ "-"
++
(String.fromInt
- (Struct.Weapon.get_attack_range weapon)
+ (BattleCharacters.Struct.Weapon.get_attack_range
+ weapon
+ )
)
)
)
]
),
- (View.Omnimods.get_html (Struct.Weapon.get_omnimods weapon))
+ (Battle.View.Omnimods.get_html
+ (BattleCharacters.Struct.Weapon.get_omnimods weapon)
+ )
]
)
@@ -142,7 +157,10 @@ get_html model =
(not
(
is_selecting_secondary
- && (Struct.Weapon.get_is_primary e)
+ &&
+ (BattleCharacters.Struct.Weapon.get_is_primary
+ e
+ )
)
)
)