forked from deathraygames/civ-clicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
549 lines (534 loc) · 20.6 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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
<!DOCTYPE html>
<!--
CivClicker
Copyright (C) 2014; see the AUTHORS file for authorship.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program in the LICENSE file.
If it is not there, see <http://www.gnu.org/licenses/>.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb">
<head>
<title>CivClicker</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="styles/civclicker.css" />
<meta name="description" content="CivClicker: Build a Civilisation In Your Browser" />
<script type="module" src="scripts/civclicker.js" defer="defer"></script>
</head>
<body class="hasBackground">
<div id="strip">
<div id="header">
<h1>The <span id="civType">Thorp</span> of <span id="civName">Woodstock</span></h1>
<div id="ruler">Ruled by the <span id="appellation">mighty</span> <span id="rulerName">Orteil</span></div>
</div>
<div id="stripInner">
<span class="title">CivClicker</span>
<span class="version">v1.4.0</span>
<a href="faq.html" target="_blank">FAQ & Instructions</a>
<a href="updates.html" target="_blank">Game Updates Log</a>
<a href="https://www.reddit.com/r/CivClicker/" target="_blank">Reddit</a>
<a href="#" class="openSettings">Settings</a>
</div>
</div>
<section id="settings" class="drawer">
<div class="columns">
<div class="column left">
<h2>Naming</h2>
<button onmousedown="renameCiv()" title="Rename your civilisation">Rename Civilisation</button><br />
<button id="renameRuler" onmousedown="renameRuler()" title="Rename yourself">Rename Yourself</button><br />
<button id="renameDeity" onmousedown="renameDeity()" title="Rename your deity" disabled="disabled">Rename Current Deity</button>
<br />
<h2>Display</h2>
<span id="textSize"><button id="smallerText" onmousedown="textSize(-1)" title="Smaller Text">−</button>Text Size
<button id="largerText" onmousedown="textSize(1)" title="Larger Text">+</button></span><br />
<br />
<label><input id="toggleCustomQuantities" type="checkbox" onclick="onToggleCustomQuantities(this)" title="Custom Quantity"/>Use Custom Quantities</label><br />
<label><input id="toggleDelimiters" type="checkbox" onclick="onToggleDelimiters(this)" title="Toggle Delimiters"/>Number Delimiters</label><br />
<label><input id="toggleDarkMode" type="checkbox" onclick="onToggleDarkMode(this)" title="Toggle Dark Mode"/>Dark Mode</label><br />
<label><input id="toggleShadow" type="checkbox" onclick="onToggleShadow(this)" title="Toggle Text Shadow"/>Text Shadows</label><br />
<label><input id="toggleNotes" type="checkbox" onclick="onToggleNotes(this)" title="Toggle Notes"/>Show Notes</label><br />
<label><input id="toggleWorksafe" type="checkbox" onclick="onToggleWorksafe(this)" title="Toggle Worksafe Mode"/>Worksafe Mode</label><br />
<label><input id="toggleIcons" type="checkbox" onclick="onToggleIcons(this)" title="Toggle Icons"/>Use Icons</label><br />
</div>
<div class="column right">
<h2>Save & Load Controls</h2>
<button onmousedown="save('manual')" title="Save your current stats">Manual Save</button><br />
<label><input id="toggleAutosave" type="checkbox" onclick="onToggleAutosave(this)" title="Autosave"/>Autosave</label><br />
<button onmousedown="reset()" title="Reset your game">Reset Game</button>
<span class="note">
<span id="resetNote">Resetting allows you to </span>
<span id="resetDeity">gain another deity</span>
<span id="resetBoth"><br/> and </span>
<span id="resetWonder">build another Wonder</span>
</span>
<br />
<br />
<button onmousedown="deleteSave()" title="Delete your saved stats">Delete Save File</button><br />
<br />
<label>Save game data:</label>
<textarea id="impexpField"></textarea>
<button id="expButton" onclick="save('export')">Export</button>
<button id="expSelect" onclick="document.getElementById('impexpField').select();">Select All</button>
<button id="impButton" onclick="load('import')">Import</button>
</div>
</div>
</section>
<div id="main" class="columns">
<div id="leftColumn" class="column left">
<div id="basicResourcesContainer" class="civSection">
<table id="basicResources" class="resources">
<!-- populated by javascript -->
</table>
</div>
<div id="populationContainer" class="civSection">
<div id="populationNumbers">
<table class="resources">
<tbody>
<tr>
<td>
<img src="images/backup.png" class="icon icon-lg" alt="Population"/>
<label>Population:</label>
</td>
<td class="number"><span data-action="display_pop" data-target="living">...</span></td>
<td class="number maxNumber">
/ max: <span data-action="display_pop" data-target="limit">...</span>
</td>
<td class="note">
Build more housing to grow your civilization
</td>
</tr>
<tr id="zombieWorkers">
<td>
<img src="images/shambling-zombie.png" class="icon icon-lg" alt="Zombies"/>
<label>Zombies:</label>
</td>
<td class="number"><span data-action="display" data-target="zombie">...</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td>
<img src="images/smitten.png" class="icon icon-lg" alt="Happiness"/>
<label>Happiness:</label>
</td>
<td colspan="3" id="morale">
<ol class="happinessRanks">
<li class="happy-1">Blissful</li>
<li class="happy-2">Happy</li>
<li class="happy-3">Content</li>
<li class="happy-4">Unhappy</li>
<li class="happy-5">Angry</li>
</ol>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="jobsContainer" class="civSection">
<div id="populationBar" class="bar" title="Population">
<!-- populated by javascript -->
</div>
<div id="populationCreate">
<div>
Recruit new citizens as
<select type="dropdown" id="newSpawnJobSelection">
<option value="unemployed">Idle Citizens</option>
<option value="farmer">Farmers</option>
<option value="woodcutter">Woodcutters</option>
<option value="miner">Miners</option>
</select>
<span class="cost">for <span id="workerCost">...</span> food</span><span class="note">.</span>
<button class="unit1" id="spawn1button" onmousedown="spawn(1)">+1</button>
<button class="unit10" id="spawn10button" onmousedown="spawn(10)">+10</button>
<button class="unit100" id="spawn100button" onmousedown="spawn(100)">+100</button>
<button class="unit1000" id="spawn1000button" onmousedown="spawn(1000)">+1k</button>
<button class="unitInfinity" id="spawnMaxbutton" onmousedown="spawn(Infinity)">+<span id="workerNumMax">Max</span></button>
</div>
<div id="customSpawnQuantity">
<button id="spawnCustomButton" onmousedown="spawn('custom')">Recruit Citizens</button><input id="spawnCustomQty" type="number" min="1" step="1" value="1" />
</div>
</div>
<p id="customJobQuantity">
Custom Quantity <input id="homeCustomQty" type="number" min="1" step="1" value="1" />
</p>
<table id="jobs">
<!-- populated by javascript -->
</table>
</div>
<div id="eventsContainer" class="civSection">
<h3>Events</h3>
<table id="logTable">
<tr id="log0"><td id="logT"></td><td id="logL"></td><td id="logR"></td></tr>
<tr id="log1"><td colspan="3"></td></tr>
<tr id="log2"><td colspan="3"></td></tr>
<tr id="log3"><td colspan="3"></td></tr>
<tr id="log4"><td colspan="3"></td></tr>
<tr id="log5"><td colspan="3"></td></tr>
<tr id="log6"><td colspan="3"></td></tr>
<!--
<tr id="log7"><td colspan="3"></td></tr>
<tr id="log8"><td colspan="3"></td></tr>
<tr id="log9"><td colspan="3"></td></tr> -->
</table>
</div>
</div>
<div id="rightColumn" class="column right">
<div id="specialResourcesContainer" class="civSection">
<table class="resources">
<tbody>
<tr>
<td>
<img src="images/skins.png" class="icon icon-lg" alt="Skins"/>
<label>Skins:</label>
</td>
<td>
<span class="number" data-action="display" data-target="skins">0</span>
</td>
<td>
<span class="number net" data-action="displayNet" data-target="skins">0</span><span class="perSecond">/s</span>
</td>
<td>
<img src="images/leather.png" class="icon icon-lg" alt="Leather"/>
<label>Leather:</label>
</td>
<td>
<span class="number" data-action="display" data-target="leather">0</span>
</td>
<td>
<span class="number net" data-action="displayNet" data-target="leather">0</span><span class="perSecond">/s</span>
</td>
</tr>
<tr>
<td>
<img src="images/herbs.png" class="icon icon-lg" alt="Herbs"/>
<label>Herbs:</label>
</td>
<td>
<span class="number" data-action="display" data-target="herbs">0</span>
</td>
<td>
<span class="number net" data-action="displayNet" data-target="herbs">0</span><span class="perSecond">/s</span>
</td>
<td>
<img src="images/piety.png" class="icon icon-lg" alt="Piety"/>
<label>Piety:</label>
</td>
<td>
<span class="number" data-action="display" data-target="piety">0</span>
</td>
<td>
<span class="number net" data-action="displayNet" data-target="piety">0</span><span class="perSecond">/s</span>
</td>
</tr>
<tr>
<td>
<img src="images/ore.png" class="icon icon-lg" alt="Ore"/>
<label>Ore:</label>
</td>
<td>
<span class="number" data-action="display" data-target="ore">0</span>
</td>
<td>
<span class="number net" data-action="displayNet" data-target="ore">0</span><span class="perSecond">/s</span>
</td>
<td>
<img src="images/metal.png" class="icon icon-lg" alt="Metal"/>
<label>Metal:</label>
</td>
<td>
<span class="number" data-action="display" data-target="metal">0</span>
</td>
<td>
<span class="number net" data-action="displayNet" data-target="metal">0</span><span class="perSecond">/s</span>
</td>
</tr>
<tr>
<td>
<img src="images/gold.png" class="icon icon-lg" alt="Gold" />
<label>Gold:</label>
</td>
<td colspan="2">
<span class="number" data-action="display" data-target="gold">0</span>
</td>
<td>
<img src="images/carrion.png" class="icon icon-lg" alt="Corpses">
<label>Corpses:</label>
</td>
<td colspan="2">
<span class="number" data-action="display" data-target="corpses">0</span>
</td>
</tr>
</tbody>
</table>
</div>
<div id="panesSelectors" class="civSection">
<div id="selectors" class="panesTabs">
<div id="buildingsSelect" class="paneSelector selected" data-target="buildingsPane" onclick="paneSelect(this)">
Buildings
<div class="alert">!</div>
</div>
<div id="upgradesSelect" class="paneSelector" data-target="upgradesPane" onclick="paneSelect(this)">
Upgrades
<div class="alert">!</div>
</div>
<div id="deitySelect" class="paneSelector" data-target="deityPane" onclick="paneSelect(this)">
Deity
<div class="alert">!</div>
</div>
<div id="conquestSelect" class="paneSelector" data-target="conquestPane" onclick="paneSelect(this)">
Conquest
<div class="alert">!</div>
</div>
<div id="tradeSelect" class="paneSelector" data-target="tradePane" onclick="paneSelect(this)">
Trade
<div class="alert">!</div>
</div>
<div id="achievementsSelect" class="paneSelector" data-target="achievementsPane" onclick="paneSelect(this)">
Achievements
<div class="alert">!</div>
</div>
</div>
<div id="buildingsPane" class="selectPane selected">
<div class="landCols cols">
<div class="col">
Total Buildings: <span id="totalBuildings">...</span><br />
</div>
<div class="col">
Total Land: <span id="totalLand">...</span><br />
</div>
</div>
<div id="landBar" class="bar" title="Land usage">
<!-- populated by javascript -->
</div>
<p id="customBuildQuantity">
Custom Quantity <input id="buildingCustomQty" type="number" min="1" step="1" value="1" />
</p>
<table id="buildings">
<!-- populated by javascript -->
</table>
<div id="graveTotal">
Unfilled Graves: <span data-action="display" data-target="grave">...</span>
</div>
</div>
<div id="upgradesPane" class="selectPane">
<div id="wondersContainer">
<h3>Wonders</h3>
<span id="startWonderLine"><button id="startWonder" onmousedown="startWonder()">Start Building Wonder</button></span>
<div id="wonderInProgress">
<span class="wonderTitle">Progress on <span id="wonderNameP">Wonder</span> - <span id="progressNumber">0</span>%</span> - <button id="renameWonder" onmousedown="renameWonder()">Rename</button>
<div id="progressContainer"><div id="progressBar"></div></div>
<div id="lowResources">Limited<span id="limited"> by low resources</span></div>
<div id="speedWonderGroup"><br /><button id="speedWonder" onmousedown="speedWonder()">Speed Wonder</button>
<span id="speedWonderCost" class="cost">100 gold</span><span class="note">: Increase wonder progress</span></div>
</div>
<div id="wonderCompleted">
<div class="wonderTitle"><span id="wonderNameC">Wonder</span> Completed! Choose Bonus:</div>
</div>
<table id="pastWonders"><tr><td></td></tr></table>
</div>
<table id="upgrades"></table>
</div>
<div id="deityPane" class="selectPane">
<div class="notYet">
Your civilization does not yet worship a deity.
<span class="tip">You need to increase piety by assigning clerics at a temple.</span>
</div>
<div id="deityContainer">
<h3>Current Deity</h3>
<table id="activeDeity">
<!-- populated by javascript -->
</table>
</div>
<span id="walkGroup"><br />Walk: <span id="walkStat">...</span> workers per second<br /></span>
<div id="worshipRow">
<!-- populated by updatePurchaseRow -->
</div>
<div id="deityDomains">
<p>
You may select only one domain for your deity:
</p>
<ul>
<li id="battleRow" class="purchaseRow" data-target="battle">
<span class="upgradetrue" data-quantity="true">
<button id="battleDeity" class="xtrue purchaseFor500Piety" onmousedown="selectDeity('battle')">Battle</button>
</span>
<span id="battleCost" class="cost">500 piety</span>
</li>
<li id="fieldsRow" class="purchaseRow" data-target="fields">
<span class="upgradetrue" data-quantity="true">
<button id="fieldsDeity" class="xtrue purchaseFor500Piety" onmousedown="selectDeity('fields')">Fields</button>
</span>
<span id="fieldsCost" class="cost">500 piety</span>
</li>
<li id="underworldRow" class="purchaseRow" data-target="underworld">
<span class="upgradetrue" data-quantity="true">
<button id="underworldDeity" class="xtrue purchaseFor500Piety" onmousedown="selectDeity('underworld')">Underworld</button>
</span>
<span id="underworldCost" class="cost">500 piety</span>
</li>
<li id="catsRow" class="purchaseRow" data-target="cats">
<span class="upgradetrue" data-quantity="true">
<button id="catsDeity" class="xtrue purchaseFor500Piety" onmousedown="selectDeity('cats')">Cats</button>
</span>
<span id="catsCost" class="cost">500 piety</span>
</li>
</ul>
</div>
<div id="battleUpgrades">
<h3>The Strength of Battle</h3>
<table>
<tr id="battleAltarRow"><td></td></tr>
<tr id="riddleRow"><td></td></tr>
<tr id="smiteRow"><td></td></tr>
<tr id="throneRow"><td></td></tr>
<tr id="gloryRow"><td></td></tr>
<tr id="lamentRow"><td></td></tr>
</table>
</div>
<div id="fieldsUpgrades">
<h3>The Bounty of the Fields</h3>
<table>
<tr id="fieldsAltarRow"><td></td></tr>
<tr id="blessingRow"><td></td></tr>
<tr id="wickermanRow"><td></td></tr>
<tr id="wasteRow"><td></td></tr>
<tr id="walkRow"><td></td></tr>
<tr id="stayRow"><td></td></tr>
</table>
</div>
<div id="underworldUpgrades">
<h3>The Dread Power of the Underworld</h3>
<table>
<tr id="underworldAltarRow"><td></td></tr>
<tr id="bookRow"><td></td></tr>
<tr id="raiseDeadRow"><td></td></tr>
<tr id="feastRow"><td></td></tr>
<tr id="summonShadeRow"><td></td></tr>
<tr id="secretsRow"><td></td></tr>
</table>
</div>
<div id="catsUpgrades">
<h3>The Grace of Cats</h3>
<table>
<tr id="catAltarRow"><td></td></tr>
<tr id="lureRow"><td></td></tr>
<tr id="pestControlRow"><td></td></tr>
<tr id="companionRow"><td></td></tr>
<tr id="graceRow"><td></td></tr>
<tr id="comfortRow"><td></td></tr>
</table>
</div>
<div id="pantheonContainer">
<h3>Pantheon</h3>
<table id="oldDeities"><tr><td></td></tr></table>
</div>
<div id="iconoclasmGroup">
<button id="iconoclasm" onmousedown="iconoclasmList()">Iconoclasm</button>
<span id="iconoclasmCost" class="cost">1,000 piety</span>
<span id="iconoclasmNote" class="note">: Remove an old deity to gain gold</span><br />
<div id="iconoclasmList"></div>
</div>
<div id="pantheonUpgrades">
<h3>Pantheon Upgrades</h3>
<div id="purchasedPantheon"></div>
</div>
</div>
<div id="conquestPane" class="selectPane">
<div class="notYet">
You cannot command an army yet because you don't own a battle standard.
<span class="tip">Try building a barracks first.</span>
</div>
<span id="standardRow">
<!-- -->
</span>
<div id="conquest">
<h3>Army</h3>
<p id="customPartyQuantity">
Custom Quantity <input id="partyCustomQty" type="number" min="1" step="1" value="1" />
</p>
<table id="party">
<!-- populated by javascript -->
</table>
<div id="raidNews">
<!-- -->
</div>
<div id="raidGroup">
<h3>To War!</h3>
<p id="gloryGroup">
Glory: <span id="gloryTimer">0</span> seconds remain
</p>
</div>
<div id="victoryGroup">
<h3>Victory!</h3>
<button id="plunder" onmousedown="plunder()">Plunder Resources</button><br />
</div>
</div>
<div class="stats">
Total Enemies Slain: <span data-action="display" data-target="enemySlain">...</span>
</div>
</div>
<div id="tradePane" class="selectPane">
<div class="notYet">
You do not yet own a trading post. <span class="tip">Try trading with a trader when they (randomly) appear.</span>
</div>
<div id="tradeContainer">
Trader offers 1 gold for <span id="tradeRequested">...</span> <span id="tradeType">...</span>
for the next <span id="traderTimer">...</span>.
<br />
<button id="tradeButton" onmousedown="trade()">Trade</button>
</div>
<div id="noTrader">
No trader visiting
</div>
<span id="tradeRow">
<!-- populated by javascript -->
</span>
<div id="tradeUpgradeContainer">
<span id="currencyRow"></span>
<span id="commerceRow"></span>
<h4>Buy Resources (1 gold)</h4>
<button class="tradeResource" onmousedown="buy('food')">Buy 5000 Food</button><br />
<button class="tradeResource" onmousedown="buy('wood')">Buy 5000 Wood</button><br />
<button class="tradeResource" onmousedown="buy('stone')">Buy 5000 Stone</button><br />
<button class="tradeResource" onmousedown="buy('skins')">Buy 500 Skins</button><br />
<button class="tradeResource" onmousedown="buy('herbs')">Buy 500 Herbs</button><br />
<button class="tradeResource" onmousedown="buy('ore')">Buy 500 Ore</button><br />
<button class="tradeResource" onmousedown="buy('leather')">Buy 250 Leather</button><br />
<button class="tradeResource" onmousedown="buy('metal')">Buy 250 Metal</button><br />
</div>
</div>
<div id="achievementsPane" class="selectPane">
<div id="achievements">
<!-- populated by javascript -->
</div>
<div class="stats">
Resource clicks: <span id="clicks">0</span>
</div>
</div>
</div>
</div>
</div>
<footer>
<!--
<span class="title">CivClicker v1.2</span>
<a href="https://kastark.co.uk/games/civclicker/">Original 1.0 Game</a>
<a href="faq.html">FAQ</a>
<a href="updates.html">Updates</a>
<a href="https://github.com/deathraygames/civ-clicker/">Source</a>
<a href="https://www.reddit.com/r/CivClicker/">Reddit</a>
-->
</footer>
<div class="scripts">
<!-- Google Analytics. REMOVE this for your own forks. -->
<!-- <script src="../../js/ga.js"></script> -->
</div>
</body>
</html>