-
Notifications
You must be signed in to change notification settings - Fork 58
/
index.html
444 lines (365 loc) · 24.4 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- You're looking at the source code, hm, cheater ! :-) -->
<html>
<head>
<title>Candy box !</title>
<meta name="title" content="Candy Box">
<meta name="keywords" content="Candy,Box,Candybox,Original,Legacy,1,Candybox 1,Candy Box 1,Candy Box,game,ascii,save">
<meta name="author" content="aniwey">
<meta name="description" content="Candy Box is a role-playing browser video game featuring ASCII art. It was developed by indie game developer aniwey.">
<meta http-equiv="Cache-control" content="no-cache">
<link rel="shortcut icon" href="./favicon.ico"/> <!-- Favicon by HacksawUnit \o/ Thanks to him ! -->
<!-- Jquery and tab stuff -->
<script type="text/javascript" src="./libs/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="./scripts/tabs.js"></script>
<!-- Modifications to some base js libs -->
<script type="text/javascript" src="./scripts/base_js_additions.js"></script>
<!-- Some tools which won't need any other js file -->
<script type="text/javascript" src="./scripts/htmlInteraction.js"></script>
<script type="text/javascript" src="./scripts/random.js"></script>
<script type="text/javascript" src="./scripts/speech.js"></script>
<!-- Buttons -->
<script type="text/javascript" src="./scripts/buttons.js"></script>
<!-- Shop -->
<script type="text/javascript" src="./scripts/shop.js"></script>
<script type="text/javascript" src="./scripts/sword.js"></script>
<!-- Inventory -->
<script type="text/javascript" src="./scripts/inventory.js"></script>
<!-- Quest stuff -->
<script type="text/javascript" src="./scripts/damage.js"></script>
<script type="text/javascript" src="./scripts/drops.js"></script>
<script type="text/javascript" src="./scripts/land.js"></script>
<script type="text/javascript" src="./scripts/quest.js"></script>
<script type="text/javascript" src="./scripts/status.js"></script>
<script type="text/javascript" src="./scripts/potions.js"></script>
<!-- The lands -->
<script type="text/javascript" src="./scripts/peacefulForest.js"></script>
<script type="text/javascript" src="./scripts/mountGoblin.js"></script>
<script type="text/javascript" src="./scripts/underwaterCave.js"></script>
<script type="text/javascript" src="./scripts/castleEntrance.js"></script>
<script type="text/javascript" src="./scripts/castleStairs.js"></script>
<script type="text/javascript" src="./scripts/castleKeep.js"></script>
<script type="text/javascript" src="./scripts/cowLevel.js"></script>
<script type="text/javascript" src="./scripts/sea.js"></script>
<script type="text/javascript" src="./scripts/desert.js"></script>
<script type="text/javascript" src="./scripts/hell.js"></script>
<script type="text/javascript" src="./scripts/yourself.js"></script>
<script type="text/javascript" src="./scripts/chuckNorris.js"></script>
<script type="text/javascript" src="./scripts/developperGarden.js"></script>
<script type="text/javascript" src="./scripts/developperMoat.js"></script>
<script type="text/javascript" src="./scripts/developperComputer.js"></script>
<!-- Data stuff : candies, lollipops.. -->
<script type="text/javascript" src="./scripts/candies.js"></script>
<script type="text/javascript" src="./scripts/chocolateBars.js"></script>
<script type="text/javascript" src="./scripts/lollipops.js"></script>
<!-- Objects stuff -->
<!-- The objects.js file -->
<script type="text/javascript" src="./scripts/objects.js"></script>
<!-- Files used by objects -->
<script type="text/javascript" src="./scripts/spells.js"></script>
<!-- Objects themselves -->
<script type="text/javascript" src="./scripts/farm.js"></script>
<script type="text/javascript" src="./scripts/hut.js"></script>
<script type="text/javascript" src="./scripts/swamp.js"></script>
<script type="text/javascript" src="./scripts/wishingWell.js"></script>
<script type="text/javascript" src="./scripts/forge.js"></script>
<script type="text/javascript" src="./scripts/candiesConverter.js"></script>
<script type="text/javascript" src="./scripts/cauldron.js"></script>
<script type="text/javascript" src="./scripts/computer.js"></script>
<script type="text/javascript" src="./scripts/save.js"></script>
<!-- Additions for Save/Load Mod -->
<script type="text/javascript" src="./libs/modernizr.js"></script>
<script type="text/javascript" src="./scripts/load.js"></script>
<script type="text/javascript" src="./scripts/cookie.js"></script>
<!-- Additions for Dark Mode -->
<script type="text/javascript" src="./scripts/darkMode.js"></script>
<!-- The main js file which calls the other ones -->
<script type="text/javascript" src="./scripts/main.js"></script>
<!-- Design -->
<link rel="stylesheet" type="text/css" href="./design.css"/>
</head>
<body>
<button class="toggle" style="visibility:hidden"></button>
<!-- ******** -->
<!-- TAB LIST -->
<!-- ******** -->
<div id="tabBar" style="display:none">
<ul id="tabs">
<li><button class="tab-0" tab="tab_candy_box">Candy box</button></li>
<li><button class="tab-1" tab="tab_inventory">Inventory</button></li>
<li><button class="tab-2" tab="tab_quest">Quest</button></li>
<li><button class="tab-3" tab="tab_cauldron">Cauldron</button></li>
<li><button class="tab-4" tab="tab_computer">Computer</button></li>
</ul>
</div>
<!-- *************** -->
<!-- TAB : CANDY BOX -->
<!-- *************** -->
<div id="tab_candy_box">
<!-- *************************************** -->
<!-- Right panel : the farm and some objects -->
<div style="float:right">
<span>
<span id="farm" style="visibility:hidden">
<pre>
_.-^-._ .'''.
.-' _ '-. | <span id="farm_big_lollipop" onclick="farm.clickedOnTheBigLollipop();"> ~ </span> |
/ |_| \ '._.'
/ \ |
/| _____ |\ |
| |==|==| | |
|---|---|---| |--|--| | |
|---|---|---| |==|==| | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The lollipop farm
</pre>
<span id="lp_planted"></span><br/>
<span id="lp_production"></span><br/>
<span id="lp_buttons"></span><br/><br/>
</span>
</span>
<br class="clear"/>
</div>
<!-- ***************************************** -->
<!-- Left panel : some stats, and the merchant -->
<div>
<button class="home_button" id="saveButton" onclick="save();" style="visibility:visible">Save</button><span id="save"></span>
<button class="home_button" id="loadButton" onclick="load();" style="visibility:visible">Load</button><span id="load"></span>
<button class="home_button" id="restartButton" onclick="restart();" style="visibility:visible">Restart Game</button><span id="restart">
<button class="home_button dark_mode_toggle" id="darkModeToggle" onclick="darkMode.toggle();" style="visibility:hidden">Dark Mode: OFF</button></span><br/><br/>
<input type="file" style="display:none" id="my_file" name="file" enctype="multipart/form-data" />
<span id="candies"></span><br/>
<pre id="candies_converter" style="display:none">
|
| <input type="checkbox" id="candies_converter_checkbox" onclick="candiesConverter.checkedValueChange();"/> Candies converter
V
</pre>
<span id="lollipops" style="visibility:hidden"></span><br/>
<span id="chocolate_bars" style="visibility:hidden"></span><br/><br/>
<span id="candies_eaten" style="visibility:hidden"></span><br/>
<span id="candies_thrown" style="visibility:hidden"></span><br/>
<br/>
<button class="home_button" id="eat" onclick="candies.eat();" style="visibility:hidden">Eat all the candies</button><br/>
<button class="home_button" id="throw_10" onclick="candies.throw10Candies();" style="visibility:hidden">Throw 10 candies on the ground</button><br/>
<button class="home_button" id="encrust" onclick="sword.encrust();" style="visibility:hidden;">Use 101 candies to encrust your diamond sword and make it even more powerful</button>
<button class="home_button" id="polish" onclick="sword.polish();" style="visibility:hidden; display:none">Use 30 lollipops to make lollipop powder to polish your candy sword and make it awesome (and more powerful)</button>
<button class="home_button" id="coat" onclick="sword.coat();" style="visibility:hidden; display:none">Use 1 chocolate bar to coat your sword with melted chocolate and make it incredibly powerful</button><br/>
<pre id="shop" style="visibility:hidden; float:left;">
<span onclick="shop.clickedOnHat();">.---.</span>
<span onclick="shop.clickedOnHat();">| '.| __</span>
<span onclick="shop.clickedOnHat();">| ___.--' )</span>
_.-'_` _%%%_/
.-'%%% a: a %%%
%% L %%_
_%\'-' | /-.__
.-' / )--' #/ '\
/' / /---'( : \
/ | /( /|##| \ |
/ ||# | / | /| \ \
| ||##| I \/ | | _|
| ||: | o |#| | / |
| || / I |:/ / |/
| || | o / / /
| \| | I |. / /
\ /|##| o |.| /
\/ \::|/\_ / ---'|
The candy merchant
<span id="merchant_speech"></span>
</pre>
<div style="float:left;">
<pre id="lollipop" style="visibility:hidden">
_
(<span onclick="shop.clickedOnLollipop();">_</span>) <button class="home_button" id="buy_1_lollipop" onclick="lollipops.buy1();"></button>
| <span id="lollipops_stock_shortage" style="visibility:hidden">Stock shortage : we will be restocked soon.</span>
| <button class="home_button" id="buy_10_lollipops" onclick="lollipops.buy10();" style="visibility:hidden"></button>
|</pre>
<pre id="sword_with_button"></pre>
<pre id="products_after_swords" style="visibility:hidden; display:none">
{}
)( <button class="home_button" id="buy_health_potion" onclick="potions.buyPotion(potions.list.health, 600);">Buy a health potion (600 candies)</button>
(__)
()
|| <button class="home_button" id="buy_escape_potion" onclick="potions.buyPotion(potions.list.escape, 150);">Buy an escape potion (150 candies)</button>
(__)
,------.
(_\ \
| c |
| n | <button class="home_button" id="buy_scroll" onclick="potions.buyScroll(400);">Buy a scroll (400 candies)</button>
_| d |
(_/______/
</pre>
</div>
</div> <!-- Close the left panel -->
<br class="clear"/>
</div> <!-- Close the candy box tab -->
<!-- *************** -->
<!-- TAB : INVENTORY -->
<!-- *************** -->
<div id="tab_inventory">
<div style="float:left">
<table style="margin-right:10px;">
<tr>
<td rowspan="4"><pre id="sword_without_button"></pre></td>
<td><span class="tooltip" id="inventory_key"></span></td>
<td><span class="tooltip" id="inventory_plate_armour"></span></td>
<td><span class="tooltip" id="inventory_horn_of_plenty"></td>
<td><span class="tooltip" id="inventory_swamp_map"></span></td>
</tr>
<tr>
<td><span class="tooltip" id="inventory_boots"></span></td>
<td><span class="tooltip" id="inventory_candies_converter"></span></td>
<td><span class="tooltip" id="inventory_old_amulet"></td>
<td><span class="tooltip" id="inventory_hut_map"></span></td>
</tr>
<tr>
<td><span class="tooltip" id="inventory_magician_hat"></span></td>
<td><span class="tooltip" id="inventory_cauldron"></span></td>
<td><span class="tooltip" id="inventory_won1"></span></td>
<td><span class="tooltip" id="inventory_forge_map"></span></td>
</tr>
<tr>
<td><span class="tooltip" id="inventory_pink_ring"></span></td>
<td><span class="tooltip" id="inventory_magical_horn"></span></td>
<td><span class="tooltip" id="inventory_won2"></span></td>
<td><span class="tooltip" id="inventory_well_map"></span></td>
</tr>
</table>
<span id="hardmode" style="visibility:hidden">If you want more challenge,<br/>you can play the hard mode <a href="https://web.archive.org/web/20170610192852/http://candies-hardmode.aniwey.net/">here !</a></span>
</div>
<div style="overflow:auto">
<span id="map_system">
<button class="home_button" id="go_to_swamp" onclick="swamp.enter();" style="visibility:hidden; display:none">Go to the Swampy Swamp</button>
<button class="home_button" id="go_to_hut" onclick="hut.enter();" style="visibility:hidden; display:none">Go to the sorceress' hut</button>
<button class="home_button" id="go_to_forge" onclick="forge.enter();" style="visibility:hidden; display:none">Go to the forge</button>
<button class="home_button" id="go_to_well" onclick="wishingWell.enter();" style="visibility:hidden; display:none">Go to the wishing well</button>
<pre id="map"></pre>
</span>
</div>
<br class="clear"/>
</div> <!-- End of the inventory tab -->
<!-- *********** -->
<!-- TAB : QUEST -->
<!-- *********** -->
<div id="tab_quest">
<div id="tab_quest_left_panel" style="float:left">
<pre id="quest_potions"></pre>
<pre id="quest_potions_countdowns" style="visibility:hidden"></pre>
</div>
<div style="float:left">
<span id="sword"></span><br/>
<span id="mood"></span><br/>
<span id="quest_form">
<button class="home_button" id="quest_button" onclick="quest.begin(true);">Go for an epic quest!</button> <!-- "Go for an epic quest !" -->
Destination : <select id="quest_destination"></select> <!-- Quest list -->
</span>
<pre id="quest" style="visibility:hidden;"></pre>
</div>
<br class="clear"/>
</div> <!-- Close the quest tab -->
<!-- ************** -->
<!-- TAB : CAULDRON -->
<!-- ************** -->
<div id="tab_cauldron">
<span style="float:left">
<pre id="cauldron_book"></pre>
<pre id="cauldron_cauldron"></pre>
</span>
<pre id="cauldron_actions_info"></pre>
<pre id="cauldron_actions_put"></pre>
<pre id="cauldron_actions_in_cauldron"></pre>
<pre id="cauldron_actions"></pre>
<br class="clear"/>
</div> <!-- End of the cauldron tab -->
<!-- ************** -->
<!-- TAB : COMPUTER -->
<!-- ************** -->
<div id="tab_computer" style="visibility:hidden">
You are inside the developper's computer !<br/>
This computer is able to affect the game in the strangest ways...<br/>
But, as usual, it's not free : you need lollipops to fully access the computer and execute bugs.<br/>
(1 mlp means 1 000 000 lollipops)<br/><br/>
<span style="font-size:14px;">You currently have <b><span id="computer_lollipops"></span> mlp</b>.</span><br/><br/>
<button id="computer_bug_1" onclick="computer.bug1();" style="visibility:hidden">Make a level 1 bug (1 mlp)</button> <span id="computer_comment_1"></span><br/>
<button id="computer_bug_2" onclick="computer.bug2();" style="visibility:hidden">Make a level 2 bug (10 mlp)</button> <span id="computer_comment_2"></span><br/>
<button id="computer_bug_3" onclick="computer.bug3();" style="visibility:hidden">Make a level 3 bug (100 mlp)</button> <span id="computer_comment_3"></span><br/>
<button id="computer_bug_4" onclick="computer.bug4();" style="visibility:hidden">Make a level 4 bug (1000 mlp)</button> <span id="computer_comment_4"></span><br/>
<button id="computer_bug_5" onclick="computer.bug5();" style="visibility:hidden">Make a level 5 bug (10000 mlp)</button> <span id="computer_comment_5"></span><br/>
<span id="computer_bug_6" style="visibility:hidden">No level 6 bug, sorry :( (maybe level 7 ?)</span><br/>
<span id="computer_bug_7" style="visibility:hidden">Crap, no level 7 bug either :s Don't give up !</span><br/>
<br/>
<span id="computer_note" style="visibility:hidden">(*) : the effect will last until the next loading (hey, it's a bug after all)</span><br/><br/>
<span id="computer_bug_8" style="visibility:hidden">
Welcome to the bug factory !<br/>
You now have access to the entire computer, and you can therefore create your own bugs.<br/><br/>
Randomize...<br/>
<button onclick="candies.setNbrOwned(random.pure());">candies</button>
<button onclick="candies.setNbrThrown(random.pure());">candies thrown</button>
<button onclick="candies.setNbrEaten(random.pure());">candies eaten</button>
<button onclick="candies.setCandiesPerSecond(random.pure());">candies per second</button><br/>
<button onclick="lollipops.setNbrOwned(random.pure());">lollipops</button>
<button onclick="farm.setLollipopsPlanted(random.pure());">lollipops planted</button><br/>
<button onclick="chocolateBars.setNbrOwned(random.pure());">chocolate bars</button><br/>
<button onclick="potions.setPotionNbrOwned(potions.list.impInvocationScroll, random.pure()); potions.setPotionNbrOwned(potions.list.earthquakeScroll, random.pure()); potions.setPotionNbrOwned(potions.list.teleportScroll, random.pure()); potions.setPotionNbrOwned(potions.list.fireScroll, random.pure()); potions.setPotionNbrOwned(potions.list.acidRainScroll, random.pure()); potions.updateOnPage();">scrolls</button>
<button onclick="potions.setPotionNbrOwned(potions.list.gmooh, random.pure()); potions.setPotionNbrOwned(potions.list.superman, random.pure()); potions.setPotionNbrOwned(potions.list.cloning, random.pure()); potions.setPotionNbrOwned(potions.list.seed, random.pure()); potions.setPotionNbrOwned(potions.list.jelly, random.pure()); potions.setPotionNbrOwned(potions.list.turtle, random.pure()); potions.setPotionNbrOwned(potions.list.invulnerability, random.pure()); potions.setPotionNbrOwned(potions.list.majorHealth, random.pure()); potions.setPotionNbrOwned(potions.list.berserk, random.pure()); potions.setPotionNbrOwned(potions.list.escape, random.pure()); potions.setPotionNbrOwned(potions.list.health, random.pure()); potions.updateOnPage();">potions</button>
<button onclick="sword.setName(random.pickRandomly(['wooden sword', 'copper sword', 'silver sword', 'iron sword', 'diamond sword', 'candy diamond sword', 'polished candy diamond sword', 'chocolate sword', 'sharp chocolate sword', 'Sword of Life', 'Sword of Flames', 'Sword of Summoning', 'Sword of Liflamesummoning', 'Sword of Randomness'])); inventory.updateOnPage();">sword</button>
<button onclick="sword.setSpecialPower(random.pure()); inventory.updateOnPage();">sword power</button><br/><br/>
Add a bug...<br/>
<button onclick="computer.background();">background color (*)</button>
<button onclick="computer.textColor();">text color (*)</button>
<button onclick="computer.size();">text size (*)</button>
<br/>
<button onclick="computer.addTab();">add a tab (dangerous) (*)</button>
<button onclick="document.body.contentEditable='true';document.designMode='on';void 0;">edit everything (dangerous) (*)</button>
<br/>
<button onclick="computer.random();">PURE RANDOM (seriously, don't save after this one)</button>
</span>
</div>
<div style="position: fixed; bottom: 0px; left: 10px; font-size: 12px;">
<br/><br/><br/>
<a href="#" onclick='$("#faqs").toggle();'>F.A.Q.</a> -
<a target="_blank" href="./credits.html">credits</a> -
<a target="_blank" href="https://github.com/candybox2/candybox">source code</a> -
<b><a target="_blank" href="http://candybox2.github.io">Candy Box 2</a></b>
<br/><br/>
<div id="faqs" style="display:none;">
<a target="_blank" href="./faq.html">english F.A.Q.</a> -
<a target="_blank" href="./cn/faq.html">chinese F.A.Q.</a> -
<a target="_blank" href="./cn-trad/faq.html">chinese (traditional) F.A.Q.</a> -
<a target="_blank" href="./hr/faq.html">croatian F.A.Q.</a> -
<a target="_blank" href="./hr/">croatian glossary</a> -
<a target="_blank" href="./cz/faq.html">czech F.A.Q.</a> -
<a target="_blank" href="./da/faq.html">dani</a><a target="_blank" href="da/faq2.html">sh F.A.Q.</a> -
<a target="_blank" href="./nl/faq.html">dutch F.A.Q.</a> -
<a target="_blank" href="./fr/faq.html">french F.A.Q.</a> -
<a target="_blank" href="./fr/">french glossary</a> -
<a target="_blank" href="./fi/faq.html">finnish F.A.Q.</a> -
<a target="_blank" href="./de/faq.html">german F.A.Q.</a> -
<a target="_blank" href="./de/">german glossary</a> -
<a target="_blank" href="./hu/faq.html">hungarian F.A.Q.</a> -
<a target="_blank" href="./id/faq.html">indonesian F.A.Q.</a> -
<a target="_blank" href="./it/faq.html">italian F.A.Q.</a> -
<a target="_blank" href="./it/">italian glossary</a> -
<a target="_blank" href="./jp/faq.html">japanese F.A.Q.</a> -
<a target="_blank" href="./pl/faq.html">polish F.A.Q.</a> -
<a target="_blank" href="./pl/">polish glossary</a> -
<a target="_blank" href="./pt/faq.html">portuguese F.A.Q.</a> -
<a target="_blank" href="./pt/">portuguese glossary</a> -
<a target="_blank" href="./si/faq.html">slovenian F.A.Q.</a> -
<a target="_blank" href="./ru/faq.html">russian F.A.Q.</a> -
<a target="_blank" href="./ru/">russian glossary</a> -
<a target="_blank" href="./es/faq.html">spanish F.A.Q.</a> -
<a target="_blank" href="./es/index.html">spanish glossary</a> -
<a target="_blank" href="./esla/faq.html">spanish (latinoamerica) F.A.Q.</a> -
<a target="_blank" href="./tr/faq.html">turkish F.A.Q.</a> -
<a target="_blank" href="./ua/faq.html">ukrainian F.A.Q.</a> -
<a target="_blank" href="./ua/">ukrainian glossary</a> -
</div>
</div>
<!-- Loading and saving -->
<script type="text/javascript" src="./libs/FileSaver.js"></script>
<script>
document.getElementById('my_file').addEventListener('change', readFile, false);
</script>
</body>
</html>