-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculators.html
More file actions
415 lines (371 loc) · 20.8 KB
/
calculators.html
File metadata and controls
415 lines (371 loc) · 20.8 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculators - Leaf Blower Revolution Tools</title>
<link rel="icon" type="image/png" href="https://cdn2.steamgriddb.com/icon/e97f4360f6ecf96cf0b3b580ad4c43eb/32/512x512.png">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<a href="https://discord.gg/DGzEKEPEJv" class="discord-badge" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
<path d="M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02zM8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12zm6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12z"/>
</svg>
Join Discord
</a>
<a data-tooltip="Made by _creabit and ziemia" href="https://lbr-witch.alessrodrgz.dev/" class="witch-badge" target="_blank" style="top: 70px;">
<img src="https://leafblowerrevolution.wiki.gg/images/e/e6/Witch.png" alt="LBR Witch" style="width: 18px; height: 18px;">
Witch Calculator
</a>
<div class="version-badge">v2.26 Certified</div>
<a href="./index.html"><img src="https://cdn2.steamgriddb.com/icon/e97f4360f6ecf96cf0b3b580ad4c43eb/32/512x512.png"
alt="Official Leaf Blower Revolution Logo"
style="width: 200px;"></a>
<h1>Game Calculators</h1>
</header>
<div class="wip-warning">
<div class="wip-header">
<img src="https://leafblowerrevolution.wiki.gg/images/e/ed/Cog.png" alt="Work in progress" class="wip-image">
<h2>WIP Page</h2>
</div>
<h3>This page is still being developed and you may<br>see placeholder text, inaccurate data, or broken features.</h3>
<h3>POSTED CALCULATORS <u>SHOULD</u> BE ACCURATE</h3>
</div>
<div class="container">
<div class="calculator-grid">
<!-- Orb of BLC Calculator -->
<div class="calculator-card">
<div class="calc-header" onclick="toggleCalculator(this)">
<div class="calc-title">
<h2>Orb of BLC Calculator</h2>
<p>Calculate how many 72hr timeskips you need to use to get enough blc</p>
</div>
<img src="https://leafblowerrevolution.wiki.gg/images/7/7b/Orb_Of_BLC.png"
alt="Orb ob BLC"
class="calc-image">
</div>
<div class="calc-content">
<div class="calculator-ui">
<div class="input-group">
<label>Orbs Per Hour:</label>
<input type="number" id="orbsPerHour" min="0" max="50" value="0">
</div>
<div class="input-group">
<label>Trading Education (0/50):</label>
<input type="number" id="tradingEducation" min="0" max="50" value="0">
</div>
<button onclick="calculateOrbs()">Calculate</button>
<div class="results">
<h3>Results:</h3>
<div class="chest-result gems">
<img src="https://leafblowerrevolution.wiki.gg/images/7/7b/Orb_Of_BLC.png" alt="Common Chest">
<span>Orbs Needed: <span id="orbsNeeded">0</span></span>
</div>
<div class="chest-result uncommon">
<img src="https://leafblowerrevolution.wiki.gg/images/3/35/Clock.png" alt="Uncommon Chest">
<span>72hr Timeskips: <span id="timeskipsNeeded">0</span></span>
</div>
</div>
</div>
</div>
</div>
<!-- Chests Calculator -->
<div class="calculator-card">
<div class="calc-header" onclick="toggleCalculator(this)">
<div class="calc-title">
<h2>Chests Calculator</h2>
<p>Calculate how many chests and gems you will get every hour</p>
</div>
<img src="https://leafblowerrevolution.wiki.gg/images/c/cd/Chest_Rare.png"
alt="Loot Chest"
class="calc-image">
</div>
<div class="calc-content">
<div class="calculator-ui">
<div class="input-group">
<label>Mulched Chests Level (0-20):</label>
<input type="number" id="mulchedChests" min="0" max="20" value="0">
</div>
<div class="input-group">
<label>Mulched Luck Level (0-50):</label>
<input type="number" id="mulchedLuck" min="0" max="50" value="0">
</div>
<div class="input-group">
<label>Extra Spawn Chance (0-20%):</label>
<input type="number" id="extraSpawn" min="0" max="20" value="0">
</div>
<button onclick="calculateChests()">Calculate</button>
<div class="results">
<h3>Chests Per Hour:</h3>
<div class="chest-result common">
<img src="https://leafblowerrevolution.wiki.gg/images/a/a4/Chest_Common.png" alt="Common Chest">
<span>Common: <span id="commonResult">0</span></span>
</div>
<div class="chest-result uncommon">
<img src="https://leafblowerrevolution.wiki.gg/images/d/da/Chest_Uncommon.png" alt="Uncommon Chest">
<span>Uncommon: <span id="uncommonResult">0</span></span>
</div>
<div class="chest-result rare">
<img src="https://leafblowerrevolution.wiki.gg/images/c/cd/Chest_Rare.png" alt="Rare Chest">
<span>Rare: <span id="rareResult">0</span></span>
</div>
<div class="chest-result epic">
<img src="https://leafblowerrevolution.wiki.gg/images/0/09/Chest_Epic.png" alt="Epic Chest">
<span>Epic: <span id="epicResult">0</span></span>
</div>
<div class="chest-result legendary">
<img src="https://leafblowerrevolution.wiki.gg/images/1/11/Chest_Legendary.png" alt="Legendary Chest">
<span>Legendary: <span id="legendaryResult">0</span></span>
</div>
<div class="chest-result gems">
<img src="https://leafblowerrevolution.wiki.gg/images/a/aa/Gem.png" alt="Gem Icon">
<span>Gems: <span id="gemsResult">0</span></span>
</div>
</div>
</div>
</div>
</div>
<!-- Trades Calculator -->
<div class="calculator-card">
<div class="calc-header" onclick="toggleCalculator(this)">
<div class="calc-title">
<h2>Bearo Calculator</h2>
<p>Calculate the amount of gems and beer you will get every hour from Bearo</p>
</div>
<img src="https://leafblowerrevolution.wiki.gg/images/6/6a/Bearo.png"
alt="Bearo Pet"
class="calc-image">
</div>
<div class="calc-content">
<div class="calculator-ui">
<div class="input-row">
<div class="input-group">
<label>Max Trade Level</label>
<input type="number" id="maxTrade" min="0" value="0">
</div>
<div class="input-group">
<label>Min Trade Level</label>
<input type="number" id="minTrade" min="0" value="0">
</div>
</div>
<div class="input-row">
<div class="input-group">
<label>Active Trades</label>
<input type="number" id="tradeAmount" min="0" value="0">
</div>
<div class="input-group">
<label>Trade Time (sec)</label>
<input type="number" id="tradeTime" min="1" value="120">
</div>
</div>
<div class="input-row">
<div class="input-group">
<label>Affordable (%)</label>
<input type="number" id="affordable" min="0" max="100" value="100">
</div>
<div class="input-group">
<label>Global Multiplier (%)</label>
<input type="number" id="multiplier" min="0" value="100">
</div>
</div>
<div class="checkbox-group">
<input type="checkbox" id="boostCheck">
<label for="boostCheck">Boosting Trades?</label>
</div>
<button onclick="calculateTradeEfficiency()">Calculate</button>
<div class="results trade-results">
<div class="chest-result gems">
<img src="https://leafblowerrevolution.wiki.gg/images/a/aa/Gem.png" alt="Gems">
<span>Gems/Hour: <span id="tradeGems">0</span></span>
</div>
<div class="chest-result uncommon">
<img src="https://leafblowerrevolution.wiki.gg/images/b/b3/Beer.png" alt="Beer">
<span>Beer/Hour - NOT ACCURATE YET: <span id="tradeBeer">0</span></span>
</div>
</div>
</div>
</div>
</div>
<!-- ??? Calculator -->
<div class="calculator-card">
<div class="calc-header" onclick="toggleCalculator(this)">
<div class="calc-title">
<h2>??? Calculator</h2>
<p>If you have any ideas for a feature, message me on discord, username: firewry</p>
</div>
<img src="LINK"
alt="???"
class="calc-image">
</div>
<div class="calc-content">
<div class="coming-soon">Calculator UI coming soon...</div>
</div>
</div>
<!-- ??? Calculator -->
<div class="calculator-card">
<div class="calc-header" onclick="toggleCalculator(this)">
<div class="calc-title">
<h2>??? Calculator</h2>
<p>If you have any ideas for a feature, message me on discord, username: firewry</p>
</div>
<img src="LINK"
alt="???"
class="calc-image">
</div>
<div class="calc-content">
<div class="coming-soon">Calculator UI coming soon...</div>
</div>
</div>
</div>
</div>
<footer>
<p>© 2024 LBR Tools - Unofficial Community Resource</p>
<p>All game content and logos © Humble North Games</p>
</footer>
<script>
// Toggle calculator expansion
function toggleCalculator(element) {
const card = element.parentElement;
const content = card.querySelector('.calc-content');
card.classList.toggle('expanded');
content.style.maxHeight = card.classList.contains('expanded') ?
content.scrollHeight + "px" : "0";
}
</script>
<script>
function calculateChests() {
// Get input values
const mulchedChests = parseInt(document.getElementById('mulchedChests').value) || 0;
const mulchedLuck = parseInt(document.getElementById('mulchedLuck').value) || 0;
const extraSpawn = parseInt(document.getElementById('extraSpawn').value) || 0;
// Calculate spawn chance
const baseSpawn = 5 + (mulchedChests * 0.5) + extraSpawn;
const spawnChance = Math.round(baseSpawn) / 100;
// Calculate hourly rates
const checksPerHour = 150;
const totalChests = Math.round(spawnChance * checksPerHour);
// Initialize chest counters
let common = 0, uncommon = 0, rare = 0, epic = 0, legendary = 0;
// Calculate chest distribution
for (let i = 0; i < totalChests; i++) {
const random = Math.random() * 100; // 0-100
const maxRarity = random / Math.pow(1 + mulchedLuck, 1.5);
// Check thresholds from rarest to most common
if (maxRarity <= .1) {
legendary++;
} else if (maxRarity <= 1) {
epic++;
} else if (maxRarity <= 10) {
rare++;
} else if (maxRarity <= 33.33) {
uncommon++;
} else {
common++;
}
}
// Calculate gems
const gems = (common * .2) + (uncommon * .4) + (rare * .9) + (epic * 2.8) + (legendary * 7.5);
// Update UI
document.getElementById('commonResult').textContent = Math.round(common);
document.getElementById('uncommonResult').textContent = Math.round(uncommon);
document.getElementById('rareResult').textContent = Math.round(rare);
document.getElementById('epicResult').textContent = Math.round(epic);
document.getElementById('legendaryResult').textContent = Math.round(legendary);
document.getElementById('gemsResult').textContent = Math.round(gems);
}
document.getElementById('mulchedChests').addEventListener('input', function(e) {
this.value = Math.min(20, Math.max(0, parseInt(this.value) || 0));
});
document.getElementById('mulchedLuck').addEventListener('input', function(e) {
this.value = Math.min(50, Math.max(0, parseInt(this.value) || 0));
});
document.getElementById('extraSpawn').addEventListener('input', function(e) {
this.value = Math.min(20, Math.max(0, parseInt(this.value) || 0));
});
</script>
<script>
function calculateOrbs() {
const orbsPerHour = parseFloat(document.getElementById('orbsPerHour').value) || 0;
const currentLevel = parseInt(document.getElementById('tradingEducation').value) || 0;
// Calculate total BLC cost for all remaining levels
let totalCost = 0;
for(let n = currentLevel + 1; n <= 50; n++) {
totalCost += 20000000 * Math.pow(24, n); // Cost for each level
}
// Calculate required orbs (assuming current BLC = 1)
let orbsNeeded = 0;
if (totalCost > 0) {
// Using formula: BLC * (1.05^orbs - 1) = totalCost
// Solved for orbs: orbs = log1.05((totalCost/BLC) + 1)
let initialBLC = 3 * (20000000 * Math.pow(24, currentLevel));
if (currentLevel <= 2){
initialBLC = 200000000000
}
orbsNeeded = Math.log((totalCost/initialBLC) + 1) / Math.log(1.05);
}
// Calculate timeskips needed
const hoursNeeded = orbsNeeded / orbsPerHour;
const timeskipsNeeded = Math.ceil(hoursNeeded / 72);
// Display results
document.getElementById('orbsNeeded').textContent = Math.ceil(orbsNeeded);
document.getElementById('timeskipsNeeded').textContent = timeskipsNeeded || 0;
}
// Add input validation
document.getElementById('orbsPerHour').addEventListener('input', function(e) {
this.value = Math.min(50, Math.max(0, parseInt(this.value) || 0));
});
document.getElementById('tradingEducation').addEventListener('input', function(e) {
this.value = Math.min(50, Math.max(0, parseInt(this.value) || 0));
});
</script>
<script>
function calculateTradeEfficiency() {
// Input values
const max = Math.max(parseFloat(document.getElementById('maxTrade').value) || 0,
parseFloat(document.getElementById('minTrade').value) || 0);
const min = Math.min(parseFloat(document.getElementById('maxTrade').value) || 0,
parseFloat(document.getElementById('minTrade').value) || 0);
const trades = parseFloat(document.getElementById('tradeAmount').value) || 0;
const time = parseFloat(document.getElementById('tradeTime').value) || 120;
const percent = parseFloat(document.getElementById('affordable').value) || 100;
const multiplier = parseFloat(document.getElementById('multiplier').value) || 100;
const boosting = document.getElementById('boostCheck').checked;
// Calculations
const adjTime = time + 60
const hourlyTrades = (3600 / adjTime) * trades * (percent/100);
const gemTrades = Math.floor(hourlyTrades * 0.06);
const beerTrades = Math.floor(hourlyTrades * 0.072);
// Gem calculation
let totalGems = 0;
for(let i = 0; i < gemTrades; i++) {
const level = boosting ? max : Math.random() * (max - min) + min;
totalGems += (Math.random() * (level/5 - level/10) + level/10);
}
// Beer calculation
let totalBeer = 0;
for(let i = 0; i < beerTrades; i++) {
const level = boosting ? max : Math.random() * (max - min) + min;
let beerMulti = 1;
if(level >= 50) beerMulti = 3;
else if(level >= 33) beerMulti = 2;
totalBeer += (beerMulti * multiplier) / 100;
}
// Update UI
document.getElementById('tradeGems').textContent = totalGems.toFixed(0);
document.getElementById('tradeBeer').textContent = totalBeer.toFixed(0);
}
// Input validation
document.querySelectorAll('#maxTrade, #minTrade, #tradeAmount, #tradeTime, #affordable, #multiplier')
.forEach(input => {
input.addEventListener('input', function() {
const maxVal = this.id === 'affordable' ? 100 : Infinity;
this.value = Math.max(this.min || 0,
Math.min(maxVal,
parseFloat(this.value) || 0));
});
});
</script>
</body>
</html>