forked from iamcal/enchant-order
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (75 loc) · 3.25 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
<html lang="en">
<head>
<title>Minecraft Enchantment Ordering Tool</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
<script src="data.js?2"></script>
<script src="script.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="inner">
<div class="dark-mode-toggle-container">
<button id="darkModeToggle">Dark Mode</button>
</div>
<h1>Minecraft Enchantment Ordering Tool</h1>
<p>
When enchanting items in Minecraft, the order in which you combine armor, weapons and tools with books in your
anvil makes a huge difference. Each time you work on an anvil, you increase the <a
href="https://minecraft.fandom.com/wiki/Anvil_mechanics">work penalty</a> for future workings. Once that
penalty gets too high, you simply can't add any more enchantments and the anvil says "Too Expensive!". This tool
helps you plan the optimal order of combining and applying books, to give you the cheapest possible cost.
</p>
<p>
This tool assume your gear and books start with zero "work penalty". That means you have not previously combined
the books (e.g. to turn two level 1 books into a single level 2 book) or worked the items or books in an anvil
in any way. To create gear with the maximum possible enchantment, you cannot combine lower-level books and must
start with high-level books from villager trading.
</p>
<div id="left">
<p>
<label for="item"></label>
<select id="item" class="selectItem">
<option value="">Choose an item to enchant</option>
</select>
</p>
<div id="enchants" style="display: none">
<table></table>
<div id="overrides" style="display: none">
<p>
</p>
</div>
<p>
<button id="calculate">Calculate »</button>
</p>
</div>
</div>
<div id="right">
<div id="progress" style="display: none">
<img src="spin.svg" width="20" height="20" alt="">
<span class="lbl">Text here</span>
</div>
<div id="solution" style="display: none">
<h2>Optimal solution found!</h2>
<p id="timings">Completed in under a second, trying 1,000,000,000 combinations</p>
<p><b>Total cost:</b> <span id="level-cost">69</span> levels</p>
<h3>Steps</h3>
<ol id="steps">
</ol>
</div>
<div id="error" style="display: none">
<span class="lbl">Text here</span>
</div>
<div id="phone-warn" style="display: none">
<span class="lbl">
You have selected many enchantments and are using a phone or tablet - the calculator may run out of memory and crash.
Try selecting fewer enchantments, or using a computer.
</span>
</div>
</div>
</div>
<div class="footer">
<p>Built by Cal Henderson. <a href="https://github.com/iamcal/enchant-order">Source on Github</a></p>
</div>
</body>
</html>