summaryrefslogtreecommitdiff
blob: 7268c12433ee3e6474bcd5624c829cc7ad12063f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module View.MessageBoard.Help.Guide exposing (get_html_contents)

-- Elm -------------------------------------------------------------------------
import Html
import Html.Attributes

-- Map -------------------------------------------------------------------
import Struct.CharacterTurn
import Struct.Event
import Struct.Model

--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
get_header_html : (String -> (Html.Html Struct.Event.Type))
get_header_html title =
   (Html.h1
      []
      [
         (Html.div
            [(Html.Attributes.class "battle-help-guide-icon")]
            []
         ),
         (Html.text title)
      ]
   )

get_selected_character_html_contents : (List (Html.Html Struct.Event.Type))
get_selected_character_html_contents =
   [
      (get_header_html "Controlling a Character"),
      (Html.text
         (
            "Click on a target tile to select a path or use the manual"
            ++ " controls (on the left panel) to make your own. Click on the"
            ++ " destination tile again to confirm (this can be reverted)."
         )
      )
   ]

get_moved_character_html_contents : (List (Html.Html Struct.Event.Type))
get_moved_character_html_contents =
   [
      (get_header_html "Selecting an Action"),
      (Html.text
         (
            """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."""
         )
      )
   ]

get_chose_target_html_contents : (List (Html.Html Struct.Event.Type))
get_chose_target_html_contents =
   [
      (get_header_html "End the Turn by an Attack"),
      (Html.text
         (
            """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."""
         )
      )
   ]

get_default_html_contents : (List (Html.Html Struct.Event.Type))
get_default_html_contents =
   [
      (get_header_html "Selecting a Character"),
      (Html.text
         (
            "Click once on a character to focus them. This will show you"
            ++ " their stats, equipment, and other infos. If they are in"
            ++ " your team and active (the pulsating characters),"
            ++ " clicking on them again will let you take control."
         )
      )
   ]

--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
get_html_contents : (
      Struct.Model.Type ->
      (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)

      Struct.CharacterTurn.MovedCharacter ->
         (get_moved_character_html_contents)

      Struct.CharacterTurn.ChoseTarget ->
         (get_chose_target_html_contents)

      Struct.CharacterTurn.SwitchedWeapons ->
         (get_switched_weapons_html_contents)

      _ ->
         (get_default_html_contents)