| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-09-07 18:38:01 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-09-07 18:38:01 +0200 | 
| commit | 7cba3a16cb13f8e56f39b434d6278d68e2118145 (patch) | |
| tree | ad435bfd82d63e3206346009e21da4498a95c325 | |
| parent | 73ac90d7f5312d887ad76b154bfee7a496a83faa (diff) | |
Adds "Undo" action, (move?.(attack+switch_wp)?)
| -rw-r--r-- | src/battle/src/Comm/CharacterTurn.elm | 2 | ||||
| -rw-r--r-- | src/battle/src/ElmModule/Update.elm | 6 | ||||
| -rw-r--r-- | src/battle/src/Struct/CharacterTurn.elm | 86 | ||||
| -rw-r--r-- | src/battle/src/Struct/Event.elm | 9 | ||||
| -rw-r--r-- | src/battle/src/Struct/Navigator.elm | 38 | ||||
| -rw-r--r-- | src/battle/src/Struct/RangeIndicator.elm | 2 | ||||
| -rw-r--r-- | src/battle/src/Update/EndTurn.elm | 7 | ||||
| -rw-r--r-- | src/battle/src/Update/SelectCharacter.elm | 2 | ||||
| -rw-r--r-- | src/battle/src/Update/SwitchWeapon.elm | 75 | ||||
| -rw-r--r-- | src/battle/src/Update/UndoAction.elm | 134 | ||||
| -rw-r--r-- | src/battle/src/View/Controlled.elm | 37 | ||||
| -rw-r--r-- | src/battle/src/View/MessageBoard/Help/Guide.elm | 35 | 
12 files changed, 360 insertions, 73 deletions
| diff --git a/src/battle/src/Comm/CharacterTurn.elm b/src/battle/src/Comm/CharacterTurn.elm index 36dfd96..b59dd4c 100644 --- a/src/battle/src/Comm/CharacterTurn.elm +++ b/src/battle/src/Comm/CharacterTurn.elm @@ -87,8 +87,8 @@ encode_actions model =     of        ((Just move), Nothing, Nothing) -> [move]        ((Just move), Nothing, (Just attack)) -> [move, attack] +      ((Just move), (Just switch_weapon), Nothing) -> [move, switch_weapon]        (Nothing, (Just switch_weapon), Nothing) -> [switch_weapon] -      (Nothing, (Just switch_weapon), (Just attack)) -> [switch_weapon, attack]        (Nothing, Nothing, (Just attack)) -> [attack]        _ -> [] diff --git a/src/battle/src/ElmModule/Update.elm b/src/battle/src/ElmModule/Update.elm index 998d327..f9d7d38 100644 --- a/src/battle/src/ElmModule/Update.elm +++ b/src/battle/src/ElmModule/Update.elm @@ -2,7 +2,7 @@ module ElmModule.Update exposing (update)  -- Elm ------------------------------------------------------------------------- --- Map ------------------------------------------------------------------- +-- Battle ----------------------------------------------------------------------  import Struct.Event  import Struct.Model @@ -25,6 +25,7 @@ import Update.SetRequestedHelp  import Update.SwitchTeam  import Update.SwitchWeapon  import Update.TestAnimation +import Update.UndoAction  --------------------------------------------------------------------------------  -- LOCAL ----------------------------------------------------------------------- @@ -103,6 +104,9 @@ update event model =        Struct.Event.AbortTurnRequest ->           (Update.AbortTurn.apply_to new_model) +      Struct.Event.UndoActionRequest -> +         (Update.UndoAction.apply_to new_model) +        (Struct.Event.RequestedHelp help_request) ->           (Update.SetRequestedHelp.apply_to new_model help_request) diff --git a/src/battle/src/Struct/CharacterTurn.elm b/src/battle/src/Struct/CharacterTurn.elm index d31e21a..c832698 100644 --- a/src/battle/src/Struct/CharacterTurn.elm +++ b/src/battle/src/Struct/CharacterTurn.elm @@ -10,8 +10,11 @@ module Struct.CharacterTurn exposing        get_state,        try_getting_target,        lock_path, +      unlock_path, +      show_attack_range_navigator,        new,        set_active_character, +      set_active_character_no_reset,        set_navigator,        try_getting_active_character,        try_getting_navigator @@ -34,6 +37,7 @@ type State =     | SelectedCharacter     | MovedCharacter     | ChoseTarget +   | SwitchedWeapons  type alias Type =     { @@ -84,6 +88,16 @@ set_active_character char ct =        has_switched_weapons = False     } +set_active_character_no_reset : ( +      Struct.Character.Type -> +      Type -> +      Type +   ) +set_active_character_no_reset char ct = +   {ct | +      active_character = (Just char) +   } +  get_state : Type -> State  get_state ct = ct.state @@ -94,18 +108,62 @@ lock_path : (Struct.Location.Type -> Struct.Omnimods.Type) -> Type -> Type  lock_path tile_omnimods ct =     case (ct.navigator, ct.active_character) of        ((Just old_nav), (Just char)) -> +         let +            current_tile_omnimods = +               (tile_omnimods (Struct.Navigator.get_current_location old_nav)) +         in +            {ct | +               active_character = +                  (Just +                     (Struct.Character.refresh_omnimods +                        (\e -> current_tile_omnimods) +                        char +                     ) +                  ), +               state = MovedCharacter, +               path = (Struct.Navigator.get_path old_nav), +               target = Nothing, +               navigator = (Just (Struct.Navigator.lock_path old_nav)) +            } + +      (_, _) -> +         ct + +unlock_path : (Struct.Location.Type -> Struct.Omnimods.Type) -> Type -> Type +unlock_path tile_omnimods ct = +   case (ct.navigator, ct.active_character) of +      ((Just old_nav), (Just char)) ->           {ct |              active_character =                 (Just (Struct.Character.refresh_omnimods (tile_omnimods) char)),              state = MovedCharacter, -            path = (Struct.Navigator.get_path old_nav),              target = Nothing, -            navigator = (Just (Struct.Navigator.lock_path old_nav)) +            navigator = (Just (Struct.Navigator.unlock_path old_nav))           }        (_, _) ->           ct +show_attack_range_navigator : Int -> Int -> Type -> Type +show_attack_range_navigator range_min range_max ct = +   case ct.navigator of +      Nothing -> ct + +      (Just old_nav) -> +            {ct | +               state = MovedCharacter, +               path = (Struct.Navigator.get_path old_nav), +               target = Nothing, +               navigator = +                  (Just +                     (Struct.Navigator.lock_path_with_new_attack_ranges +                        range_min +                        range_max +                        old_nav +                     ) +                  ) +            } +  try_getting_navigator : Type -> (Maybe Struct.Navigator.Type)  try_getting_navigator ct = ct.navigator @@ -121,7 +179,13 @@ set_navigator navigator ct =  set_has_switched_weapons : Bool -> Type -> Type  set_has_switched_weapons v ct =     {ct | -      has_switched_weapons = v +      has_switched_weapons = v, +      state = +         ( +            if (v) +            then SwitchedWeapons +            else MovedCharacter +         )     }  has_switched_weapons : Type -> Bool @@ -129,10 +193,18 @@ has_switched_weapons ct = ct.has_switched_weapons  set_target : (Maybe Int) -> Type -> Type  set_target target ct = -   {ct | -      state = ChoseTarget, -      target = target -   } +   case target of +      Nothing -> +         {ct | +            state = MovedCharacter, +            target = target +         } + +      _ -> +         {ct | +            state = ChoseTarget, +            target = target +         }  try_getting_target : Type -> (Maybe Int)  try_getting_target ct = ct.target diff --git a/src/battle/src/Struct/Event.elm b/src/battle/src/Struct/Event.elm index 6d3c133..3433c4a 100644 --- a/src/battle/src/Struct/Event.elm +++ b/src/battle/src/Struct/Event.elm @@ -3,7 +3,7 @@ module Struct.Event exposing (Type(..), attempted)  -- Elm -------------------------------------------------------------------------  import Http --- Map ------------------------------------------------------------------- +-- Battle ----------------------------------------------------------------------  import Struct.Direction  import Struct.Error  import Struct.Location @@ -19,23 +19,24 @@ type Type =     | AnimationEnded     | AttackWithoutMovingRequest     | CharacterInfoRequested Int +   | CharacterOrTileSelected Struct.Location.Ref     | CharacterSelected Int     | DebugLoadBattleRequest     | DebugTeamSwitchRequest     | DebugTestAnimation     | DirectionRequested Struct.Direction.Type     | Failed Struct.Error.Type +   | GoToMainMenu     | LookingForCharacter Int     | None +   | RequestedHelp Struct.HelpRequest.Type     | ScaleChangeRequested Float     | ServerReplied (Result Http.Error (List Struct.ServerReply.Type))     | TabSelected Struct.UI.Tab     | TileSelected Struct.Location.Ref -   | CharacterOrTileSelected Struct.Location.Ref     | TurnEnded -   | RequestedHelp Struct.HelpRequest.Type +   | UndoActionRequest     | WeaponSwitchRequest -   | GoToMainMenu  attempted : (Result.Result err val) -> Type  attempted act = diff --git a/src/battle/src/Struct/Navigator.elm b/src/battle/src/Struct/Navigator.elm index 571115d..41a60ef 100644 --- a/src/battle/src/Struct/Navigator.elm +++ b/src/battle/src/Struct/Navigator.elm @@ -11,6 +11,8 @@ module Struct.Navigator exposing        get_summary,        clear_path,        lock_path, +      unlock_path, +      lock_path_with_new_attack_ranges,        try_adding_step,        try_getting_path_to     ) @@ -18,7 +20,7 @@ module Struct.Navigator exposing  -- Elm -------------------------------------------------------------------------  import Dict --- Map ------------------------------------------------------------------- +-- Battle ----------------------------------------------------------------------  import Struct.Location  import Struct.Direction  import Struct.Marker @@ -32,8 +34,8 @@ type alias Type =     {        starting_location: Struct.Location.Type,        movement_dist: Int, -      attack_dist: Int,        defense_dist: Int, +      attack_dist: Int,        path: Struct.Path.Type,        locked_path: Bool,        range_indicators: @@ -67,7 +69,7 @@ new : (        (Struct.Location.Type -> Int) ->        Type     ) -new start_loc mov_dist atk_dist def_dist cost_fun = +new start_loc mov_dist def_dist atk_dist cost_fun =     {        starting_location = start_loc,        movement_dist = mov_dist, @@ -79,8 +81,8 @@ new start_loc mov_dist atk_dist def_dist cost_fun =           (Struct.RangeIndicator.generate              start_loc              mov_dist -            atk_dist              def_dist +            atk_dist              (cost_fun)           ),        cost_fun = cost_fun @@ -151,8 +153,36 @@ lock_path navigator =           (Struct.RangeIndicator.generate              (Struct.Path.get_current_location navigator.path)              0 +            navigator.defense_dist              navigator.attack_dist +            (navigator.cost_fun) +         ), +      locked_path = True +   } + +unlock_path : Type -> Type +unlock_path navigator = +   {navigator | +      range_indicators = +         (Struct.RangeIndicator.generate +            navigator.starting_location +            navigator.movement_dist              navigator.defense_dist +            navigator.attack_dist +            (navigator.cost_fun) +         ), +      locked_path = True +   } + +lock_path_with_new_attack_ranges : Int -> Int -> Type -> Type +lock_path_with_new_attack_ranges range_min range_max navigator = +   {navigator | +      range_indicators = +         (Struct.RangeIndicator.generate +            (Struct.Path.get_current_location navigator.path) +            0 +            range_min +            range_max              (navigator.cost_fun)           ),        locked_path = True diff --git a/src/battle/src/Struct/RangeIndicator.elm b/src/battle/src/Struct/RangeIndicator.elm index e78cecb..4669afd 100644 --- a/src/battle/src/Struct/RangeIndicator.elm +++ b/src/battle/src/Struct/RangeIndicator.elm @@ -309,7 +309,7 @@ generate : (        (Struct.Location.Type -> Int) ->        (Dict.Dict Struct.Location.Ref Type)     ) -generate location max_dist atk_range def_range cost_fun = +generate location max_dist def_range atk_range cost_fun =     (search        Dict.empty        (Dict.insert diff --git a/src/battle/src/Update/EndTurn.elm b/src/battle/src/Update/EndTurn.elm index cb60b92..8aa9e6f 100644 --- a/src/battle/src/Update/EndTurn.elm +++ b/src/battle/src/Update/EndTurn.elm @@ -75,6 +75,13 @@ apply_to model =        ) ->           (make_it_so model char nav) +      ( +         Struct.CharacterTurn.SwitchedWeapons, +         (Just char), +         (Just nav) +      ) -> +         (make_it_so model char nav) +        (Struct.CharacterTurn.SelectedCharacter, (Just char), (Just nav)) ->           (make_it_so model char nav) diff --git a/src/battle/src/Update/SelectCharacter.elm b/src/battle/src/Update/SelectCharacter.elm index 1137435..169046c 100644 --- a/src/battle/src/Update/SelectCharacter.elm +++ b/src/battle/src/Update/SelectCharacter.elm @@ -41,8 +41,8 @@ get_character_navigator model char =           (Struct.Statistics.get_movement_points              (Struct.Character.get_statistics char)           ) -         (Struct.Weapon.get_attack_range weapon)           (Struct.Weapon.get_defense_range weapon) +         (Struct.Weapon.get_attack_range weapon)           (Struct.Map.get_movement_cost_function              model.map              (Struct.Character.get_location char) diff --git a/src/battle/src/Update/SwitchWeapon.elm b/src/battle/src/Update/SwitchWeapon.elm index f265bcb..5e81f4c 100644 --- a/src/battle/src/Update/SwitchWeapon.elm +++ b/src/battle/src/Update/SwitchWeapon.elm @@ -1,16 +1,14 @@  module Update.SwitchWeapon exposing (apply_to) +  -- Elm ------------------------------------------------------------------------- -import Array --- Map ------------------------------------------------------------------- -import Struct.Map +-- Battle ----------------------------------------------------------------------  import Struct.Character  import Struct.CharacterTurn  import Struct.Error  import Struct.Event  import Struct.Model  import Struct.Navigator -import Struct.Statistics  import Struct.Weapon  import Struct.WeaponSet @@ -19,57 +17,51 @@ import Struct.WeaponSet  --------------------------------------------------------------------------------  make_it_so : Struct.Model.Type -> Struct.Model.Type  make_it_so model = -   case (Struct.CharacterTurn.try_getting_active_character model.char_turn) of -      (Just char) -> +   case +      ( +         (Struct.CharacterTurn.try_getting_active_character model.char_turn), +         (Struct.CharacterTurn.try_getting_navigator model.char_turn) +      ) +   of +      ((Just char), (Just nav)) ->           let +            tile_omnimods = (Struct.Model.tile_omnimods_fun model) +            current_tile_omnimods = +               (tile_omnimods (Struct.Navigator.get_current_location nav))              new_weapons =                 (Struct.WeaponSet.switch_weapons                    (Struct.Character.get_weapons char)                 ) -            new_char = (Struct.Character.set_weapons new_weapons char) +            new_main_weapon = (Struct.WeaponSet.get_active_weapon new_weapons) +            new_char = +               (Struct.Character.refresh_omnimods +                  (\e -> current_tile_omnimods) +                  (Struct.Character.set_weapons new_weapons char) +               )           in -         {model | -            char_turn = -               (Struct.CharacterTurn.set_has_switched_weapons -                  True -                  (Struct.CharacterTurn.lock_path -                     (Struct.Model.tile_omnimods_fun model) -                     (Struct.CharacterTurn.set_navigator -                        (Struct.Navigator.new -                           (Struct.Character.get_location new_char) -                           (Struct.Statistics.get_movement_points -                              (Struct.Character.get_statistics new_char) -                           ) -                           (Struct.Weapon.get_attack_range -                              (Struct.WeaponSet.get_active_weapon new_weapons) -                           ) -                           (Struct.Weapon.get_defense_range -                              (Struct.WeaponSet.get_active_weapon new_weapons) -                           ) -                           (Struct.Map.get_movement_cost_function -                              model.map -                              (Struct.Character.get_location new_char) -                              (Array.toList model.characters) -                           ) -                        ) -                        (Struct.CharacterTurn.set_active_character +            {model | +               char_turn = +                  (Struct.CharacterTurn.set_has_switched_weapons +                     True +                     (Struct.CharacterTurn.show_attack_range_navigator +                        (Struct.Weapon.get_defense_range new_main_weapon) +                        (Struct.Weapon.get_attack_range new_main_weapon) +                        (Struct.CharacterTurn.set_active_character_no_reset                             new_char                             model.char_turn                          )                       )                    ) -               ) -         } +            } -      _ -> +      (_, _) ->           (Struct.Model.invalidate              (Struct.Error.new                 Struct.Error.Programming -               ( -                  "CharacterTurn structure in the 'SelectedCharacter' state" -                  ++ " without character being selected." -               ) -            ) +               """ +               CharacterTurn structure in the 'SelectedCharacter' or +               'MovedCharacter' state without any character being selected. +               """)              model           ) @@ -85,6 +77,9 @@ apply_to model =        Struct.CharacterTurn.SelectedCharacter ->           ((make_it_so model), Cmd.none) +      Struct.CharacterTurn.MovedCharacter -> +         ((make_it_so model), Cmd.none) +        _ ->           (              (Struct.Model.invalidate diff --git a/src/battle/src/Update/UndoAction.elm b/src/battle/src/Update/UndoAction.elm new file mode 100644 index 0000000..e422bca --- /dev/null +++ b/src/battle/src/Update/UndoAction.elm @@ -0,0 +1,134 @@ +module Update.UndoAction exposing (apply_to) + +-- Elm ------------------------------------------------------------------------- +import Array + +-- Battle ---------------------------------------------------------------------- +import Struct.Map +import Struct.Character +import Struct.CharacterTurn +import Struct.Event +import Struct.Model +import Struct.Navigator +import Struct.Statistics +import Struct.Weapon +import Struct.WeaponSet + +-------------------------------------------------------------------------------- +-- LOCAL ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_character_navigator : ( +      Struct.Model.Type -> +      Struct.Character.Type -> +      Struct.Navigator.Type +   ) +get_character_navigator model char = +   let +      weapon = +         (Struct.WeaponSet.get_active_weapon +            (Struct.Character.get_weapons char) +         ) +   in +      (Struct.Navigator.new +         (Struct.Character.get_location char) +         (Struct.Statistics.get_movement_points +            (Struct.Character.get_statistics char) +         ) +         (Struct.Weapon.get_defense_range weapon) +         (Struct.Weapon.get_attack_range weapon) +         (Struct.Map.get_movement_cost_function +            model.map +            (Struct.Character.get_location char) +            (Array.toList model.characters) +         ) +      ) + +handle_reset_character_turn : Struct.Model.Type -> Struct.CharacterTurn.Type +handle_reset_character_turn model = +   case (Struct.CharacterTurn.try_getting_active_character model.char_turn) of +      Nothing -> model.char_turn + +      (Just current_char) -> +         case +            (Array.get +               (Struct.Character.get_index current_char) +               model.characters +            ) +         of +            Nothing -> model.char_turn + +            (Just reset_char) -> +               (Struct.CharacterTurn.set_navigator +                  (get_character_navigator model reset_char) +                  (Struct.CharacterTurn.set_active_character +                     reset_char +                     (Struct.CharacterTurn.new) +                  ) +               ) + +handle_undo_switched_weapons : Struct.Model.Type -> Struct.CharacterTurn.Type +handle_undo_switched_weapons model = +   case (Struct.CharacterTurn.try_getting_active_character model.char_turn) of +      Nothing -> model.char_turn + +      (Just char) -> +         let +            new_weapons = +               (Struct.WeaponSet.switch_weapons +                  (Struct.Character.get_weapons char) +               ) +            new_char = +               (Struct.Character.set_weapons new_weapons char) +            tile_omnimods = (Struct.Model.tile_omnimods_fun model) +         in +            (Struct.CharacterTurn.lock_path +               tile_omnimods +               (Struct.CharacterTurn.unlock_path +                  tile_omnimods +                  (Struct.CharacterTurn.set_has_switched_weapons +                     False +                     (Struct.CharacterTurn.set_active_character_no_reset +                        new_char +                        model.char_turn +                     ) +                  ) +               ) +            ) + +handle_undo_chose_target : Struct.Model.Type -> Struct.CharacterTurn.Type +handle_undo_chose_target model = +   let +      tile_omnimods = (Struct.Model.tile_omnimods_fun model) +   in +      (Struct.CharacterTurn.lock_path +         (tile_omnimods) +         (Struct.CharacterTurn.unlock_path +            (tile_omnimods) +            (Struct.CharacterTurn.set_target Nothing model.char_turn) +         ) +      ) + +-------------------------------------------------------------------------------- +-- EXPORTED -------------------------------------------------------------------- +-------------------------------------------------------------------------------- +apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type)) +apply_to model = +   ( +      {model | +         char_turn = +         ( +            case (Struct.CharacterTurn.get_state model.char_turn) of +               Struct.CharacterTurn.ChoseTarget -> +                  (handle_undo_chose_target model) + +               Struct.CharacterTurn.SwitchedWeapons -> +                  (handle_undo_switched_weapons model) + +               Struct.CharacterTurn.MovedCharacter -> +                  (handle_reset_character_turn model) + +               _ -> model.char_turn +         ) +      }, +      Cmd.none +   ) diff --git a/src/battle/src/View/Controlled.elm b/src/battle/src/View/Controlled.elm index e0e20bf..d0c33a5 100644 --- a/src/battle/src/View/Controlled.elm +++ b/src/battle/src/View/Controlled.elm @@ -47,6 +47,13 @@ abort_button =        [ (Html.text "Abort") ]     ) +undo_button : (Html.Html Struct.Event.Type) +undo_button = +   (Html.button +      [ (Html.Events.onClick Struct.Event.UndoActionRequest) ] +      [ (Html.text "Undo") ] +   ) +  end_turn_button : String -> (Html.Html Struct.Event.Type)  end_turn_button suffix =     (Html.button @@ -57,11 +64,19 @@ end_turn_button suffix =        [ (Html.text ("End Turn" ++ suffix)) ]     ) -inventory_button : (Html.Html Struct.Event.Type) -inventory_button = +inventory_button : Bool -> (Html.Html Struct.Event.Type) +inventory_button go_prefix =     (Html.button        [ (Html.Events.onClick Struct.Event.WeaponSwitchRequest) ] -      [ (Html.text "Switch Weapon") ] +      [ +         (Html.text +            ( +               if (go_prefix) +               then ("Go & Switch Weapon") +               else ("Switch Weapon") +            ) +         ) +      ]     )  get_available_actions : ( @@ -73,20 +88,30 @@ get_available_actions char_turn =        Struct.CharacterTurn.SelectedCharacter ->           [              (attack_button char_turn), -            (inventory_button), +            (inventory_button (has_a_path char_turn)),              (end_turn_button " Doing Nothing"),              (abort_button)           ]        Struct.CharacterTurn.MovedCharacter ->           [ -            (end_turn_button " Without Attacking"), +            (inventory_button False), +            (end_turn_button " by Moving"), +            (undo_button),              (abort_button)           ]        Struct.CharacterTurn.ChoseTarget ->           [ -            (end_turn_button " By Attacking"), +            (end_turn_button " by Attacking"), +            (undo_button), +            (abort_button) +         ] + +      Struct.CharacterTurn.SwitchedWeapons -> +         [ +            (end_turn_button " by Switching Weapons"), +            (undo_button),              (abort_button)           ] diff --git a/src/battle/src/View/MessageBoard/Help/Guide.elm b/src/battle/src/View/MessageBoard/Help/Guide.elm index 0a41e91..7268c12 100644 --- a/src/battle/src/View/MessageBoard/Help/Guide.elm +++ b/src/battle/src/View/MessageBoard/Help/Guide.elm @@ -41,12 +41,13 @@ get_selected_character_html_contents =  get_moved_character_html_contents : (List (Html.Html Struct.Event.Type))  get_moved_character_html_contents =     [ -      (get_header_html "Selecting a Target"), +      (get_header_html "Selecting an Action"),        (Html.text           ( -            "You can now choose a target in range. Dashed tiles indicate" -            ++ " where your character will not be able to defend themselves" -            ++ " against counter attacks." +            """You can now choose an action for this character. Either attack + a target in range by clicking twice on it, or switch weapons by using the menu + on the left. Dashes indicate tiles this character will be unable to defend + from. Crossed shields indicate the equivalent for the current selection."""           )        )     ] @@ -54,12 +55,27 @@ get_moved_character_html_contents =  get_chose_target_html_contents : (List (Html.Html Struct.Event.Type))  get_chose_target_html_contents =     [ -      (get_header_html "Finalizing the Character's Turn"), +      (get_header_html "End the Turn by an Attack"),        (Html.text           ( -            "If you are satisfied with your choices, you can end this" -            ++ " character's turn and see the results unfold. Otherwise, click" -            ++ " on the abort button to undo it all." +            """A target for the attack has been selected. If you are satisfied +with your choices, you can end this character's turn and see the results unfold. +Otherwise, click on the "Undo" button to change the action, or the "Abort" +button to start this turn over.""" +         ) +      ) +   ] + +get_switched_weapons_html_contents : (List (Html.Html Struct.Event.Type)) +get_switched_weapons_html_contents = +   [ +      (get_header_html "End the Turn by Switching Weapons"), +      (Html.text +         ( +            """The character will switch weapons. If you are satisfied +with your choices, you can end this character's turn and see the results unfold. +Otherwise, click on the "Undo" button to change the action, or the "Abort" +button to start this turn over."""           )        )     ] @@ -96,5 +112,8 @@ get_html_contents model =        Struct.CharacterTurn.ChoseTarget ->           (get_chose_target_html_contents) +      Struct.CharacterTurn.SwitchedWeapons -> +         (get_switched_weapons_html_contents) +        _ ->           (get_default_html_contents) | 


