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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
<meta charset="UTF-8">
<title>CRUSADER REX</title>
<link rel="icon" href="Cross_of_the_Knights_Templar.png">
<link rel="stylesheet" href="/fonts/fonts.css">
<link rel="stylesheet" href="/common/grid.css">
<link rel="stylesheet" href="/common/battle_abc.css">
<script defer src="/socket.io/socket.io.min.js"></script>
<script defer src="/common/client.js"></script>
<script defer src="data.js"></script>
<script defer src="ui.js"></script>
<style>
.grid_center { background-color: slategray; }
.grid_role { background-color: gainsboro; }
.grid_log { background-color: ghostwhite; }
.grid_top { background-color: gainsboro; }
.grid_top.your_turn { background-color: orange; }
.grid_top.Frank.your_turn { background-color: gold; }
.grid_top.Saracen.your_turn { background-color: lightgreen; }
.grid_top.disconnected { background-color: red; }
.role_info { background-color: silver; }
.one .role_name { background-color: khaki; }
.two .role_name { background-color: darkseagreen; }
#turn {
padding: 8px 0px 8px 8px;
border-bottom: 1px solid black;
white-space: pre-wrap;
font-style: italic;
font-size: 12px;
line-height: 18px;
font-family: "Source Serif SmText";
}
.card {
width: 225px;
height: 350px;
border-radius: 15px;
}
.card.enabled:hover {
transform: scale(1.1);
}
.small_card {
width: 90px;
height: 140px;
border-radius: 6px;
}
.role_info {
display: flex;
justify-content: center;
}
/* MAP */
.mapwrap {
box-shadow: 0px 1px 10px rgba(0,0,0,0.5);
width: 1275px;
height: 2475px;
}
.map {
position: relative;
background-repeat: no-repeat;
}
.map.tall {
width: 1275px;
height: 2475px;
background-image: url("map-v.jpg");
}
.map.wide {
width: 2475px;
height: 1275px;
background-image: url("map-h.jpg");
}
.map.crop.tall {
width: 1215px;
height: 2378px;
background-position: -30px -30px;
}
.map.crop.wide {
width: 2378px;
height: 1215px;
background-position: -30px -30px;
}
.map.hide_blocks div.blocks {
visibility: hidden;
}
.town {
position: absolute;
opacity: 0.0;
z-index: 1;
border: 5px solid white;
width: 60px;
height: 60px;
border-radius: 50%;
}
.town.highlight {
cursor: pointer;
opacity: 0.8;
z-index: 9;
}
.town.muster {
opacity: 0.8;
border-color: blue;
z-index: 9;
}
.town.muster.highlight {
box-shadow: 0 0 2px 4px white;
}
/* BLOCKS */
body.shift .block.known:hover {
transform: scale(2) !important;
transition: 100ms;
z-index: 100;
}
.battle .block { position: relative; }
.map .block { position: absolute; z-index: 2; }
.map .block.highlight { z-index: 3; }
.map .block.selected { z-index: 4; }
.map .block.known { z-index: 5; }
.map .block.known:hover { z-index: 6; }
.block {
background-size: cover;
background-repeat: no-repeat;
border-radius: 6px;
width: 60px;
height: 60px;
box-shadow: 0px 0px 4px 0px black;
}
.block.Frank { border: 3px solid darkkhaki; background-color: khaki; }
.block.Saracen { border: 3px solid seagreen; background-color: darkseagreen; }
.block.Assassins { border: 3px solid rebeccapurple; background-color: rebeccapurple; }
.block.Frank.highlight { border-color: white; }
.block.Saracen.highlight { border-color: white; }
.block.Assassins.highlight { border-color: white; }
.block.Frank.selected { border-color: gold; }
.block.Saracen.selected { border-color: lightgreen; }
.block.Assassins.selected { border-color: hotpink; }
.block.highlight { cursor: pointer; }
.block.highlight { box-shadow: 0px 0px 4px 1px white; }
.block.selected { box-shadow: 0 0 4px 1px white; }
.block.moved { filter: brightness(80%) grayscale(40%); }
.block.highlight.moved { filter: brightness(95%) grayscale(40%); }
.map .block.castle { border-color: #444; }
.block.r0 { transform: rotate(0deg); }
.block.r1 { transform: rotate(-90deg); }
.block.r2 { transform: rotate(-180deg); }
.block.r3 { transform: rotate(-270deg); }
.block.r0hh { transform: rotate(-30deg); }
.block.r1hh { transform: rotate(-120deg); }
.block.r2hh { transform: rotate(-210deg); }
.block.r3hh { transform: rotate(-300deg); }
.block {
transition-property: top, left, transform;
transition-duration: 700ms, 700ms, 200ms;
transition-timing-function: ease;
}
/* BATTLE BOARD */
.battle { background-color: darkgray; }
.battle .battle_message { background-color: gainsboro; }
.battle .battle_header { background-color: #224467; color: white; font-weight: bold; }
.battle .battle_separator { background-color: #224467; }
.battle_line.enemy .battle_menu_list { min-height: 0; }
.battle_line > td > div { min-width: 800px; }
.battle td { border: none; }
#FA, #FC, #FD, #FR, #EA, #EC, #ER { margin: 0px; }
#FC, #EC { background-color: gray; }
.battle .battle_menu { margin: 10px 5px; }
/* CARD AND BLOCK IMAGES */
.card_back{background-image:url('cards/card_back.jpg')}
.card_assassins{background-image:url('cards/card_assassins.jpg')}
.card_guide{background-image:url('cards/card_guide.jpg')}
.card_intrigue{background-image:url('cards/card_intrigue.jpg')}
.card_jihad{background-image:url('cards/card_jihad.jpg')}
.card_manna{background-image:url('cards/card_manna.jpg')}
.card_winter_campaign{background-image:url('cards/card_winter_campaign.jpg')}
.card_1{background-image:url('cards/card_1.jpg')}
.card_2{background-image:url('cards/card_2.jpg')}
.card_3{background-image:url('cards/card_3.jpg')}
.known.block_11{background-image:url(blocks/block_11.png)}
.known.block_12{background-image:url(blocks/block_12.png)}
.known.block_13{background-image:url(blocks/block_13.png)}
.known.block_14{background-image:url(blocks/block_14.png)}
.known.block_15{background-image:url(blocks/block_15.png)}
.known.block_16{background-image:url(blocks/block_16.png)}
.known.block_17{background-image:url(blocks/block_17.png)}
.known.block_21{background-image:url(blocks/block_21.png)}
.known.block_22{background-image:url(blocks/block_22.png)}
.known.block_23{background-image:url(blocks/block_23.png)}
.known.block_24{background-image:url(blocks/block_24.png)}
.known.block_25{background-image:url(blocks/block_25.png)}
.known.block_26{background-image:url(blocks/block_26.png)}
.known.block_27{background-image:url(blocks/block_27.png)}
.known.block_31{background-image:url(blocks/block_31.png)}
.known.block_32{background-image:url(blocks/block_32.png)}
.known.block_33{background-image:url(blocks/block_33.png)}
.known.block_34{background-image:url(blocks/block_34.png)}
.known.block_35{background-image:url(blocks/block_35.png)}
.known.block_36{background-image:url(blocks/block_36.png)}
.known.block_37{background-image:url(blocks/block_37.png)}
.known.block_41{background-image:url(blocks/block_41.png)}
.known.block_42{background-image:url(blocks/block_42.png)}
.known.block_43{background-image:url(blocks/block_43.png)}
.known.block_44{background-image:url(blocks/block_44.png)}
.known.block_45{background-image:url(blocks/block_45.png)}
.known.block_46{background-image:url(blocks/block_46.png)}
.known.block_47{background-image:url(blocks/block_47.png)}
.known.block_51{background-image:url(blocks/block_51.png)}
.known.block_52{background-image:url(blocks/block_52.png)}
.known.block_53{background-image:url(blocks/block_53.png)}
.known.block_54{background-image:url(blocks/block_54.png)}
.known.block_55{background-image:url(blocks/block_55.png)}
.known.block_56{background-image:url(blocks/block_56.png)}
.known.block_57{background-image:url(blocks/block_57.png)}
.known.block_61{background-image:url(blocks/block_61.png)}
.known.block_62{background-image:url(blocks/block_62.png)}
.known.block_63{background-image:url(blocks/block_63.png)}
.known.block_64{background-image:url(blocks/block_64.png)}
.known.block_65{background-image:url(blocks/block_65.png)}
.known.block_66{background-image:url(blocks/block_66.png)}
.known.block_67{background-image:url(blocks/block_67.png)}
.known.block_71{background-image:url(blocks/block_71.png)}
.known.block_72{background-image:url(blocks/block_72.png)}
.known.block_73{background-image:url(blocks/block_73.png)}
.known.block_74{background-image:url(blocks/block_74.png)}
.known.block_75{background-image:url(blocks/block_75.png)}
.known.block_76{background-image:url(blocks/block_76.png)}
.known.block_77{background-image:url(blocks/block_77.png)}
.known.block_81{background-image:url(blocks/block_81.png)}
.known.block_82{background-image:url(blocks/block_82.png)}
.known.block_83{background-image:url(blocks/block_83.png)}
.known.block_84{background-image:url(blocks/block_84.png)}
.known.block_85{background-image:url(blocks/block_85.png)}
.known.block_86{background-image:url(blocks/block_86.png)}
.known.block_87{background-image:url(blocks/block_87.png)}
.known.block_91{background-image:url(blocks/block_91.png)}
.known.block_92{background-image:url(blocks/block_92.png)}
.known.block_93{background-image:url(blocks/block_93.png)}
.known.block_94{background-image:url(blocks/block_94.png)}
.known.block_95{background-image:url(blocks/block_95.png)}
.known.block_96{background-image:url(blocks/block_96.png)}
.known.block_97{background-image:url(blocks/block_97.png)}
</style>
</head>
<body>
<div class="status" id="status"></div>
<div class="chat_window">
<div class="chat_header">Chat</div>
<div class="chat_text"></div>
<form class="chat_form" action=""><input id="chat_input" autocomplete="off"></form>
</div>
<table class="battle">
<tr>
<th class="battle_header" colspan=4></th>
<tr class="battle_reserves enemy"><td><div id="ER"></div></td>
<tr class="battle_line enemy"><td><div id="EC"></div></td>
<tr class="battle_line enemy"><td><div id="EA"></div></td>
<tr class="battle_line friendly"><td><div id="FA"></div></td>
<tr class="battle_line friendly"><td><div id="FC"></div></td>
<tr class="battle_reserves friendly"><td><div id="FR"></div></td>
<tr>
<th class="battle_message" colspan=4></th>
</table>
<div class="grid_window">
<div class="grid_top">
<div class="menu">
<div class="menu_title"><img src="/images/cog.svg"></div>
<div class="menu_popup">
<div class="menu_item" onclick="toggle_fullscreen()">Fullscreen</div>
<div class="menu_separator"></div>
<div class="menu_item" onclick="tall_map()">Tall Map</div>
<div class="menu_item" onclick="wide_map()">Wide Map</div>
<div class="menu_separator"></div>
<div class="menu_item" onclick="set_spread_layout()">Spread blocks</div>
<div class="menu_item" onclick="set_stack_layout()">Stack blocks</div>
<div class="menu_separator"></div>
<div class="menu_item" onclick="window.open('info/notes.html', '_blank')">Notes</div>
<div class="menu_item" onclick="window.open('info/rules.html', '_blank')">Rules</div>
<div class="menu_item" onclick="window.open('info/cards.html', '_blank')">Cards</div>
<div class="menu_item" onclick="window.open('info/blocks.html', '_blank')">Blocks</div>
<div class="menu_separator"></div>
<div class="menu_item" onclick="send_save()">🐞 Save</div>
<div class="menu_item" onclick="send_restore()">🐞 Restore</div>
<div class="menu_separator"></div>
<div class="menu_item" onclick="send_restart('Historical')">⚠ Restart</div>
</div>
</div>
<div class="image_button" onclick="toggle_blocks()"><img src="/images/earth-africa-europe.svg"></div>
<div class="image_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div>
<div class="image_button" onclick="toggle_log()"><img src="/images/scroll-quill.svg"></div>
<div class="image_button chat_button" onclick="toggle_chat()"><img src="/images/chat-bubble.svg"></div>
<div id="prompt" class="prompt">$PROMPT</div>
<button id="eliminate_button" class="hide" onclick="on_button_eliminate()">Eliminate</button>
<button id="sea_move_button" class="hide" onclick="on_button_sea_move()">Sea Move</button>
<button id="muster_button" class="hide" onclick="on_button_muster()">Muster</button>
<button id="end_muster_button" class="hide" onclick="on_button_end_muster()">End muster</button>
<button id="end_sea_move_button" class="hide" onclick="on_button_end_sea_move()">End sea move</button>
<button id="end_retreat_button" class="hide" onclick="on_button_end_retreat()">End retreat</button>
<button id="end_regroup_button" class="hide" onclick="on_button_end_regroup()">End regroup</button>
<button id="end_move_phase_button" class="hide" onclick="on_button_end_move_phase()">End move phase</button>
<button id="pass_button" class="hide" onclick="on_button_pass()">Pass</button>
<button id="next_button" class="hide" onclick="on_button_next()">Next</button>
<button id="undo_button" class="hide" onclick="on_button_undo()">Undo</button>
</div>
<div class="grid_role">
<div class="role one">
<div class="role_vp" id="frank_vp"></div>
<div class="role_name">Frank (<span class="role_user">$USER</span>)</div>
<div class="role_info"><div class="small_card card_back" id="frank_card"></div></div>
</div>
<div class="role two">
<div class="role_vp" id="saracen_vp"></div>
<div class="role_name">Saracen (<span class="role_user">$USER</span>)</div>
<div class="role_info"><div class="small_card card_back" id="saracen_card"></div></div>
</div>
<div id="turn">$TURN</div>
</div>
<div class="grid_log">
<div class="log" id="log"></div>
</div>
<div class="grid_center">
<div class="mapwrap" id="mapwrap">
<div class="map" id="map">
<div id="blocks" class="blocks"></div>
<div id="offmap" class="offmap" style="visibility:hidden"></div>
<div id="towns" class="towns"></div>
</div>
</div>
<div class="hand">
<div id="card+1" class="card card_assassins"></div>
<div id="card+2" class="card card_guide"></div>
<div id="card+3" class="card card_intrigue"></div>
<div id="card+4" class="card card_jihad"></div>
<div id="card+5" class="card card_manna"></div>
<div id="card+6" class="card card_winter_campaign"></div>
<div id="card+7" class="card card_3"></div>
<div id="card+8" class="card card_3"></div>
<div id="card+9" class="card card_3"></div>
<div id="card+10" class="card card_3"></div>
<div id="card+11" class="card card_3"></div>
<div id="card+12" class="card card_3"></div>
<div id="card+13" class="card card_2"></div>
<div id="card+14" class="card card_2"></div>
<div id="card+15" class="card card_2"></div>
<div id="card+16" class="card card_2"></div>
<div id="card+17" class="card card_2"></div>
<div id="card+18" class="card card_2"></div>
<div id="card+19" class="card card_2"></div>
<div id="card+20" class="card card_2"></div>
<div id="card+21" class="card card_2"></div>
<div id="card+22" class="card card_1"></div>
<div id="card+23" class="card card_1"></div>
<div id="card+24" class="card card_1"></div>
<div id="card+25" class="card card_1"></div>
<div id="card+26" class="card card_1"></div>
<div id="card+27" class="card card_1"></div>
</div>
</div>
</div>
</body>
|