-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
466 lines (440 loc) · 14 KB
/
index.html
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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Compact Conflict</title>
<style type="text/css">
body {
background: #000;
height: 100%;
margin: 0;
font-family: sans-serif;
overflow: hidden;
line-height: 1.14;
}
svg {
width: 100%;
height: 100%;
}
#c {
position: relative;
margin: auto;
perspective: 50em;
-webkit-perspective: 50em;
}
#o,#m,#u {
position: absolute;
}
#o {
left: 1%; right: 78.2%;
top: 13.5%; bottom: 13.5%;
color: white;
transform: rotateY(55deg);
-webkit-transform: rotateY(55deg);
transform-origin: left;
-webkit-transform-origin: left;
border: 1px solid #333;
background: #111;
font-size: 110%;
}
#m {
right: 0; left: 20%; top: 0; bottom: 0;
}
/* Board elements */
.o,.i,.s {
border: 1px solid black;
box-shadow: 2px 2px #000, inset -3px -3px 0 0 rgba(0,0,0,0.2);
position: absolute;
}
.o {
width: 3%;
height: 4%;
transform: rotate(10deg);
-webkit-transform: rotate(10deg);
}
.i {
width: 90%;
height: 90%;
left: -8%;
top: -8%;
border-radius: 50%;
text-align: center;
box-shadow: 1px 1px #000, inset -3px -3px 0 0 rgba(0,0,0,0.2);
}
.s {
width: 0.9%;
height: 1.2%;
border-radius: 50%;
background: #777;
}
.l {
border-color: #fff;
}
/* Information display styles */
.sc {
margin: 0.12em 0.12em;
padding: 0.6em 1em;
background: #222;
box-shadow: inset 4px 4px 20px #344;
font-size: 90%;
text-shadow: 0.12em 0.1em #000;
}
.un {
padding: 0.33em 0;
}
.ds {
font-size: 80%; color: #aaa;
}
/* Player boxes */
/* the boxes themselves - .pl is active, .pi inactive */
.pl {
border: 2px solid rgba(0,0,0,0.5);
margin: 0 0.33em;
padding: 0.5em 0.25em 0.5em 0.5em;
font-size: 80%;
}
/* additional information displayed inside the box */
.ad {
float: right; width: 21%; text-align: right; margin: -0.2em 0.2em 0 0; font-size: 120%;
}
/* Buttons */
#u {
bottom: 0.8em; left: 0.8em; right: 0.8em;
perspective: 15em;
}
a {
display: block;
position: relative;
text-align: center;
text-decoration: none;
margin-top: 0.15em;
color: #dde;
border: 2px solid #333;
background: #000;
padding: 0.5em;
font-size: 80%;
transform: translate3d(0,0,0);
z-index: 10;
}
h1 a {
display: inline;
color: #aaf;
background: none;
border: none;
}
a:hover {
background: #444;
color: #fff;
transform: translate3d(0,0,1em);
z-index: 20;
}
a.off, a.off:hover {
opacity: 0.3;
background: #000;
transform: translate3d(0,0,0);
cursor: default !important;
}
a.rt {
display: block;
float: right;
padding: 0.2em;
margin: -0.28em 0 0 0.1em;
border: 1px solid #000;
border-radius: 2px;
font-size: 100%;
text-shadow: none;
opacity: 0.5;
min-width: 1.5em;
}
a.rt.sl {
background: #fff;
color: #000;
}
.bn {
position: absolute;
top: 40%;
height: 10.8%;
width: 96%;
text-align: center;
padding-top: 0.6%;
padding-right: 10%;
border: 2px solid black;
color: #fff;
z-index: 100;
font-size: 3em;
font-family: "Constantia", "Athelas", serif;
box-shadow: 0 10px 10px 5px rgba(0,0,0,0.7), inset 0 20px 2px rgba(255,255,255,0.05);
text-shadow: 2px 2px #000;
transition: opacity 0.5s ease-in-out, transform 1.5s linear, -webkit-transform 1.5s linear;
}
a,.o,.i,.s,.pl,.pi,#in,polygon {
transition: all 0.15s ease-in-out;
}
p {
margin: 0.4em 1em 0.4em 1em;
}
#mv {
text-align: center;
padding: 0.5em 0 1em 0;
font-size: 80%;
color: #777;
font-weight: bold;
}
.bl, .br {
float: left; width: 40%;
margin: 0 6.66%;
}
.bl {
margin-right: 0;
}
#mc, #ft {
font-size: 170%;
color: #eef;
text-shadow: 2px 2px #000;
}
#in {
font-size: 70%;
box-shadow: inset 4px 4px 20px rgba(0,0,0,0.5);
border: 1px solid #000;
color: #fff;
}
#ts {
position: absolute;
z-index: 50;
left: 8%;
top: 8%;
right: 8%;
bottom: 8%;
background: rgba(0,0,0,0.9);
color: #aaa;
line-height: 150%;
text-align: center;
border: 1px solid #333;
perspective: 40em;
perspective-origin: 50% 0;
transform: translate3d(0,0,3em);
-webkit-perspective: 40em;
-webkit-perspective-origin: 50% 0;
-webkit-transform: translate3d(0.2em,0,4em);
transition: all 0.5s;
opacity: 1.0;
}
#ts.h {
transform: translate3d(0.2em,0,4em) rotateX(90deg);
-webkit-transform: translate3d(0.2em,0,4em) rotateX(90deg);
opacity: 0.0;
}
/* Corner buttons */
.cb {
display: none; right: 1%; bottom: 1%; opacity: 0.4;
}
/* Tooltips */
.tt {
background: #000;
border-radius: 10%;
position: absolute;
z-index: 10000;
font-size: 65%;
color: #fff;
width: 7%;
text-align: center;
padding: 0.4em;
opacity: 0.8;
pointer-events: none;
transition: all 3s;
}
.tt hr {
margin: 1px 0;
}
.stt {
width: 2%;
font-weight: bold;
background: #333;
padding: 0.12em;
border: 1px solid #000;
}
/* Particles! */
.pr {
position: absolute;
width: 0;
height: 0;
transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
transition: all 1s;
}
/* Tutorial slider styles */
#tut {
position: absolute;
left: 20%; right: 20%;
top: 28%; bottom: 15%;
overflow: hidden;
}
#tuc {
width: 500%; height: 100%;
transform: translate3d(0,0,0);
transition: all 0.3s;
}
.crd {
width: 20%; height: 100%;
margin: 0;
float: left;
text-align: justify;
}
.pic {
position: relative;
width: 10%;
height: 15%;
margin: auto;
color:#fff; font-size:2em; text-align: center
}
.rb {
border-radius: 50%;
width: 1.5em;
height: 1.5em;
font-size: 2em;
padding: 0.16em 0 0 0;
box-sizing: border-box;
position: absolute;
}
#prv { left: 10%; top: 50%; }
#nxt { right: 10%; top: 50%; }
.bb {
position: absolute;
left: 30%; right: 30%;
top: 90%;
}
#ts a:hover, a.rb:hover { transform: translate3d(0,0,0.2em); opacity: 1 !important; }
h1 {
font-family: "Constantia", "Athelas", serif;
font-size: 3.75em;
margin: 0.7em 0 1em;
transform: scale3d(1.5,1.5,1) rotateX(60deg);
-webkit-transform: scale3d(1.5,1.5,1) rotateX(60deg);
text-shadow: 0 0.04em #777;
}
h1, h2 {
text-align: center;
color: #fff;
}
h2 {
font-size: 1.5em;
margin-bottom: 0.3em;
}
ul {
padding-left: 1.5em;
text-align: left;
}
li {
margin-top: 0.15em;
}
b {
color: #ffa;
}
</style>
</head>
<body>
<div id='c'>
<div id='o' style='display: none'>
<div id='d'></div>
<div id='mv' class="sc">
<div class='bl'>
<div id="mc"></div>
<div>moves</div>
</div>
<div class='br'>
<div id="ft"></div>
<div>faith</div>
</div>
<div style='clear:both;font-size:1px'></div>
</div>
<div id='u'></div></div>
<div id='m'></div>
<div id='ts' class='h'>
<h1>Compact Conflict
<div style="font-size: 25%; margin-top: 1em; text-shadow: none">
<span style="color: #666; margin-right: 0.5em">1.2.2</span>
by <a href="http://wasyl.eu">Jakub Wasilewski</a>
</div></h1>
<div id="tut">
<div id="tuc">
<div class="crd">
<h2>How to win (1/5)</h2>
<div class="pic">
<div style="padding-top:0.5em;">♛</div>
</div>
<ul>
<li>The standard game lasts <b>12 turns</b>.</li>
<li>Once time runs out, <b>whoever has most regions, wins</b>.</li>
<li>Your <b>soldiers</b> conquer and defend <b>regions</b>.</li>
<li>Your <b>temples</b> make new soldiers and can be <b>upgraded</b> with faith.</li>
<li>You get <b>faith</b>(☯) for regions and for soldiers praying at temples.</li>
</ul>
</div>
<div class="crd">
<h2>Temples (2/5)</h2>
<div class="pic">
<div class="o" style="background: #777; left:22%; top: 30%; width:60%; height:70%;"><div class="i" style="background: #777;"> </div></div>
</div>
<ul style="margin-top: 1.5em">
<li>Each player <b>starts with one temple</b> under their control.</li>
<li>After your turn, each of your temples <b>produces a new soldier</b>.</li>
<li>You can <b>take over</b> your enemies' temples.</li>
<li>There are <b>neutral temples</b> that you can conquer.</li>
<li>Temples can be imbued with <b>elemental powers</b> using upgrades.</li>
</ul>
</div>
<div class="crd">
<h2>Soldiers (3/5)</h2>
<div class="pic">
<div class="s l" style="width:16%;height:20%;top:30%;left:20%"></div>
<div class="s l" style="width:16%;height:20%;top:32%;left:40%"></div>
<div class="s" style="width:16%;height:20%;top:34%;left:60%"></div>
</div>
<ul style="margin-top: 0;">
<li>You get <b>3 moves</b> each turn.</li>
<li>Every move allows you to move <b>one army</b> to a neighbouring region.</li>
<li>An army that has conquered a region <b>cannot move again</b> this turn.</li>
<li>If you move into an occupied region, a <b>battle</b> will ensue.</li>
<li>If you manage to <b>kill all defenders</b>, you take over the region.</li>
<li>If the <b>defenders survive</b>, your army retreats.</li>
</ul>
</div>
<div class="crd">
<h2>Income (4/5)</h2>
<div class="pic">
<div style="padding-top:0.5em;">☯</div>
</div>
<ul>
<li>Once you end your turn, new <b>faith</b> is generated.</li>
<li>You get 1 <b>for each region</b> you have, and 1 <b>for each soldier</b> praying at a temple.</li>
<li>You also get <b>4 faith</b> for each soldier killed in defense of a region.</li>
</ul>
</div>
<div class="crd">
<h2>Upgrades (5/5)</h2>
<div class="pic">
<div class="o" style="background: #ffa; left:22%; top: 30%; width:60%; height:70%;">
<div class="i" style="background: #ffa;"><div class="i" style="background: #ffa;"></div></div>
</div>
</div>
<ul style="margin-top: 1.5em">
<li><b>Elemental upgrades</b> are purchased with <b>faith</b> (☯).</li>
<li>There are <b>2 levels</b> of each upgrade.</li>
<li>Instead of upgrading, you can use faith to <b>recruit soldiers</b>.</li>
<li>Each soldier you recruit in a turn gets <b>more expensive</b>.</li>
<li>If a temple is lost, the <b>upgrade is lost with it</b>.</li>
</ul>
</div>
</div>
</div>
<a href="#" class="rb" id="prv">«</a>
<a href="#" class="rb" id="nxt">»</a>
<div class='bb'>
<a id='cb' href='#'>Got it!</a>
</div>
</div>
<a id="end" href="#" class="cb rb" title="Restart">☢</a>
<a id="tub" href="#" style="right: 5.7%" class="cb rb" title="Instructions">?</a>
<a id="snd" href="#" style="right: 10.4%" class="cb rb" title="Sound"></a>
<a id="und" href="#" style="right: 15.1%" class="cb rb" title="Undo"></a>
</div>
<script src="erisk.js"></script>