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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
module Battle.Lang.English exposing (..)
-- Elm -------------------------------------------------------------------------
import Html
import Html.Attributes
import Html.Events
-- Battle ----------------------------------------------------------------------
import Battle.Struct.Statistics
import Battle.Struct.DamageType
-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.HelpRequest
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Nouns -----------------------------------------------------------------------
max_health : String
max_health = "Max. Health"
movement_points : String
movement_points = "Movement Points"
dodges : String
dodges = "Dodge Chance"
parries : String
parries = "Parry Chance"
accuracy : String
accuracy = "Accuracy"
double_hits : String
double_hits = "Double Hit Chance"
critical_hits : String
critical_hits = "Critical Hit Chance"
damage_modifier : String
damage_modifier = "Damage Multiplier"
---- Damage Types --------------------------------------------------------------
slash : String
slash = "Slashing Damage"
blunt : String
blunt = "Bludgeoning Damage"
pierce : String
pierce = "Piercing Damage"
base : String
base = "Universal Damage"
-- Help ------------------------------------------------------------------------
---- Statistics ----------------------------------------------------------------
max_health_help : (Html.Html Struct.Event.Type)
max_health_help =
(Html.div
[
]
[
(Html.text
"""
Maximum Health is the maximum amount of hit points the character can
have.
"""
)
]
)
movement_points_help : (Html.Html Struct.Event.Type)
movement_points_help =
(Html.div
[
]
[
(Html.text
"""
Movement Points are an indication of how much this character can
move every turn.
"""
)
]
)
dodges_help : (Html.Html Struct.Event.Type)
dodges_help =
(Html.div
[
]
[
(Html.text
"""
Dodge Chance is the base chance for this character to completely
avoid an incoming attack. The actual chance is Dodge Chance minus
the opponent's
"""
),
(get_stats_reference_html Battle.Struct.Statistics.Accuracy),
(Html.text
""". Multiply by two to get the chance of at least avoiding
partially (taking only half damage) an attack.
"""
)
]
)
parries_help : (Html.Html Struct.Event.Type)
parries_help =
(Html.div
[
]
[
(Html.text
"""
Parry Chance indicates how likely it is for this characters to void
an incoming attack and replace it by one of their own. This requires
a melee weapon. Attacks of Opportunity cannot be parried.
"""
)
]
)
accuracy_help : (Html.Html Struct.Event.Type)
accuracy_help =
(Html.div
[
]
[
(Html.text
"Accuracy lowers the target's chance to evade an incoming blow ("
),
(get_stats_reference_html Battle.Struct.Statistics.Dodges),
(Html.text ").")
]
)
double_hits_help : (Html.Html Struct.Event.Type)
double_hits_help =
(Html.div
[
]
[
(Html.text
"""
Double Hit Chance indicate how likely this character is to perform
a follow-up attack (which takes place after their target's
retaliation, if there is any).
"""
)
]
)
critical_hits_help : (Html.Html Struct.Event.Type)
critical_hits_help =
(Html.div
[
]
[
(Html.text
"""
Critical Hit Chance indicate how likely this character is to perform
an attack with double the damage.
"""
)
]
)
damage_modifier_help : (Html.Html Struct.Event.Type)
damage_modifier_help =
(Html.div
[
]
[
(Html.text
"""
Increases or decreases (if lower than 100%) the damage of all of
this character's attacks.
"""
)
]
)
get_stats_reference_html : (
Battle.Struct.Statistics.Category ->
(Html.Html Struct.Event.Type)
)
get_stats_reference_html cat =
(Html.div
[
(Html.Attributes.class "tooltip-reference"),
(Html.Events.onClick
(Struct.Event.RequestedHelp
(Struct.HelpRequest.Statistic cat)
)
)
]
[
(Html.div
[
(Html.Attributes.class "omnimod-icon"),
(Html.Attributes.class
(
"omnimod-icon-"
++ (Battle.Struct.Statistics.encode_category cat)
)
)
]
[
]
),
(Html.text (get_statistic_name cat))
]
)
---- Damage Types --------------------------------------------------------------
slash_help : (Html.Html Struct.Event.Type)
slash_help =
(Html.div
[
]
[
(Html.text "Tis but a scratch. You had worse.")
]
)
blunt_help : (Html.Html Struct.Event.Type)
blunt_help =
(Html.div
[
]
[
(Html.text "At least words will never harm you.")
]
)
pierce_help : (Html.Html Struct.Event.Type)
pierce_help =
(Html.div
[
]
[
(Html.text "Improves your aerodynamics.")
]
)
base_help : (Html.Html Struct.Event.Type)
base_help =
(Html.div
[
]
[
(Html.text
"Defensive only. This is applied to every type of incoming damage."
)
]
)
get_statistic_name : Battle.Struct.Statistics.Category -> String
get_statistic_name cat =
case cat of
Battle.Struct.Statistics.MaxHealth -> (max_health)
Battle.Struct.Statistics.MovementPoints -> (movement_points)
Battle.Struct.Statistics.Dodges -> (dodges)
Battle.Struct.Statistics.Parries -> (parries)
Battle.Struct.Statistics.Accuracy -> (accuracy)
Battle.Struct.Statistics.DoubleHits -> (double_hits)
Battle.Struct.Statistics.CriticalHits -> (critical_hits)
Battle.Struct.Statistics.DamageModifier -> (damage_modifier)
get_statistic_category_help : (
Battle.Struct.Statistics.Category ->
(String, (Html.Html Struct.Event.Type))
)
get_statistic_category_help cat =
case cat of
Battle.Struct.Statistics.MaxHealth ->
((max_health), (max_health_help))
Battle.Struct.Statistics.MovementPoints ->
((movement_points), (movement_points_help))
Battle.Struct.Statistics.Dodges ->
((dodges), (dodges_help))
Battle.Struct.Statistics.Parries ->
((parries), (parries_help))
Battle.Struct.Statistics.Accuracy ->
((accuracy), (accuracy_help))
Battle.Struct.Statistics.DoubleHits ->
((double_hits), (double_hits_help))
Battle.Struct.Statistics.CriticalHits ->
((critical_hits), (critical_hits_help))
Battle.Struct.Statistics.DamageModifier ->
((damage_modifier), (damage_modifier_help))
get_damage_type_help : (
Battle.Struct.DamageType.Type ->
(String, (Html.Html Struct.Event.Type))
)
get_damage_type_help cat =
case cat of
Battle.Struct.DamageType.Base ->
((base), (base_help))
Battle.Struct.DamageType.Slash ->
((slash), (slash_help))
Battle.Struct.DamageType.Blunt ->
((blunt), (blunt_help))
Battle.Struct.DamageType.Pierce ->
((pierce), (pierce_help))
_ -> ("None Damage", (Html.div [] [(Html.text "Should not appear.")]))
|