forked from EFHIII/balatro-calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
197 lines (197 loc) · 19.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Balatro Calculator</title>
<link rel="stylesheet" href="style.css">
<meta name="description" content="Calculate the score of any Balatro hand">
<meta name="keywords" content="Balatro, calculator, chips, score, multiplier, tool, joker, card, blueprint, mod">
<meta name="author" content="Edward Haas">
<meta property="og:title" content="Balatro Calculator">
<meta property="og:description" content="Calculate the score of any Balatro hand">
<meta property="og:url" content="https://efhiii.github.io/balatro-calculator">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0" />
<script type="application/ld+json" src="path/to/structured-data.jsonld"></script>
</head>
<body>
<div id="mainContainer">
<div id="containerLeft">
<div class="toggleArea" style="margin-bottom: 1em">
<div id="toggleJoker" class="handLevel">
<span id="toggleJokerBtn" class="lvlBtn" onclick="toggleJoker()">X</span>
<span class="handName">Optimize Jokers (slow)</span>
</div>
</div>
<div class="toggleArea" style="margin-bottom: 1em">
<div id="toggleCard" class="handLevel">
<span id="toggleCardBtn" class="lvlBtn" onclick="toggleCard()">X</span>
<span class="handName">Optimize Hand (slow)</span>
</div>
</div>
<div id="jokerArea"></div>
<span class='limitText'><span id='jokerLimit'>0</span>/7</span><br>
<div id="scoreOfPlay" style="font-size: 2em">
<div id="bestPlayName">High Card<span class="nameLvl"> lvl.1</span></div>
<div id="bestPlayScore"><span class="chipIcon"></span>5</div>
<div id="bestPlayScoreX" class="levelStat" style="position: static; margin: auto; margin-top: 0.125em;">
<span id="scoreChips" class="levelStatB">5</span>X<span id="scoreMult" class="levelStatR">1</span>
</div>
</div>
<div id="bestPlay"></div>
<div id="cardsInHand"></div>
<span class='limitText'><span id='handLimit'>0</span>/8</span><br>
<div class="toggleArea" style="margin-bottom: 1em">
<div id="toggleMinimize" class="handLevel">
<span id="toggleMinimizeBtn" class="lvlBtn" onclick="toggleMinimize()"> </span>
<span class="handName">Minimize Score</span>
</div>
<div id="toggleTheFlint" class="handLevel">
<span id="toggleTheFintBtn" class="lvlBtn" onclick="toggleTheFlint()"> </span>
<span class="handName">The Flint</span>
</div>
<div id="togglePlasma" class="handLevel">
<span id="togglePlasmaBtn" class="lvlBtn" onclick="togglePlasma()"> </span>
<span class="handName">Plasma Deck</span>
</div>
<div id="toggleObservatory" class="handLevel">
<span id="toggleObservatoryBtn" class="lvlBtn" onclick="toggleObservatory()"> </span>
<span class="handName">Observatory</span>
</div>
<div id="consumables" style="display: none"></div>
</div>
<button type="button" class="resetBtn" onClick="playHand()">Play hand</button>
<button type="button" class="resetBtn" onClick="clearHand()">Clear hand</button>
<button type="button" class="resetBtn" onClick="resetHand()">Reset</button>
</div><div id="containerRight">
<div class="menuBtns">
<span class="menuBtn" id="JokersBtn">Jokers</span><span class="menuBtn" id="CardsBtn">Cards</span><span class="menuBtn" id="HandsBtn">Hands</span><span class="menuBtn" id="BreakdownBtn">Breakdown</span><span class="menuBtn" id="ModifyJokerBtn" style="display: none;">Edit</span>
</div>
<div id="Jokers">
<div style="text-align: center;">
<div id="jokerValue" class="handLevel" style="display: inline-block; width: auto; margin: 0.2em; min-width: 0">
<span class="lvlBtn" onclick="incrementJokerValue(-1)">-</span>
<span class="lvlBtn" onclick="incrementJokerValue( 0)">0</span>
<span class="lvlBtn" onclick="incrementJokerValue( 1)">+</span>
<span style="display: block; float: left; margin-left: 0.7em; margin-right:0.5em;margin-top: 0.125em;">Value</span>
<span contenteditable="true" id="jokerVal" class="handLvl" style="width: auto; padding-left: 0.25em; padding-right: 0.25em; min-width: 2.5em;" oninput="setJokerValue()" onfocus="selectAll(this)">0</span>
</div>
</div>
<div style="text-align: center;">
<div id="jokerSearch" class="handLevel" style="display: inline-block; width: auto; margin: 0.2em; min-width: 0">
<span style="display: block; float: left; margin-left: 0.7em; margin-right:0.5em;margin-top: 0.125em;">Search</span>
<input id="SearchVal" class="handLvl" type="text" oninput="searchJoker()" placeholder="Joker Name" style="width: auto; padding-left: 0.25em; padding-right: 0.25em; min-width: 2.5em;">
</div>
</div>
<div id="jokerModifiers" style="text-align: center;">
<div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) -71px 0, url(assets/Enhancers.png) -71px 0px" onclick="jtoggleCardModifier('foil')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #009dff">+50</span> Chips</span></span><span class="modifierName"><span class="descContent">Foil</span></span></span>
</div><div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) -142px 0, url(assets/Enhancers.png) -71px 0px" onclick="jtoggleCardModifier('holographic')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #ff4d40">+10</span> Mult</span></span><span class="modifierName"><span class="descContent">Holographic</span></span></span>
</div><div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) -213px 0, url(assets/Enhancers.png) -71px 0px" onclick="jtoggleCardModifier('polychrome')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #fff; background-color: #ff4d40; border-left: solid; border: solid; border-color: #ff4d40; border-width: 0px 2px 1px 2px; padding-left: 1px; border-radius: 3px;">X1.5</span> Mult</span></span><span class="modifierName"><span class="descContent">Polychrome</span></span></span>
</div><div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) 71px 0, url(assets/Enhancers.png) -71px 0px" onclick="jtoggleCardModifier('disabled')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent">Does not trigger</span></span><span class="modifierName"><span class="descContent">Disabled</span></span></span>
</div>
</div>
<div id="jokers" style="text-align: center"></div>
</div>
<div id="Cards">
<div id="handModifiers" style="text-align: center;width:100%;">
<div class="tooltip">
<div class="modifierCard" style="background: url(assets/Editions.png) -71px 0, url(assets/Enhancers.png) -71px 0px" onclick="toggleCardModifier('foil')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #009dff">+50</span> Chips</span></span><span class="modifierName"><span class="descContent">Foil</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Editions.png) -142px 0, url(assets/Enhancers.png) -71px 0px" onclick="toggleCardModifier('holographic')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #ff4d40">+10</span> Mult</span></span><span class="modifierName"><span class="descContent">Holographic</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Editions.png) -213px 0, url(assets/Enhancers.png) -71px 0px" onclick="toggleCardModifier('polychrome')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #fff; background-color: #ff4d40; border-left: solid; border: solid; border-color: #ff4d40; border-width: 0px 2px 1px 2px; padding-left: 1px; border-radius: 3px;">X1.5</span> Mult</span></span><span class="modifierName"><span class="descContent">Polychrome</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) -71px -95px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('increment')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #009dff">+30</span> Chips</span></span><span class="modifierName"><span class="descContent">Bonus Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) -142px -95px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('mult')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #ff4d40">+4</span> Mult</span></span><span class="modifierName"><span class="descContent">Mult Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) -213px -95px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('wild')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent">Can be used<br>as any suit</span></span><span class="modifierName"><span class="descContent">Wild Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) -355px -95px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('glass')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #fff; background-color: #ff4d40; border-left: solid; border: solid; border-color: #ff4d40; border-width: 0px 2px 1px 2px; padding-left: 1px; border-radius: 3px;">X2</span> Mult<br><span style = "color: #35bd87">1 in 4</span> chance to<br>destroy card</span></span><span class="modifierName"><span class="descContent">Glass Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) -426px -95px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('steel')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #fff; background-color: #ff4d40; border-left: solid; border: solid; border-color: #ff4d40; border-width: 0px 2px 1px 2px; padding-left: 1px; border-radius: 3px;">X1.5</span> Mult<br>while this card<br>stays in hand</span></span><span class="modifierName"><span class="descContent">Steel Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) 142px 0, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('stone')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #009dff">+50</span> Chips</span></span><span class="modifierName"><span class="descContent">Stone Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) 71px 0px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('gold')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #f5b143">$3</span> if this card<br>is in hand<br>at end of round</span></span><span class="modifierName"><span class="descContent">Gold Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) -284px -95px, url(assets/Jokers.png) 0px -855px" onclick="toggleCardModifier('chance')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style = "color: #35bd87">1 in 5</span> chance<br>for <span style="color: #ff4d40">+20</span> Mult<br><span style="color: #35bd87">1 in 20</span> chance<br>to win <span style="color: #f5b143">$20</span></span></span><span class="modifierName"><span class="descContent">Lucky Card</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Enhancers.png) 142px 95px, url(assets/Enhancers.png) -71px 0px" onclick="toggleCardModifier('double')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent">Retrigger this<br>card <span style="color: #ff8f00">1</span> time</span></span><span class="modifierName"><span class="descContent">Red Seal</span></span></span>
</div><div class="tooltip">
<div class="modifierCard" style="background: url(assets/Editions.png) 71px 0, url(assets/Enhancers.png) -71px 0px" onclick="toggleCardModifier('disabled')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent">Does not trigger</span></span><span class="modifierName"><span class="descContent">Disabled</span></span></span>
</div>
</div>
<div id="cards" style="text-align: center"></div>
</div>
<div id="Hands"></div>
<div id="Breakdown"></div>
<div id="ModifyJoker">
<div style="text-align: center;">
<div id="modifyJokerValue" class="handLevel" style="display: inline-block; width: auto; margin: 0.2em; min-width: 0">
<span class="lvlBtn" onclick="incrementModifyJokerValue(-1)">-</span>
<span class="lvlBtn" onclick="incrementModifyJokerValue( 0)">0</span>
<span class="lvlBtn" onclick="incrementModifyJokerValue( 1)">+</span>
<span style="display: block; float: left; margin-left: 0.7em; margin-right:0.5em;margin-top: 0.125em;">Value</span>
<span contenteditable="true" id="modifyJokerVal" class="handLvl" style="width: auto; padding-left: 0.25em; padding-right: 0.25em; min-width: 2.5em;" oninput="setModifyJokerValue()">0</span>
</div>
</div>
<div style="text-align: center;">
<div id="modifyJokerSellValue" class="handLevel" style="display: inline-block; width: auto; margin: 0.2em; min-width: 0">
<span class="lvlBtn" onclick="incrementModifyJokerSellValue(-1)">-</span>
<span class="lvlBtn" onclick="incrementModifyJokerSellValue( 0)">0</span>
<span class="lvlBtn" onclick="incrementModifyJokerSellValue( 1)">+</span>
<span style="display: block; float: left; margin-left: 0.7em; margin-right:0.5em;margin-top: 0.125em;">Sell</span>
<span contenteditable="true" id="modifyJokerSellVal" class="handLvl" style="width: auto; padding-left: 0.25em; padding-right: 0.25em; min-width: 2.5em;" oninput="setModifyJokerSellValue()">0</span>
</div>
</div>
<div id="modifyJokerModifiers" style="text-align: center;">
<div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) -71px 0, url(assets/Enhancers.png) -71px 0px" onclick="mjtoggleCardModifier('foil')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #009dff">+50</span> Chips</span></span><span class="modifierName"><span class="descContent">Foil</span></span></span>
</div><div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) -142px 0, url(assets/Enhancers.png) -71px 0px" onclick="mjtoggleCardModifier('holographic')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #ff4d40">+10</span> Mult</span></span><span class="modifierName"><span class="descContent">Holographic</span></span></span>
</div><div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) -213px 0, url(assets/Enhancers.png) -71px 0px" onclick="mjtoggleCardModifier('polychrome')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent"><span style="color: #fff; background-color: #ff4d40; border-left: solid; border: solid; border-color: #ff4d40; border-width: 0px 2px 1px 2px; padding-left: 1px; border-radius: 3px;">X1.5</span> Mult</span></span><span class="modifierName"><span class="descContent">Polychrome</span></span></span>
</div><div class="tooltip">
<div class="jmodifierCard" style="background: url(assets/Editions.png) 71px 0, url(assets/Enhancers.png) -71px 0px" onclick="mjtoggleCardModifier('disabled')" onmousemove = 'hoverCard(event)' onmouseout = 'noHoverCard(event)'></div>
<span class="tooltiptext"><span class="desc"><span class="descContent">Does not trigger</span></span><span class="modifierName"><span class="descContent">Disabled</span></span></span>
</div>
</div>
<div id="modifyJoker" style="text-align: center"></div>
</div>
</div>
</div><div id="footer">
<a href='https://www.playbalatro.com/' alt='BBalatro Website'><img src='assets/Balatro logo-new.png' style='height: 3em;'></a><br>
<a href='https://www.github.com/EFHIII/balatro-calculator'>view code on GitHub</a>
</div>
<script type="text/javascript" src="hoverCard.js"></script>
<script type="text/javascript" src="cards.js"></script>
<script type="text/javascript" src="breakdown.js"></script>
<script type="text/javascript" src="manageWorkers.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="hand-url.js"></script>
</body>
</html>