-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
495 lines (481 loc) · 17.2 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
<!DOCTYPE html>
<html lang="zh-tw">
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/css/materialize.min.css">
<!--RWD-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
display: flex;
min-height: 100vh;
flex-direction: column;
background-color: #e0e0e0;
}
main {
flex: 1 0 auto;
}
.page-footer {
background-color: #1b5e20;
}
span.badge {
color: #ffffff;
}
label[for="bandit"],label[for="curse_lvl"] {
color: black;
}
</style>
<title>The Volatile Abyss - Resistance Calculator</title>
</head>
<body>
<nav class="teal darken-3" role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" href="#" class="brand-logo">The Volatile Abyss</a>
<ul class="right hide-on-med-and-down">
<li><a href="http://www.bsql.com.tw" target="_blank">Twitch</a></li>
</ul>
<ul id="nav-mobile" class="side-nav">
<li><a href="http://www.bsql.com.tw" target="_blank">Twitch</a></li>
</ul>
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
</div>
</nav>
<main>
<div class="section no-pad-bot" id="index-banner">
<div class="container">
<h3 class="header center blue-grey-text">Equipment resistance calculator</h3>
<div class="section">
<div class="row">
<div class="col m12 l7">
<ul class="collapsible popout" data-collapsible="accordion">
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Helmet
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="helmet-fire" type="number" name="helmet-fire" />
<label for="helmet-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="helmet-cold" type="number" name="helmet-cold" />
<label for="helmet-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="helmet-light" type="number" name="helmet-light" />
<label for="helmet-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="helmet-chaos" type="number" name="helmet-chaos" />
<label for="helmet-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Body
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="body-fire" type="number" name="body-fire" />
<label for="body-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="body-cold" type="number" name="body-cold" />
<label for="body-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="body-light" type="number" name="body-light" />
<label for="body-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="body-chaos" type="number" name="body-chaos" />
<label for="body-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Gloves
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="gloves-fire" type="number" name="gloves-fire" />
<label for="gloves-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="gloves-cold" type="number" name="gloves-cold" />
<label for="gloves-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="gloves-light" type="number" name="gloves-light" />
<label for="gloves-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="gloves-chaos" type="number" name="gloves-chaos" />
<label for="gloves-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Boots
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="boots-fire" type="number" name="boots-fire" />
<label for="boots-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="boots-cold" type="number" name="boots-cold" />
<label for="boots-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="boots-light" type="number" name="boots-light" />
<label for="boots-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="boots-chaos" type="number" name="boots-chaos" />
<label for="boots-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Amulet
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="amulet-fire" type="number" name="amulet-fire" />
<label for="amulet-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="amulet-cold" type="number" name="amulet-cold" />
<label for="amulet-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="amulet-light" type="number" name="amulet-light" />
<label for="amulet-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="amulet-chaos" type="number" name="amulet-chaos" />
<label for="amulet-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Ring(Left)
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="ringL-fire" type="number" name="ringL-fire" />
<label for="ringL-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="ringL-cold" type="number" name="ringL-cold" />
<label for="ringL-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="ringL-light" type="number" name="ringL-light" />
<label for="ringL-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="ringL-chaos" type="number" name="ringL-chaos" />
<label for="ringL-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Ring(Right)
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="ringR-fire" type="number" name="ringR-fire" />
<label for="ringR-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="ringR-cold" type="number" name="ringR-cold" />
<label for="ringR-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="ringR-light" type="number" name="ringR-light" />
<label for="ringR-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="ringR-chaos" type="number" name="ringR-chaos" />
<label for="ringR-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Belt
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="belt-fire" type="number" name="belt-fire" />
<label for="belt-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="belt-cold" type="number" name="belt-cold" />
<label for="belt-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="belt-light" type="number" name="belt-light" />
<label for="belt-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="belt-chaos" type="number" name="belt-chaos" />
<label for="belt-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Main Hand
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="mhand-fire" type="number" name="mhand-fire" />
<label for="mhand-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="mhand-cold" type="number" name="mhand-cold" />
<label for="mhand-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="mhand-light" type="number" name="mhand-light" />
<label for="mhand-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="mhand-chaos" type="number" name="mhand-chaos" />
<label for="mhand-chaos">Chaos Resistance</label>
</div>
</div>
</li>
<li>
<div class="collapsible-header">
<span class="badge purple"></span>
<span class="badge yellow"></span>
<span class="badge blue"></span>
<span class="badge red"></span>
Off Hand
</div>
<div class="collapsible-body">
<div class="input-field">
<input id="ohand-fire" type="number" name="ohand-fire" />
<label for="ohand-fire">Fire Resistance</label>
</div>
<div class="input-field">
<input id="ohand-cold" type="number" name="ohand-cold" />
<label for="ohand-cold">Cold Resistance</label>
</div>
<div class="input-field">
<input id="ohand-light" type="number" name="ohand-light" />
<label for="ohand-light">Lightning Resistance</label>
</div>
<div class="input-field">
<input id="ohand-chaos" type="number" name="ohand-chaos" />
<label for="ohand-chaos">Chaos Resistance</label>
</div>
</div>
</li>
</ul>
</div>
<div class="col m12 l5">
<ul class="collection">
<li class="collection-item">
<input id="bandit" name="bandit_10" type="checkbox" />
<label for="bandit">Bandit Reward: +10% All Res.</label>
</li>
<li class="collection-item poeurl">
Passives
<span id="pass_chaos" class="badge purple">0%</span>
<span id="pass_light" class="badge yellow">0%</span>
<span id="pass_cold" class="badge blue">0%</span>
<span id="pass_fire" class="badge red">0%</span>
</li>
<li class="collection-item">
Original
<span id="total_chaos" class="badge purple">0%</span>
<span id="total_light" class="badge yellow">0%</span>
<span id="total_cold" class="badge blue">0%</span>
<span id="total_fire" class="badge red">0%</span>
</li>
<li class="collection-item">
Merciless
<span id="merci_chaos" class="badge purple">-60%</span>
<span id="merci_light" class="badge yellow">-60%</span>
<span id="merci_cold" class="badge blue">-60%</span>
<span id="merci_fire" class="badge red">-60%</span>
</li>
<li class="collection-item">
<div class="input-field">
<span id="elew_chaos" class="badge purple">-60%</span>
<span id="elew_light" class="badge yellow">-60%</span>
<span id="elew_cold" class="badge blue">-60%</span>
<span id="elew_fire" class="badge red">-60%</span>
<input id="curse_lvl" type="number" min="0" max="30" value="15"/>
<label for="curse_lvl">Elemental Weakness</label>
</div>
</li>
</ul>
<div class="input-field poeurl">
<input id="character_url" type="text" name="ch_url" />
<label for="character_url">Apply your Character</label>
</div>
<div class="input-field poeurl">
<input id="passive_url" type="text" name="sk_url" />
<label for="passive_url">Apply existed Passive tree</label>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<footer class="page-footer">
<!--
<div class="container">
<div class="row">
<h5 class="white-text right-align">The Volatile Abyss</h5>
</div>
</div>
-->
<div class="footer-copyright">
<div class="container">
Since 2017
<a class="grey-text text-lighten-4 right" href="https://github.com/terces/">Contact me</a>
</div>
</div>
</footer>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/js/materialize.min.js"></script>
<script>
// for material compoment
$(document).ready( function() {
$('.collapsible').collapsible();
});
</script>
<script type="text/javascript" src="js/260skTreeData.js"></script>
<script>
// global res
var color_map = { 'chaos':'purple', 'light':'yellow', 'cold':'blue', 'fire':'red'};
var res_total = { 'fire': 0, 'cold': 0, 'light': 0, 'chaos': 0};
var res_cap = { 'fire': 75, 'cold': 75, 'light': 75, 'chaos': 75};
function bind_res_to_header( base, res) {
var cur = document.querySelector( 'input[name="' + base + '-' + res +'"]');
var li_header = cur.parentElement.parentElement.previousElementSibling;
var badge = li_header.querySelector('span.badge.' + color_map[res]);
if( Number( cur.value) != 0) {
badge.style.display = "inline";
badge.innerHTML = cur.value.toString() + "%";
}
else
badge.style.display = "none"
};
function update_res() {
var ipt_ress = document.querySelectorAll( 'input[name$="-fire"],input[name$="-cold"],input[name$="-light"],input[name$="chaos"]');
var l = ipt_ress.length;
var b10 = document.querySelector('#bandit').checked;
var elew = Number( document.querySelector('#curse_lvl').value);
var ress = [ 'fire', 'cold', 'light', 'chaos'];
res_total.fire = res_total.cold = res_total.light = res_total.chaos = 0;
for( var i = 0; i < l; ++i) {
var cur = ipt_ress[i];
var res = cur.id.split('-')[1];
res_total[res] += Number( cur.value);
}
for( var i = 0; i < 4; ++i) {
var res_t = res_total[ress[i]];
var out;
if( b10 && ( ress[i] != "chaos"))
res_t += 10;
out = res_t;
document.querySelector( '#total_' + ress[i]).innerHTML = out.toString() + "%";
// merciless
out = (res_t - 60) >= res_cap[ ress[i]] ? res_cap[ress[i]] : res_t - 60;
document.querySelector( '#merci_' + ress[i]).innerHTML = out.toString() + "%";
// elemantal weakness
if( ress[i] != "chaos")
out = res_t - 60 - ( 19 + elew) >= res_cap[ ress[i]] ? res_cap[ ress[i]] : res_t - 60 - ( 19 + elew);
document.querySelector( '#elew_' + ress[i]).innerHTML = out.toString() + "%";
}
return ;
}
var ipt_ress = document.querySelectorAll( 'input[name$="-fire"],input[name$="-cold"],input[name$="-light"],input[name$="chaos"]');
var l = ipt_ress.length;
for( var i = 0; i < l; ++i) {
ipt_ress[i].oninput = function( e) {
var base = e.target.id.split('-')[0];
var res = e.target.id.split('-')[1];
bind_res_to_header( base, res);
update_res();
};
}
var badge = document.querySelectorAll( 'div.collapsible-header span.badge');
l = badge.length;
for( var i = 0; i < l; ++i)
badge[i].style.display = "none";
var b10 = document.querySelector('#bandit');
b10.onchange = update_res;
var elew = document.querySelector('#curse_lvl');
elew.oninput= update_res;
update_res();
/*
// not ready function
var h = document.querySelectorAll( '.poeurl');
for( var i = 0; i < h.length; ++i)
h[i].style.display = "none";
*/
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-96931167-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>