-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGRUDGE_Item_Database.html
More file actions
730 lines (658 loc) · 42.1 KB
/
GRUDGE_Item_Database.html
File metadata and controls
730 lines (658 loc) · 42.1 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
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
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GRUDGE Item Database — ObjectStore</title>
<meta name="description" content="Complete catalog of Grudge Warlords items — weapons, armor, relics, enchants, infusions, materials and more.">
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link href="https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=Spectral+SC:ital,wght@0,400;0,600;1,400&family=Uncial+Antiqua&display=swap" rel="stylesheet">
<style>
:root {
--gold: hsl(43 85% 55%);
--gold-light: hsl(43 90% 70%);
--gold-dark: hsl(43 70% 35%);
--gold-dim: hsla(43,85%,55%,0.12);
--bg: hsl(225 32% 6%);
--bg-mid: hsl(225 28% 10%);
--bg-card: hsl(225 25% 13%);
--bg-card-hover: hsl(225 25% 17%);
--border: hsl(225 20% 18%);
--border-gold: hsl(43 50% 28%);
--border-gold-hover: hsl(43 60% 42%);
--text: hsl(45 25% 88%);
--text-muted: hsl(45 12% 55%);
--text-dim: hsl(45 8% 38%);
--sidebar-w: 220px;
--radius: 10px;
--radius-sm: 6px;
--transition: 0.18s ease;
}
*{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{font-family:'Spectral SC',Georgia,serif;background:var(--bg);color:var(--text);min-height:100vh;overflow-x:hidden;}
/* Header */
.site-header{background:linear-gradient(180deg,hsl(225 28% 13%) 0%,hsl(225 30% 8%) 100%);border-bottom:1px solid var(--border-gold);padding:14px 20px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:100;box-shadow:0 4px 24px rgba(0,0,0,0.5);}
.site-header img{height:32px;width:32px;object-fit:contain;}
.site-header h1{font-family:'Cinzel Decorative',serif;font-size:1.25rem;font-weight:900;background:linear-gradient(135deg,var(--gold-light),var(--gold),var(--gold-dark));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;white-space:nowrap;}
.header-sub{font-family:'Uncial Antiqua',serif;font-size:0.72rem;color:var(--text-muted);letter-spacing:0.06em;margin-left:auto;white-space:nowrap;}
.header-counts{display:flex;gap:8px;margin-left:10px;}
.hcount{text-align:center;background:var(--gold-dim);border:1px solid var(--border-gold);border-radius:var(--radius-sm);padding:2px 9px;font-family:'Cinzel',serif;font-size:0.68rem;}
.hcount strong{display:block;color:var(--gold);font-size:0.9rem;line-height:1.2;}
/* Layout */
.layout{display:flex;height:calc(100vh - 65px);overflow:hidden;}
/* Sidebar */
.sidebar{width:var(--sidebar-w);flex-shrink:0;background:var(--bg-mid);border-right:1px solid var(--border);overflow-y:auto;padding:8px 0;}
.sidebar::-webkit-scrollbar{width:3px;}
.sidebar::-webkit-scrollbar-thumb{background:var(--border-gold);border-radius:3px;}
.sidebar-label{font-family:'Cinzel',serif;font-size:0.59rem;font-weight:700;text-transform:uppercase;letter-spacing:0.14em;color:var(--text-dim);padding:10px 14px 4px;display:flex;align-items:center;gap:6px;}
.sidebar-label::after{content:'';flex:1;height:1px;background:var(--border);}
.nav-btn{display:flex;align-items:center;gap:8px;width:100%;padding:7px 14px;background:none;border:none;border-left:3px solid transparent;color:var(--text-muted);font-family:'Spectral SC',serif;font-size:0.82rem;cursor:pointer;transition:all var(--transition);text-align:left;}
.nav-btn:hover{background:var(--bg-card);color:var(--text);}
.nav-btn.active{border-left-color:var(--gold);color:var(--gold);background:var(--gold-dim);}
.nav-btn .badge{margin-left:auto;font-size:0.65rem;color:var(--text-dim);background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:1px 6px;font-family:'Cinzel',serif;}
.nav-btn .ico{font-size:0.9rem;width:16px;text-align:center;flex-shrink:0;}
.sidebar-divider{height:1px;background:var(--border);margin:6px 0;}
.tier-filters{padding:0 10px 8px;}
.tier-row{display:flex;flex-wrap:wrap;gap:4px;}
.tier-btn{padding:3px 8px;border-radius:var(--radius-sm);border:1px solid var(--border);background:none;color:var(--text-muted);font-family:'Cinzel',serif;font-size:0.68rem;cursor:pointer;transition:all var(--transition);}
.tier-btn:hover{border-color:var(--gold);color:var(--gold);}
.tier-btn.active{background:var(--gold);color:#0a0e14;border-color:var(--gold);}
/* Weapon sub-filter strip */
.subfilter-strip{display:none;padding:6px 12px;gap:4px;flex-wrap:wrap;background:var(--bg-mid);border-bottom:1px solid var(--border);}
.subfilter-strip.visible{display:flex;}
.sf-btn{padding:3px 10px;border-radius:20px;border:1px solid var(--border);background:none;color:var(--text-muted);font-family:'Cinzel',serif;font-size:0.66rem;cursor:pointer;transition:all var(--transition);white-space:nowrap;}
.sf-btn:hover{border-color:var(--gold);color:var(--gold);}
.sf-btn.active{background:var(--gold-dim);border-color:var(--gold);color:var(--gold);}
/* Main */
.main{flex:1;display:flex;flex-direction:column;overflow:hidden;}
.toolbar{padding:10px 16px;background:var(--bg-mid);border-bottom:1px solid var(--border);display:flex;gap:8px;align-items:center;}
.search-wrap{flex:1;position:relative;}
.search-wrap svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-dim);pointer-events:none;}
#searchBox{width:100%;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:7px 11px 7px 32px;color:var(--text);font-family:'Spectral SC',serif;font-size:0.85rem;outline:none;transition:border-color var(--transition);}
#searchBox:focus{border-color:var(--gold);}
#searchBox::placeholder{color:var(--text-dim);}
.sort-select{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text-muted);font-family:'Spectral SC',serif;font-size:0.78rem;padding:6px 10px;outline:none;cursor:pointer;}
.result-info{font-family:'Cinzel',serif;font-size:0.68rem;color:var(--text-dim);white-space:nowrap;}
/* Grid */
.grid-wrap{flex:1;overflow-y:auto;padding:12px 16px;}
.grid-wrap::-webkit-scrollbar{width:5px;}
.grid-wrap::-webkit-scrollbar-thumb{background:var(--border-gold);border-radius:3px;}
.items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px;}
/* Card */
.item-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:10px;cursor:pointer;transition:all var(--transition);position:relative;display:flex;flex-direction:column;gap:6px;animation:fadeUp 0.2s ease both;}
@keyframes fadeUp{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
.item-card:hover{background:var(--bg-card-hover);border-color:var(--border-gold-hover);transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,0.45);}
.item-card.active{border-color:var(--gold);background:var(--bg-card-hover);}
.tier-stripe{position:absolute;top:0;left:0;right:0;height:3px;border-radius:var(--radius) var(--radius) 0 0;}
/* Icon cell — tier-based glow on hover */
.item-icon-wrap{width:64px;height:64px;margin:4px auto 0;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;background:rgba(0,0,0,0.35);}
.item-icon-wrap img{width:100%;height:100%;object-fit:contain;transition:filter var(--transition);}
.item-card[data-tier="1"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 5px rgba(139,115,85,0.5));}
.item-card[data-tier="2"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 5px rgba(168,168,168,0.55));}
.item-card[data-tier="3"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 6px rgba(74,158,255,0.6));}
.item-card[data-tier="4"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 7px rgba(157,77,255,0.6));}
.item-card[data-tier="5"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 7px rgba(255,77,77,0.6));}
.item-card[data-tier="6"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 8px rgba(255,140,0,0.65));}
.item-card[data-tier="7"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 9px rgba(212,168,75,0.7));}
.item-card[data-tier="8"]:hover .item-icon-wrap img{filter:drop-shadow(0 0 10px rgba(255,255,255,0.65));}
.item-icon-fallback{font-size:1.9rem;line-height:1;}
.item-name{font-family:'Cinzel',serif;font-size:0.72rem;font-weight:600;color:var(--text);text-align:center;line-height:1.3;}
.item-meta{display:flex;gap:3px;flex-wrap:wrap;justify-content:center;}
.tag{font-family:'Cinzel',serif;font-size:0.58rem;text-transform:uppercase;letter-spacing:0.04em;padding:1px 5px;border-radius:10px;border:1px solid;}
.tag-tier{background:transparent;}
.tag-cat{background:var(--bg);border-color:var(--border);color:var(--text-dim);}
/* Load More */
.load-more-wrap{text-align:center;padding:16px;}
.load-more-btn{background:var(--gold-dim);border:1px solid var(--border-gold);color:var(--gold);font-family:'Cinzel',serif;font-size:0.82rem;padding:8px 24px;border-radius:var(--radius-sm);cursor:pointer;transition:all var(--transition);}
.load-more-btn:hover{background:var(--gold);color:#0a0e14;}
/* States */
.state-message{text-align:center;padding:60px 20px;color:var(--text-dim);}
.state-message .big{font-size:2.5rem;margin-bottom:12px;}
.state-message p{font-family:'Cinzel',serif;font-size:0.82rem;}
.loading-orb{display:inline-block;width:12px;height:12px;border:2px solid var(--border-gold);border-top-color:var(--gold);border-radius:50%;animation:spin 0.8s linear infinite;margin-right:6px;}
@keyframes spin{to{transform:rotate(360deg);}}
/* Detail Drawer */
.detail-drawer{width:330px;flex-shrink:0;background:var(--bg-mid);border-left:1px solid var(--border-gold);overflow-y:auto;display:none;flex-direction:column;}
.detail-drawer.open{display:flex;}
.detail-drawer::-webkit-scrollbar{width:3px;}
.detail-drawer::-webkit-scrollbar-thumb{background:var(--border-gold);border-radius:3px;}
.drawer-header{padding:12px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:8px;position:sticky;top:0;background:var(--bg-mid);z-index:10;}
.drawer-close{margin-left:auto;background:none;border:1px solid var(--border);color:var(--text-muted);width:24px;height:24px;border-radius:6px;cursor:pointer;font-size:0.85rem;display:flex;align-items:center;justify-content:center;transition:all var(--transition);}
.drawer-close:hover{border-color:var(--gold);color:var(--gold);}
.drawer-icon-wrap{width:80px;height:80px;background:rgba(0,0,0,0.4);border-radius:var(--radius);display:flex;align-items:center;justify-content:center;overflow:hidden;margin:14px auto 0;border:1px solid var(--border-gold);}
.drawer-icon-wrap img{width:100%;height:100%;object-fit:contain;}
.drawer-icon-fb{font-size:2.6rem;}
.drawer-body{padding:0 14px 22px;}
.drawer-name{font-family:'Cinzel Decorative',serif;font-size:0.95rem;font-weight:700;color:var(--gold-light);text-align:center;margin:10px 0 4px;line-height:1.3;}
.drawer-chips{display:flex;gap:5px;justify-content:center;flex-wrap:wrap;margin-bottom:10px;}
.chip{font-family:'Cinzel',serif;font-size:0.66rem;padding:2px 10px;border-radius:10px;border:1px solid;}
.drawer-desc{font-size:0.8rem;color:var(--text-muted);font-style:italic;line-height:1.65;margin-bottom:10px;text-align:center;}
.section-title{font-family:'Cinzel',serif;font-size:0.62rem;font-weight:700;text-transform:uppercase;letter-spacing:0.12em;color:var(--text-dim);margin:14px 0 7px;display:flex;align-items:center;gap:7px;}
.section-title::after{content:'';flex:1;height:1px;background:var(--border);}
/* Stat bars */
.stat-row{display:flex;align-items:center;gap:7px;margin-bottom:5px;}
.stat-key{font-family:'Cinzel',serif;font-size:0.65rem;color:var(--text-muted);width:80px;flex-shrink:0;text-transform:capitalize;}
.stat-bar-wrap{flex:1;height:4px;background:var(--bg);border-radius:3px;overflow:hidden;}
.stat-bar{height:100%;border-radius:3px;transition:width 0.5s ease;}
.stat-val{font-family:'Cinzel',serif;font-size:0.7rem;color:var(--gold);width:30px;text-align:right;}
/* Enchant effect badge */
.effect-badge{display:flex;align-items:center;justify-content:center;gap:10px;background:linear-gradient(135deg,rgba(212,168,75,0.12),rgba(212,168,75,0.04));border:1px solid var(--border-gold);border-radius:var(--radius);padding:12px 16px;margin:8px 0;}
.eff-stat{font-family:'Cinzel',serif;font-size:0.68rem;color:var(--text-muted);text-transform:capitalize;}
.eff-val{font-family:'Cinzel Decorative',serif;font-size:1.5rem;color:var(--gold);font-weight:700;line-height:1;}
.eff-type{font-family:'Cinzel',serif;font-size:0.6rem;color:var(--text-dim);}
/* Infusion 2-col badge */
.infusion-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0;}
.inf-cell{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px;text-align:center;}
.inf-val{font-family:'Cinzel',serif;font-size:1.1rem;color:var(--gold);font-weight:700;}
.inf-label{font-family:'Cinzel',serif;font-size:0.59rem;color:var(--text-dim);text-transform:uppercase;letter-spacing:0.08em;margin-top:2px;}
/* Recipe */
.recipe-list{display:flex;flex-direction:column;gap:4px;}
.recipe-row{display:flex;align-items:center;gap:8px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:5px 9px;}
.r-qty{font-family:'Cinzel',serif;font-size:0.72rem;color:var(--gold);min-width:22px;}
.r-name{font-family:'Spectral SC',serif;font-size:0.74rem;color:var(--text-muted);flex:1;text-transform:capitalize;}
.r-note{font-family:'Cinzel',serif;font-size:0.62rem;color:var(--text-dim);}
/* Ability items */
.ability-list{display:flex;flex-direction:column;gap:4px;}
.ability-item{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:5px 9px;font-size:0.75rem;color:var(--text-muted);line-height:1.4;}
.ability-item.sig{border-color:var(--gold-dark);color:var(--gold-light);background:var(--gold-dim);}
.ability-item.fx{border-color:rgba(168,85,247,0.3);color:#c084fc;background:rgba(168,85,247,0.05);}
/* Tag cloud */
.detail-tags{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:6px;}
.detail-tag{font-family:'Cinzel',serif;font-size:0.62rem;text-transform:uppercase;letter-spacing:0.05em;padding:2px 8px;border-radius:10px;background:var(--bg-card);border:1px solid var(--border);color:var(--text-muted);}
.el-fire{border-color:rgba(239,68,68,.4)!important;color:#fca5a5!important;}
.el-frost{border-color:rgba(59,130,246,.4)!important;color:#93c5fd!important;}
.el-lightning{border-color:rgba(250,204,21,.4)!important;color:#fde047!important;}
.el-nature{border-color:rgba(34,197,94,.4)!important;color:#86efac!important;}
.el-arcane{border-color:rgba(168,85,247,.4)!important;color:#c084fc!important;}
.el-holy{border-color:rgba(251,191,36,.4)!important;color:#fde68a!important;}
.el-shadow{border-color:rgba(99,102,241,.3)!important;color:#a5b4fc!important;}
.uuid-line{font-family:'Cinzel',serif;font-size:0.57rem;color:var(--text-dim);word-break:break-all;line-height:1.5;}
/* Responsive */
@media(max-width:768px){
.site-header h1{font-size:1rem;}
.header-counts,.header-sub{display:none;}
.layout{flex-direction:column;height:auto;}
.sidebar{width:100%;height:auto;flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:5px;border-right:none;border-bottom:1px solid var(--border);}
.sidebar-label,.sidebar-divider,.tier-filters{display:none;}
.nav-btn{white-space:nowrap;padding:5px 11px;border-left:none;border-bottom:3px solid transparent;flex-shrink:0;font-size:0.74rem;}
.nav-btn.active{border-left:none;border-bottom-color:var(--gold);}
.main{overflow:visible;}
.grid-wrap{overflow-y:visible;padding:8px;}
.detail-drawer{width:100%;border-left:none;border-top:1px solid var(--border-gold);}
}
</style>
</head>
<body>
<header class="site-header">
<img src="favicon.svg" alt="Grudge Studio">
<h1>GRUDGE ITEM DATABASE</h1>
<span class="header-sub">ObjectStore v3 — Live master catalog</span>
<div class="header-counts" id="headerCounts"></div>
</header>
<div class="layout">
<!-- Sidebar -->
<nav class="sidebar">
<div class="sidebar-label">Browse</div>
<button class="nav-btn active" data-type="all" onclick="setType('all')">
<span class="ico">📖</span> All Items <span class="badge" id="count-all">—</span>
</button>
<div class="sidebar-label">Equipment</div>
<button class="nav-btn" data-type="weapon" onclick="setType('weapon')">
<span class="ico">⚔️</span> Weapons <span class="badge" id="count-weapon">—</span>
</button>
<button class="nav-btn" data-type="armor" onclick="setType('armor')">
<span class="ico">🛡️</span> Armor <span class="badge" id="count-armor">—</span>
</button>
<button class="nav-btn" data-type="relic" onclick="setType('relic')">
<span class="ico">💎</span> Relics <span class="badge" id="count-relic">—</span>
</button>
<div class="sidebar-label">Consumables</div>
<button class="nav-btn" data-type="consumable" onclick="setType('consumable')">
<span class="ico">🧪</span> Consumables <span class="badge" id="count-consumable">—</span>
</button>
<button class="nav-btn" data-type="material" onclick="setType('material')">
<span class="ico">🪨</span> Materials <span class="badge" id="count-material">—</span>
</button>
<button class="nav-btn" data-type="artifact" onclick="setType('artifact')">
<span class="ico">🏺</span> Artifacts <span class="badge" id="count-artifact">—</span>
</button>
<div class="sidebar-label">Mystic System</div>
<button class="nav-btn" data-type="enchant" onclick="setType('enchant')">
<span class="ico">✨</span> Enchants <span class="badge" id="count-enchant">—</span>
</button>
<button class="nav-btn" data-type="infusion" onclick="setType('infusion')">
<span class="ico">🌀</span> Infusions <span class="badge" id="count-infusion">—</span>
</button>
<div class="sidebar-divider"></div>
<div class="sidebar-label">Tier Filter</div>
<div class="tier-filters">
<div class="tier-row">
<button class="tier-btn active" data-tier="all" onclick="setTier('all')" title="All tiers">All</button>
<button class="tier-btn" data-tier="1" onclick="setTier('1')" title="Common">T1</button>
<button class="tier-btn" data-tier="2" onclick="setTier('2')" title="Uncommon">T2</button>
<button class="tier-btn" data-tier="3" onclick="setTier('3')" title="Rare">T3</button>
<button class="tier-btn" data-tier="4" onclick="setTier('4')" title="Epic">T4</button>
<button class="tier-btn" data-tier="5" onclick="setTier('5')" title="Heroic">T5</button>
<button class="tier-btn" data-tier="6" onclick="setTier('6')" title="Mythic">T6</button>
<button class="tier-btn" data-tier="7" onclick="setTier('7')" title="Legendary">T7</button>
<button class="tier-btn" data-tier="8" onclick="setTier('8')" title="Immortal">T8</button>
</div>
</div>
</nav>
<!-- Main -->
<div class="main">
<!-- Weapon sub-type strip (visible only when Weapons tab active) -->
<div class="subfilter-strip" id="subfilterStrip">
<button class="sf-btn active" data-sub="all" onclick="setSub('all')">All</button>
<button class="sf-btn" data-sub="sword" onclick="setSub('sword')">Swords</button>
<button class="sf-btn" data-sub="axe" onclick="setSub('axe')">Axes</button>
<button class="sf-btn" data-sub="hammer" onclick="setSub('hammer')">Hammers</button>
<button class="sf-btn" data-sub="dagger" onclick="setSub('dagger')">Daggers</button>
<button class="sf-btn" data-sub="bow" onclick="setSub('bow')">Bows</button>
<button class="sf-btn" data-sub="crossbow" onclick="setSub('crossbow')">Crossbows</button>
<button class="sf-btn" data-sub="spear" onclick="setSub('spear')">Spears</button>
<button class="sf-btn" data-sub="staff" onclick="setSub('staff')">Staves</button>
<button class="sf-btn" data-sub="wand" onclick="setSub('wand')">Wands</button>
<button class="sf-btn" data-sub="tome" onclick="setSub('tome')">Tomes</button>
<button class="sf-btn" data-sub="gun" onclick="setSub('gun')">Guns</button>
<button class="sf-btn" data-sub="scythe" onclick="setSub('scythe')">Scythes</button>
<button class="sf-btn" data-sub="shield" onclick="setSub('shield')">Shields</button>
</div>
<div class="toolbar">
<div class="search-wrap">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/>
</svg>
<input type="text" id="searchBox" placeholder="Search items… (Ctrl+K)" oninput="onSearch()">
</div>
<select class="sort-select" onchange="onSort(this.value)">
<option value="name">Name A–Z</option>
<option value="tier">Tier ↑</option>
<option value="tier-desc">Tier ↓</option>
<option value="type">Type</option>
</select>
<span class="result-info" id="resultInfo">Loading…</span>
</div>
<div class="grid-wrap">
<div class="items-grid" id="itemsGrid">
<div class="state-message" style="grid-column:1/-1">
<div class="big"><span class="loading-orb"></span></div>
<p>Fetching item catalog…</p>
</div>
</div>
<div class="load-more-wrap" id="loadMoreWrap" style="display:none">
<button class="load-more-btn" onclick="loadMore()">⬇ Load More</button>
</div>
</div>
</div>
<!-- Detail Drawer -->
<div class="detail-drawer" id="detailDrawer">
<div class="drawer-header">
<span style="font-family:'Cinzel',serif;font-size:0.72rem;color:var(--text-dim)">Item Detail</span>
<button class="drawer-close" onclick="closeDrawer()" title="Close (Esc)">✕</button>
</div>
<div id="drawerContent"></div>
</div>
</div>
<script>
// ─── Data sources ─────────────────────────────────────────────────────────
const SOURCES = [
{ url: './api/v1/master-weapons.json', key: 'items', type: 'weapon', ico: '⚔️' },
{ url: './api/v1/master-armor.json', key: 'items', type: 'armor', ico: '🛡️' },
{ url: './api/v1/master-consumables.json', key: 'items', type: 'consumable', ico: '🧪' },
{ url: './api/v1/master-materials.json', key: 'materials', type: 'material', ico: '🪨' },
{ url: './api/v1/master-relics.json', key: 'relics', type: 'relic', ico: '💎' },
{ url: './api/v1/master-enchants.json', key: 'enchants', type: 'enchant', ico: '✨' },
{ url: './api/v1/master-infusions.json', key: 'infusions', type: 'infusion', ico: '🌀' },
{ url: './api/v1/master-artifacts.json', key: 'artifacts', type: 'artifact', ico: '🏺' },
];
// ─── Icon resolution ──────────────────────────────────────────────────────
const CDN = 'https://molochdagod.github.io/ObjectStore';
// Enchant stat → existing ability icon
const ENCH_ICON = {
damage: `${CDN}/icons/abilities/ability_arcane_bolt.png`,
defense: `${CDN}/icons/abilities/ability_bark_skin.png`,
speed: `${CDN}/icons/abilities/ability_arrow_storm.png`,
crit: `${CDN}/icons/abilities/ability_arcane_focus.png`,
critChance: `${CDN}/icons/abilities/ability_arcane_focus.png`,
critDamage: `${CDN}/icons/abilities/ability_arcane_focus.png`,
fire: `${CDN}/icons/abilities/ability_arcane_cataclysm.png`,
lightning: `${CDN}/icons/abilities/ability_arcane_cataclysm.png`,
frost: `${CDN}/icons/abilities/ability_avatar_form.png`,
health: `${CDN}/icons/abilities/ability_avatar.png`,
mana: `${CDN}/icons/abilities/ability_arcane_focus.png`,
elementResist:`${CDN}/icons/abilities/ability_bark_skin.png`,
};
const defaultEnchIcon = `${CDN}/icons/abilities/ability_arcane_bolt.png`;
// Infusions → alchemy framed icons (tier-indexed)
const INFU_ICON = Array.from({length:12},(_,i)=>`${CDN}/icons/items/alchemy/alchemy_${String(i+1).padStart(2,'0')}_framed.png`);
// Relics → artifacts framed icons (tier-indexed)
const RELIC_ICON = Array.from({length:12},(_,i)=>`${CDN}/icons/items/artifacts/artifacts_${String(i+1).padStart(2,'0')}_framed.png`);
// Artifacts → loot icons
const LOOT_ICON = Array.from({length:16},(_,i)=>`${CDN}/icons/loot/loot_${i+1}.png`);
function resolveIcon(item) {
const raw = item.iconUrl || '';
// Broken enchant path → map by stat
if (!raw || raw.includes('/icons/enchants/')) {
if (item._type === 'enchant') {
const stat = item.effect?.stat || 'damage';
return ENCH_ICON[stat] || defaultEnchIcon;
}
}
// Broken infusion path → alchemy icons
if (!raw || raw.includes('/icons/infusions/')) {
if (item._type === 'infusion') {
return INFU_ICON[Math.min((item._tierNum||1)-1, INFU_ICON.length-1)];
}
}
// Broken relic path → artifacts icons
if (!raw || raw.includes('/icons/relics/')) {
if (item._type === 'relic') {
return RELIC_ICON[Math.min((item._tierNum||1)-1, RELIC_ICON.length-1)];
}
}
// No icon for artifact → loot icons
if (!raw && item._type === 'artifact') {
return LOOT_ICON[Math.min((item._tierNum||1)-1, LOOT_ICON.length-1)];
}
// Craftpix plain icons → try framed variant first
if (raw && raw.includes('/icons/items/') && !raw.includes('_framed')) {
return raw.replace(/\.png$/, '_framed.png');
}
return raw || null;
}
// ─── State ────────────────────────────────────────────────────────────────
let allItems = [], filtered = [];
let activeType = 'all', activeTier = 'all', activeSub = 'all';
let searchQ = '', sortKey = 'name', pageOffset = 0;
const PAGE = 80;
// ─── Bootstrap ────────────────────────────────────────────────────────────
(async () => {
const results = await Promise.allSettled(SOURCES.map(s => loadSource(s)));
const counts = {};
results.forEach((r, i) => {
if (r.status === 'fulfilled') {
const { type, items } = r.value;
counts[type] = (counts[type] || 0) + items.length;
allItems.push(...items);
} else {
console.warn('Load failed:', SOURCES[i].url, r.reason?.message || r.reason);
}
});
let total = 0;
Object.entries(counts).forEach(([t, n]) => {
const el = document.getElementById('count-' + t);
if (el) el.textContent = n.toLocaleString();
total += n;
});
const allBadge = document.getElementById('count-all');
if (allBadge) allBadge.textContent = total.toLocaleString();
const hc = document.getElementById('headerCounts');
if (hc) {
[['Weapons', counts.weapon||0], ['Armor', counts.armor||0], ['Relics', counts.relic||0], ['Enchants', counts.enchant||0]]
.forEach(([label, n]) => {
const d = document.createElement('div');
d.className = 'hcount';
d.innerHTML = `<strong>${n.toLocaleString()}</strong>${label}`;
hc.appendChild(d);
});
}
applyFilters();
})();
async function loadSource({ url, key, type, ico }) {
const res = await fetch(url);
if (!res.ok) throw new Error(res.status);
const data = await res.json();
const raw = data[key] || [];
return {
type,
items: raw.map(item => ({
...item,
_type: item.type || type,
_ico: ico,
_tierNum: parseInt(item.tier) || 1,
_subType: (item.subType || item.weaponType || item.category || '').toLowerCase(),
}))
};
}
// ─── Filters ──────────────────────────────────────────────────────────────
function applyFilters() {
const q = searchQ.toLowerCase();
filtered = allItems.filter(item => {
if (activeType !== 'all' && item._type !== activeType) return false;
if (activeTier !== 'all' && item._tierNum !== parseInt(activeTier)) return false;
if (activeSub !== 'all' && activeType === 'weapon') {
if (!(item._subType||'').includes(activeSub)) return false;
}
if (q) {
const hay = [item.name, item.category, item.subCategory, item.subType,
item.weaponType, item.description, item._type, item.element,
item.effect?.stat, item.scope, item.profession]
.filter(Boolean).join(' ').toLowerCase();
if (!hay.includes(q)) return false;
}
return true;
});
filtered.sort((a,b) => {
if (sortKey==='name') return (a.name||'').localeCompare(b.name||'');
if (sortKey==='tier') return (a._tierNum||0)-(b._tierNum||0);
if (sortKey==='tier-desc') return (b._tierNum||0)-(a._tierNum||0);
if (sortKey==='type') return (a._type||'').localeCompare(b._type||'');
return 0;
});
pageOffset = 0;
renderGrid(true);
}
// ─── Render ───────────────────────────────────────────────────────────────
function renderGrid(fresh) {
const grid = document.getElementById('itemsGrid');
const loadWrap = document.getElementById('loadMoreWrap');
const info = document.getElementById('resultInfo');
if (!filtered.length) {
grid.innerHTML = `<div class="state-message" style="grid-column:1/-1"><div class="big">🔍</div><p>No items match your filters.</p></div>`;
loadWrap.style.display = 'none';
info.textContent = '0 items';
return;
}
if (fresh) grid.innerHTML = '';
const batch = filtered.slice(pageOffset, pageOffset + PAGE);
const frag = document.createDocumentFragment();
batch.forEach((item, i) => {
const card = makeCard(item);
card.style.animationDelay = Math.min(i * 0.018, 0.4) + 's';
frag.appendChild(card);
});
grid.appendChild(frag);
pageOffset += batch.length;
loadWrap.style.display = pageOffset < filtered.length ? 'block' : 'none';
info.textContent = `${pageOffset.toLocaleString()} / ${filtered.length.toLocaleString()}`;
}
function loadMore() { renderGrid(false); }
// ─── Card ─────────────────────────────────────────────────────────────────
function makeCard(item) {
const div = document.createElement('div');
div.className = 'item-card';
div.dataset.tier = item._tierNum || 1;
const tc = item.tierColor || '#8b7355';
const cat = item.category || item.subCategory || item.weaponType || item._subType || '';
const icon = resolveIcon(item);
// Rich tooltip
const tip = [];
tip.push(item.name || '');
if (item.tierLabel) tip.push(item.tierLabel);
if (item.effect) tip.push(`${item.effect.stat}: +${item.effect.value} (${item.effect.valueType||'flat'})`);
if (item.iterationsGranted) tip.push(`+${item.iterationsGranted} gear iteration(s)`);
if (item.scope) tip.push(`Scope: ${item.scope}`);
if (item.element) tip.push(`Element: ${item.element}`);
if (item.stats) Object.entries(item.stats).slice(0,4).forEach(([k,v])=>tip.push(`${k}: ${v}`));
if (item.craftedBy) tip.push(`Crafted by: ${item.craftedBy}`);
if (item.description && item.description.length < 90) tip.push(item.description);
div.title = tip.filter(Boolean).join(' · ');
div.innerHTML = `
<div class="tier-stripe" style="background:${tc}"></div>
<div class="item-icon-wrap">
${icon
? `<img src="${icon}" alt="${e(item.name||'')}" loading="lazy"
onerror="this.src='';this.style.display='none';this.nextElementSibling.style.display='block'">
<span class="item-icon-fallback" style="display:none">${item._ico}</span>`
: `<span class="item-icon-fallback">${item._ico}</span>`}
</div>
<div class="item-name">${e(item.name||'Unknown')}</div>
<div class="item-meta">
${item.tierLabel ? `<span class="tag tag-tier" style="border-color:${tc};color:${tc}">${item.tierLabel}</span>` : ''}
${cat ? `<span class="tag tag-cat">${e(cat)}</span>` : ''}
</div>`;
div.addEventListener('click', () => openDrawer(item, div));
return div;
}
// ─── Detail drawer ────────────────────────────────────────────────────────
const EL_CLS = {fire:'el-fire',frost:'el-frost',lightning:'el-lightning',nature:'el-nature',arcane:'el-arcane',holy:'el-holy',shadow:'el-shadow'};
const STAT_COLOR = {damage:'#ef4444',defense:'#3b82f6',speed:'#22c55e',attack:'#f97316',crit:'#a855f7',critChance:'#a855f7',critDamage:'#e879f9',elementResist:'#06b6d4',health:'#ec4899',mana:'#818cf8',range:'#84cc16'};
const ACQ_LABEL = {purchasable:'🏪 Purchasable',dropOnly:'⚔️ Drop only',skillTree:'🌿 Skill tree',craft:'🔨 Crafted',craftOnly:'🔨 Crafted only'};
function openDrawer(item, cardEl) {
document.querySelectorAll('.item-card.active').forEach(c => c.classList.remove('active'));
if (cardEl) cardEl.classList.add('active');
const tc = item.tierColor || '#8b7355';
const icon = resolveIcon(item);
const acq = ACQ_LABEL[item.acquisition] || ACQ_LABEL[item.source] || '';
// Tags (deduplicated, element-styled)
const tagDefs = [
[item._type, ''],
[item.category, ''],
[item.subCategory, ''],
[item.weaponType, ''],
[item.element, EL_CLS[(item.element||'').toLowerCase()]||''],
[item.scope, ''],
[item.appliedAt, ''],
].filter(([l])=>l).filter(([l],i,a)=>a.findIndex(([x])=>x===l)===i);
const tagsHTML = tagDefs.length ? `<div class="detail-tags">${tagDefs.map(([l,c])=>`<span class="detail-tag ${c}">${e(l)}</span>`).join('')}</div>` : '';
// Type-specific blocks
let body = '';
// ── Enchant ──
if (item._type === 'enchant' && item.effect) {
const ef = item.effect;
body += `<div class="section-title">Enchant Effect</div>
<div class="effect-badge">
<div style="text-align:center">
<div class="eff-stat">${e(ef.stat||'')}</div>
<div class="eff-val">+${ef.value}</div>
<div class="eff-type">${e(ef.valueType||'flat')}</div>
</div>
</div>`;
if (item.target) body += `<div class="ability-list"><div class="ability-item">🎯 Applies to: <strong>${e(item.target)}</strong></div></div>`;
if (item.consumedOnApply) body += `<div class="ability-list" style="margin-top:4px"><div class="ability-item">🔥 Consumed on apply — grants a permanent stat bonus</div></div>`;
}
// ── Infusion ──
if (item._type === 'infusion') {
body += `<div class="section-title">Infusion Properties</div>
<div class="infusion-grid">
<div class="inf-cell"><div class="inf-val">+${item.iterationsGranted||1}</div><div class="inf-label">Iterations</div></div>
<div class="inf-cell"><div class="inf-val" style="font-size:0.82rem">${e(item.scope||'universal')}</div><div class="inf-label">Scope</div></div>
</div>`;
if (item.scope === 'profession') {
body += `<div class="ability-list">`;
if (item.profession) body += `<div class="ability-item">🔑 Requires: <strong>${e(item.profession)}</strong></div>`;
if (item.unlockNode) body += `<div class="ability-item" style="margin-top:4px">📍 Unlock: <strong>${e(item.unlockNode)}</strong></div>`;
body += `</div>`;
}
if (item.sideEffect) body += `<div class="ability-list" style="margin-top:5px"><div class="ability-item fx">✦ ${e(item.sideEffect)}</div></div>`;
if (item.dropSource) body += `<div class="ability-list" style="margin-top:4px"><div class="ability-item">📦 Source: ${e(item.dropSource)}</div></div>`;
if (item.consumedOnApply) body += `<div class="ability-list" style="margin-top:4px"><div class="ability-item">🔥 Consumed on apply</div></div>`;
}
// ── Stats (weapons, armor, relics, materials) ──
const stats = item.stats || {};
const statEntries = Object.entries(stats).filter(([,v]) => Number(v) > 0);
if (statEntries.length) {
const mx = Math.max(...statEntries.map(([,v])=>Number(v)), 100);
body += `<div class="section-title">Stats</div>`;
body += statEntries.map(([k,v]) => {
const col = STAT_COLOR[k] || tc;
return `<div class="stat-row">
<span class="stat-key">${e(k)}</span>
<div class="stat-bar-wrap"><div class="stat-bar" style="width:${Math.round(Number(v)/mx*100)}%;background:${col}"></div></div>
<span class="stat-val">${v}</span>
</div>`;
}).join('');
}
// ── Signature / abilities / passives ──
if (item.signature) body += `<div class="section-title">Signature</div><div class="ability-list"><div class="ability-item sig">⚡ ${e(item.signature)}</div></div>`;
const abs = Array.isArray(item.abilities) ? item.abilities : [];
const pas = Array.isArray(item.passives) ? item.passives : [];
if (abs.length) body += `<div class="section-title">Abilities</div><div class="ability-list">${abs.map(a=>`<div class="ability-item">• ${e(String(a))}</div>`).join('')}</div>`;
if (pas.length) body += `<div class="section-title">Passives</div><div class="ability-list">${pas.map(p=>`<div class="ability-item">◈ ${e(typeof p==='object'?(p.name||JSON.stringify(p)):String(p))}</div>`).join('')}</div>`;
// ── Crafting recipe ──
const r = item.craftingRecipe;
if (r?.materials?.length) {
body += `<div class="section-title">Crafting Recipe</div><div class="recipe-list">`;
if (r.station) body += `<div class="recipe-row"><span class="r-name" style="color:var(--gold)">🏛 ${e(r.station)}</span></div>`;
if (r.profession)body += `<div class="recipe-row"><span class="r-name">🧙 ${e(r.profession)}</span></div>`;
r.materials.forEach(m => body += `<div class="recipe-row"><span class="r-qty">×${m.quantity||1}</span><span class="r-name">${e((m.id||m.name||'').replace(/-/g,' '))}</span></div>`);
if (r.craftTime) body += `<div class="recipe-row"><span class="r-name">⏱ Craft time</span><span class="r-note">${r.craftTime}s</span></div>`;
if (r.gold) body += `<div class="recipe-row"><span class="r-name">💰 Gold cost</span><span class="r-note">${r.gold}g</span></div>`;
body += `</div>`;
}
// ── Lore (only when different from description) ──
if (item.lore && item.lore !== item.description) {
body += `<div class="section-title">Lore</div><p style="font-size:0.77rem;color:var(--text-dim);font-style:italic;line-height:1.65">${e(item.lore)}</p>`;
}
// ── UUID ──
if (item.uuid) body += `<div class="section-title">UUID</div><p class="uuid-line">${item.uuid}</p>`;
document.getElementById('drawerContent').innerHTML = `
<div class="drawer-icon-wrap">
${icon
? `<img src="${icon}" alt="${e(item.name||'')}"
onerror="this.src='';this.style.display='none';this.nextElementSibling.style.display='block'">
<span class="drawer-icon-fb" style="display:none">${item._ico}</span>`
: `<span class="drawer-icon-fb">${item._ico}</span>`}
</div>
<div class="drawer-body">
<div class="drawer-name">${e(item.name||'')}</div>
<div class="drawer-chips">
<span class="chip" style="border-color:${tc};color:${tc}">${e(item.tierLabel||'T'+(item._tierNum||1))}</span>
${acq ? `<span class="chip" style="border-color:var(--border);color:var(--text-dim)">${acq}</span>` : ''}
${item.craftedBy ? `<span class="chip" style="border-color:var(--border-gold);color:var(--gold-light)">🧙 ${e(item.craftedBy)}</span>` : ''}
</div>
${item.description ? `<div class="drawer-desc">${e(item.description)}</div>` : ''}
${tagsHTML}
${body}
</div>`;
document.getElementById('detailDrawer').classList.add('open');
}
function closeDrawer() {
document.getElementById('detailDrawer').classList.remove('open');
document.querySelectorAll('.item-card.active').forEach(c => c.classList.remove('active'));
}
// ─── Controls ─────────────────────────────────────────────────────────────
function setType(type) {
activeType = type; activeSub = 'all';
document.querySelectorAll('.nav-btn').forEach(b => b.classList.toggle('active', b.dataset.type === type));
document.querySelectorAll('.sf-btn').forEach(b => b.classList.toggle('active', b.dataset.sub === 'all'));
document.getElementById('subfilterStrip').classList.toggle('visible', type === 'weapon');
applyFilters();
}
function setTier(tier) {
activeTier = tier;
document.querySelectorAll('.tier-btn').forEach(b => b.classList.toggle('active', b.dataset.tier === tier));
applyFilters();
}
function setSub(sub) {
activeSub = sub;
document.querySelectorAll('.sf-btn').forEach(b => b.classList.toggle('active', b.dataset.sub === sub));
applyFilters();
}
let _st;
function onSearch() { clearTimeout(_st); _st = setTimeout(()=>{ searchQ = document.getElementById('searchBox').value; applyFilters(); }, 200); }
function onSort(v) { sortKey = v; applyFilters(); }
// ─── Escape helper ────────────────────────────────────────────────────────
function e(s) {
return String(s??'').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');
}
// ─── Keyboard shortcuts ───────────────────────────────────────────────────
document.addEventListener('keydown', ev => {
if ((ev.metaKey||ev.ctrlKey) && ev.key==='k') { ev.preventDefault(); document.getElementById('searchBox').focus(); }
if (ev.key==='Escape') closeDrawer();
});
</script>
</body>
</html>