summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle')
-rw-r--r--src/battle/src/Update/Character/LookForCharacter.elm4
-rw-r--r--src/battle/src/Update/CharacterTurn/SwitchWeapon.elm5
-rw-r--r--src/battle/src/Update/HandleServerReply.elm4
-rw-r--r--src/battle/src/Update/Puppeteer.elm5
-rw-r--r--src/battle/src/Update/SetRequestedHelp.elm4
-rw-r--r--src/battle/src/Update/UI/ChangeScale.elm4
-rw-r--r--src/battle/src/Update/UI/SelectTab.elm4
-rw-r--r--src/battle/src/View/MessageBoard/Help/Guide.elm24
8 files changed, 21 insertions, 33 deletions
diff --git a/src/battle/src/Update/Character/LookForCharacter.elm b/src/battle/src/Update/Character/LookForCharacter.elm
index 49f788d..791ad21 100644
--- a/src/battle/src/Update/Character/LookForCharacter.elm
+++ b/src/battle/src/Update/Character/LookForCharacter.elm
@@ -35,11 +35,11 @@ scroll_to_char model char_ix =
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
apply_to : (
- Struct.Model.Type ->
Int ->
+ Struct.Model.Type ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
-apply_to model target_ix =
+apply_to target_ix model =
(
{model |
ui =
diff --git a/src/battle/src/Update/CharacterTurn/SwitchWeapon.elm b/src/battle/src/Update/CharacterTurn/SwitchWeapon.elm
index 632e10c..973ac36 100644
--- a/src/battle/src/Update/CharacterTurn/SwitchWeapon.elm
+++ b/src/battle/src/Update/CharacterTurn/SwitchWeapon.elm
@@ -20,10 +20,7 @@ import Util.Navigator
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-apply_to : (
- Struct.Model.Type ->
- (Struct.Model.Type, (Cmd Struct.Event.Type))
- )
+apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
apply_to model =
case (Struct.CharacterTurn.maybe_get_active_character model.char_turn) of
(Just char) ->
diff --git a/src/battle/src/Update/HandleServerReply.elm b/src/battle/src/Update/HandleServerReply.elm
index a5b026c..eb5e612 100644
--- a/src/battle/src/Update/HandleServerReply.elm
+++ b/src/battle/src/Update/HandleServerReply.elm
@@ -270,11 +270,11 @@ server_command_to_update server_command =
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
apply_to : (
- Struct.Model.Type ->
(Result Http.Error (List Struct.ServerReply.Type)) ->
+ Struct.Model.Type ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
-apply_to model query_result =
+apply_to query_result model =
case query_result of
(Result.Err error) ->
(
diff --git a/src/battle/src/Update/Puppeteer.elm b/src/battle/src/Update/Puppeteer.elm
index dcdefcc..f4fa8dd 100644
--- a/src/battle/src/Update/Puppeteer.elm
+++ b/src/battle/src/Update/Puppeteer.elm
@@ -166,10 +166,7 @@ apply_effects_backward effects model =
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-apply_to : (
- Struct.Model.Type ->
- (Struct.Model.Type, (Cmd Struct.Event.Type))
- )
+apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
apply_to model =
case (Struct.Puppeteer.maybe_get_current_action model.puppeteer) of
Nothing -> (model, (Cmd.none))
diff --git a/src/battle/src/Update/SetRequestedHelp.elm b/src/battle/src/Update/SetRequestedHelp.elm
index 6a56752..0010566 100644
--- a/src/battle/src/Update/SetRequestedHelp.elm
+++ b/src/battle/src/Update/SetRequestedHelp.elm
@@ -14,11 +14,11 @@ import Struct.Model
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
apply_to : (
- Struct.Model.Type ->
Struct.HelpRequest.Type ->
+ Struct.Model.Type ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
-apply_to model help_request =
+apply_to help_request model =
(
{model |
message_board =
diff --git a/src/battle/src/Update/UI/ChangeScale.elm b/src/battle/src/Update/UI/ChangeScale.elm
index b5884ff..cacde41 100644
--- a/src/battle/src/Update/UI/ChangeScale.elm
+++ b/src/battle/src/Update/UI/ChangeScale.elm
@@ -13,11 +13,11 @@ import Struct.UI
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
apply_to : (
- Struct.Model.Type ->
Float ->
+ Struct.Model.Type ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
-apply_to model mod =
+apply_to mod model =
if (mod == 0.0)
then ({model | ui = (Struct.UI.reset_zoom_level model.ui)}, Cmd.none)
else ({model | ui = (Struct.UI.mod_zoom_level mod model.ui)}, Cmd.none)
diff --git a/src/battle/src/Update/UI/SelectTab.elm b/src/battle/src/Update/UI/SelectTab.elm
index 37ab910..0c2d6de 100644
--- a/src/battle/src/Update/UI/SelectTab.elm
+++ b/src/battle/src/Update/UI/SelectTab.elm
@@ -13,11 +13,11 @@ import Struct.UI
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
apply_to : (
- Struct.Model.Type ->
Struct.UI.Tab ->
+ Struct.Model.Type ->
(Struct.Model.Type, (Cmd Struct.Event.Type))
)
-apply_to model tab =
+apply_to tab model =
if ((Struct.UI.maybe_get_displayed_tab model.ui) == (Just tab))
then
(
diff --git a/src/battle/src/View/MessageBoard/Help/Guide.elm b/src/battle/src/View/MessageBoard/Help/Guide.elm
index d60dd6b..1ebecb9 100644
--- a/src/battle/src/View/MessageBoard/Help/Guide.elm
+++ b/src/battle/src/View/MessageBoard/Help/Guide.elm
@@ -52,8 +52,8 @@ get_moved_character_html_contents =
)
]
-get_chose_target_html_contents : (List (Html.Html Struct.Event.Type))
-get_chose_target_html_contents =
+get_attacking_html_contents : (List (Html.Html Struct.Event.Type))
+get_attacking_html_contents =
[
(get_header_html "End the Turn by an Attack"),
(Html.text
@@ -66,8 +66,8 @@ button to start this turn over."""
)
]
-get_switched_weapons_html_contents : (List (Html.Html Struct.Event.Type))
-get_switched_weapons_html_contents =
+get_switching_weapons_html_contents : (List (Html.Html Struct.Event.Type))
+get_switching_weapons_html_contents =
[
(get_header_html "End the Turn by Switching Weapons"),
(Html.text
@@ -102,18 +102,12 @@ get_html_contents : (
(List (Html.Html Struct.Event.Type))
)
get_html_contents model =
- case (Struct.CharacterTurn.get_state model.char_turn) of
- Struct.CharacterTurn.SelectedCharacter ->
- (get_selected_character_html_contents)
+ case (Struct.CharacterTurn.get_action model.char_turn) of
+ Struct.CharacterTurn.Attacking ->
+ (get_attacking_html_contents)
- Struct.CharacterTurn.MovedCharacter ->
- (get_moved_character_html_contents)
-
- Struct.CharacterTurn.ChoseTarget ->
- (get_chose_target_html_contents)
-
- Struct.CharacterTurn.SwitchedWeapons ->
- (get_switched_weapons_html_contents)
+ Struct.CharacterTurn.SwitchingWeapons ->
+ (get_switching_weapons_html_contents)
_ ->
(get_default_html_contents)