-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1548 lines (1400 loc) · 127 KB
/
index.html
File metadata and controls
1548 lines (1400 loc) · 127 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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tarokka Reading</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&family=Merriweather:wght@400;700&family=Cinzel:wght@400;700&display=swap" rel="stylesheet">
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<!-- Link to external style.css -->
<link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- Preloader -->
<div id="preloader">
<div class="preloader-symbol"></div>
<p class="text-white text-lg font-bold">Summoning the Fates...</p>
</div>
<!-- Main Game View -->
<div id="main-game-view">
<!-- Background Table with Parallax -->
<div id="background-table" class="absolute inset-0 z-0"></div>
<!-- Dust Motes Effect -->
<div class="dust-motes"></div>
<!-- Candle Light Source -->
<div id="candle-light-source"></div>
<!-- DM Interface Container (holds DM controls, Patreon, and Cast button) -->
<div id="dm-interface-container">
<!-- New container for top buttons -->
<div id="dm-top-buttons-container" class="flex flex-col gap-2 mb-2">
<!-- Cast to Players Button (now above DM panel, same faded style) -->
<button id="cast-to-players-btn" class="faded-button">
<i class="fas fa-tv mr-2"></i>Cast to Players
</button>
<!-- Patreon Button (above DM options) -->
<button id="patreon-btn" class="faded-button" onclick="window.open('https://www.patreon.com/jimpeccable', '_blank');">
<i class="fab fa-patreon mr-2"></i>Support Me on Patreon
</button>
</div>
<!-- DM Control Panel -->
<div id="dm-control-panel">
<h2 class="font-bold text-white mb-2">DM Controls</h2>
<div class="dm-controls">
<!-- Rigging controls -->
<div class="mb-3">
<h3 class="font-semibold text-white mb-1">Rig the Deck:</h3>
<div class="grid grid-cols-1 gap-2">
<div class="flex items-center gap-1">
<label for="rig-tome" class="flex-shrink-0">Tome:</label>
<select id="rig-tome" data-position="tome" class="flex-grow"></select>
</div>
<div class="flex items-center gap-1">
<label for="rig-holySymbol" class="flex-shrink-0">Holy Symbol:</label>
<select id="rig-holySymbol" data-position="holySymbol" class="flex-grow"></select>
</div>
<div class="flex items-center gap-1">
<label for="rig-sunsword" class="flex-shrink-0">Sunsword:</label>
<select id="rig-sunsword" data-position="sunsword" class="flex-grow"></select>
</div>
<div class="flex items-center gap-1">
<label for="rig-ally" class="flex-shrink-0">Ally:</label>
<select id="rig-ally" data-position="ally" class="flex-grow"></select>
</div>
<div class="flex items-center gap-1">
<label for="rig-strahd" data-position="strahd" class="flex-shrink-0">Strahd:</label>
<select id="rig-strahd" data-position="strahd" class="flex-grow"></select>
</div>
</div>
</div>
<!-- Action Buttons -->
<button id="randomize-all-btn"><i class="fas fa-dice mr-1"></i>Randomize All</button>
<button id="shuffle-deal-btn"><i class="fas fa-sync-alt mr-1"></i>Shuffle & Deal</button>
<button id="reveal-all-btn"><i class="fas fa-eye mr-1"></i>Reveal All</button>
<button id="hide-all-btn"><i class="fas fa-eye-slash mr-1"></i>Hide All</button>
<button id="print-handout-btn"><i class="fas fa-print mr-1"></i>Print Handout</button>
<button id="save-reading-btn"><i class="fas fa-save mr-1"></i>Save Fate</button>
<button id="load-saved-reading-btn"><i class="fas fa-folder-open mr-1"></i>Recall Prophecy</button>
<button id="clear-reading-btn"><i class="fas fa-trash-alt mr-1"></i>Clear</button>
</div>
</div>
</div>
<!-- Card Spread Container -->
<div id="card-spread-container" class="relative z-10">
<!-- Card positions will be dynamically inserted here -->
<div id="position-tome" class="card-position" data-position="tome"></div>
<div id="position-holySymbol" class="card-position" data-position="holySymbol"></div>
<div id="position-sunsword" class="card-position" data-position="sunsword"></div>
<div id="position-ally" class="card-position" data-position="ally"></div>
<div id="position-strahd" class="card-position" data-position="strahd"></div>
</div>
<!-- Fortune Display Area -->
<div id="fortune-display" class="fortune-display">
<!-- Fortunes will be dynamically inserted here -->
</div>
<!-- DM Hint Box (New Element) -->
<div id="dm-hint-box" class="dm-hint-box">
<h3 class="font-bold text-amber-300 mb-2">DM Insight:</h3>
<p id="dm-hint-text" class="text-gray-200"></p>
</div>
<!-- Prophecy Log Sidebar (always visible) -->
<div id="prophecy-log">
<h3>Prophecy Log</h3>
<div id="log-entries">
<!-- Log entries will be populated here -->
</div>
</div>
<!-- DM Toggle Button (always visible) -->
<button id="toggle-dm-btn">
<i class="fas fa-hat-wizard mr-1"></i>DM Options
</button>
<!-- ESC Indicator for Cast Mode -->
<div id="esc-indicator">ESC</div>
<!-- Legal Mention -->
<div id="legal-mention">
<p>Card images © Wizards of the Coast.</p>
<p>Music by Samuel F. Johanns from Pixabay</p>
</div>
<!-- Volume Control Button and Slider -->
<div id="volume-controls">
<select id="music-selector" class="faded-button"></select> <!-- New music selector -->
<button id="volume-btn">
<i class="fas fa-volume-up"></i>
</button>
<input type="range" id="volume-slider" min="0" max="1" step="0.01" value="0.3">
</div>
</div>
<!-- Background Music Audio Tag -->
<audio id="background-music" src="" loop preload="auto"></audio>
<!-- Card Flip Sound Effect -->
<audio id="flip-sound" src="" preload="auto"></audio>
<!-- Shuffle Sound Effect -->
<audio id="shuffle-sound" src="" preload="auto"></audio>
<script>
// --- IMPORTANT: CONFIGURE THIS BASE PATH FOR GITHUB PAGES ---
// This is now set for your 'tarroka' project on GitHub Pages.
const basePath = './img/';
// --- Tarokka Card Data ---
// Full list of 54 Tarokka Cards with placeholder meanings.
// Paths are updated to point to the IMG folder in the root directory.
// Fallback to placehold.co if local images are not found.
const tarokkaCards = [
// High Deck (Major Arcana - 14 cards)
{ id: 'artifact', name: 'The Artifact', suit: 'High', value: null, imageFront: basePath + 'The Artifact.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome is the key to knowledge and understanding. It reveals secrets long buried and paths yet unseen. Seek wisdom within its ancient pages.', holySymbol: 'The holy symbol radiates divine power, offering protection against the forces of darkness. It is a beacon of hope in despair.', sunsword: 'The sunsword is a weapon of light, capable of piercing the deepest shadows. It represents courage and the will to fight evil.', ally: 'Your fated ally is a steadfast companion, offering strength and guidance when you need it most. Trust in their loyalty.', strahd: 'Strahd\'s location is a place of ancient sorrow and forgotten power. It is here that his influence is strongest, and his secrets most guarded.' },
dmHints: { tome: 'The Tome whispers of hidden knowledge, a secret path, or a vital clue. Guide them to seek wisdom.', holySymbol: 'The Holy Symbol offers divine protection or a beacon of hope. Remind them of faith\'s power.', sunsword: 'The Sunsword represents courage and a weapon against darkness. Encourage decisive action.', ally: 'Your Ally is a fated companion, a source of strength. Highlight their loyalty and support.', strahd: 'Strahd\'s location is a place of his power or deep secrets. Emphasize its significance.' }
},
{ id: 'beast', name: 'The Beast', suit: 'High', value: null, imageFront: basePath + 'The Beast.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals the primal nature of the beast within. It speaks of uncontrolled urges and untamed power.', holySymbol: 'The holy symbol offers solace from the beast\'s hunger, a shield against its raw, destructive force.', sunsword: 'The sunsword is the only means to confront the beast, to tame its fury or to strike it down.', ally: 'Your ally is one who has faced the beast and survived, or perhaps one who struggles with their own inner monster.', strahd: 'Strahd\'s location is a lair, a place where primal instincts are unleashed and where he indulges his darkest desires.' },
dmHints: { tome: 'The Tome speaks of untamed power or inner demons. Guide them to confront or control it.', holySymbol: 'The Holy Symbol offers protection from primal forces. Emphasize spiritual defense.', sunsword: 'The Sunsword is the key to overcoming the beast. Encourage them to find their inner strength.', ally: 'Your Ally is linked to the beast, perhaps a survivor or a struggler. Highlight their connection.', strahd: 'Strahd\'s location is a place of raw, untamed power. Describe its wild nature.' }
},
{ id: 'darklord', name: 'The Dark Master', suit: 'High', value: null, imageFront: basePath + 'The Dark Master.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of the Darklord\'s history, his rise to power, and the curse that binds him.', holySymbol: 'The holy symbol offers a glimmer of hope against the Darklord\'s tyranny, a resistance to his evil.', sunsword: 'The sunsword is the ultimate weapon against the Darklord, capable of breaking his hold and freeing the land.', ally: 'Your ally is one who stands directly against the Darklord, perhaps a former victim or a long-time foe.', strahd: 'Strahd\'s location is his throne, the seat of his power, where he holds court over his domain.' },
dmHints: { tome: 'The Tome reveals the Darklord\'s past, his power, or his curse. Hint at his history.', holySymbol: 'The Holy Symbol offers hope against tyranny. Stress the importance of resistance.', sunsword: 'The Sunsword is the ultimate weapon against the Darklord. Show its potential.', ally: 'Your Ally is a direct adversary to the Darklord. Emphasize their role in the struggle.', strahd: 'Strahd\'s location is his seat of power. Describe its oppressive aura.' }
},
{ id: 'ghost', name: 'The Spirit', suit: 'High', value: null, imageFront: basePath + 'The Spirit.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals the tragic tale of a lost soul, a ghost bound to Barovia by unfinished business or lingering sorrow.', holySymbol: 'The holy symbol can offer peace to the restless spirit, or protection from its spectral touch.', sunsword: 'The sunsword can cut through the ethereal veil, allowing interaction with the spectral realm, or laying spirits to rest.', ally: 'Your ally is a spectral guide, a benevolent spirit, or someone haunted by a past trauma.', strahd: 'Strahd\'s location is a place of echoes and memories, where the past lingers like a cold mist.' },
dmHints: { tome: 'The Tome speaks of a lost soul, a lingering presence, or unfinished business. Hint at a spectral encounter.', holySymbol: 'The Holy Symbol can bring peace to the restless or protect from their touch. Suggest spiritual aid.', sunsword: 'The Sunsword can interact with the ethereal. Show its ability to affect spirits.', ally: 'Your Ally is connected to the spectral realm, perhaps a guide or one haunted. Highlight their ghostly ties.', strahd: 'Strahd\'s location is a place of lingering echoes and past sorrows. Describe its haunting atmosphere.' }
},
{ id: 'executioner', name: 'The Hangman', suit: 'High', value: null, imageFront: basePath + 'The Hangman.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome details the laws of judgment and the consequences of transgression. It speaks of justice, swift and unyielding.', holySymbol: 'The holy symbol offers mercy or a chance for redemption in the face of harsh judgment.', sunsword: 'The sunsword can be used to deliver a final blow, or to defend the innocent from unjust punishment.', ally: 'A figure of authority, a judge, or someone who enforces order, even if brutally so.', strahd: 'A place of punishment and suffering, where his enemies meet their grim end.' },
dmHints: { tome: 'The Tome speaks of justice, consequences, or a grim fate. Hint at impending judgment.', holySymbol: 'The Holy Symbol offers mercy or redemption. Suggest a path to forgiveness.', sunsword: 'The Sunsword can deliver a final blow or protect the innocent. Emphasize its role in judgment.', ally: 'Your Ally is an enforcer of order, or a judge. Describe their stern nature.', strahd: 'Strahd\'s location is a place of punishment. Describe its grim purpose.' }
},
{ id: 'horseman', name: 'The Horseman', suit: 'High', value: null, imageFront: basePath + 'The Horseman.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of journeys and distant lands, of the path ahead and the trials to come.', holySymbol: 'The holy symbol offers safe passage and protection on a perilous journey.', sunsword: 'The sunsword clears the way, cutting through obstacles and guiding the path forward.', ally: 'A traveler, a scout, or someone who knows the hidden roads and trails.', strahd: 'A place of transit, a crossroads, or a point from which he surveys his domain.' },
dmHints: { tome: 'The Tome speaks of a journey, a path ahead, or trials to come. Hint at travel or a quest.', holySymbol: 'The Holy Symbol offers safe passage. Suggest divine aid on their journey.', sunsword: 'The Sunsword clears obstacles. Show its power to forge a path.', ally: 'Your Ally is a traveler or guide. Describe their knowledge of the land.', strahd: 'Strahd\'s location is a place of transit or observation. Hint at its strategic importance.' }
},
{ id: 'innkeeper', name: 'The Innocent', suit: 'High', value: null, imageFront: basePath + 'The Innocent.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of hospitality and refuge, of secrets whispered in the common room and tales told by the fire.', holySymbol: 'The holy symbol offers sanctuary and comfort in a place of rest.', sunsword: 'The sunsword protects the innocent and ensures peace within the walls of a safe haven.', ally: 'A provider, a protector of travelers, or someone who offers a much-needed respite.', strahd: 'A place of false comfort, a trap disguised as refuge, or where he observes his unsuspecting victims.' },
dmHints: { tome: 'The Tome speaks of refuge, secrets, or a place of rest. Hint at a sanctuary or a hidden truth.', holySymbol: 'The Holy Symbol offers sanctuary. Emphasize its protective aura.', sunsword: 'The Sunsword protects the innocent. Show its role in safeguarding others.', ally: 'Your Ally is a provider of comfort or a protector. Describe their nurturing nature.', strahd: 'A place of false comfort or a trap. Hint at its deceptive nature.' }
},
{ id: 'marionette', name: 'The Marionette', suit: 'High', value: null, imageFront: basePath + 'The Marionette.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals the strings of fate, the hidden manipulations and the lack of free will. It speaks of being controlled.', holySymbol: 'The holy symbol can break the bonds of enchantment and manipulation, freeing the mind and spirit.', sunsword: 'The sunsword cuts the strings that bind, severing control and allowing true action.', ally: 'Someone who has broken free from control, or one who sees the hidden influences at play.', strahd: 'A place of control and subjugation, where he pulls the strings of his puppets.' },
dmHints: { tome: 'The Tome reveals manipulation or lack of free will. Hint at hidden control.', holySymbol: 'The Holy Symbol can break enchantments. Suggest a path to freedom.', sunsword: 'The Sunsword cuts the strings of control. Show its power to liberate.', ally: 'Your Ally is one who has broken free or sees hidden influences. Describe their independence.', strahd: 'A place of control. Emphasize his puppetry.' }
},
{ id: 'mists', name: 'The Mists', suit: 'High', value: null, imageFront: basePath + 'The Mists.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of the impenetrable fog that surrounds Barovia, and the secrets it holds within its swirling depths.', holySymbol: 'The holy symbol can part the mists, offering clarity and a glimpse of what lies beyond.', sunsword: 'The sunsword can cut a path through the mists, guiding the way through confusion and illusion.', ally: 'One who can navigate the mists, a guide through the unknown, or someone who understands its mysteries.', strahd: 'Strahd\'s location is hidden within the mists, a place obscured by illusion and difficult to reach.' },
dmHints: { tome: 'The Tome speaks of the mists, their secrets, or their deceptive nature. Hint at hidden paths or illusions.', holySymbol: 'The Holy Symbol can part the mists. Suggest divine clarity.', sunsword: 'The Sunsword can cut through the mists. Show its power to reveal the unseen.', ally: 'Your Ally can navigate the mists. Describe their mysterious knowledge.', strahd: 'Strahd\'s location is obscured by the mists. Hint at its elusive nature.' }
},
{ id: 'raven', name: 'The Raven', suit: 'High', value: null, imageFront: basePath + 'The Raven.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of ancient secrets and forgotten lore, often guarded by watchful eyes. It signifies a hidden truth.', holySymbol: 'The holy symbol offers insight and clarity, helping to discern truth from deception.', sunsword: 'The sunsword can reveal hidden paths or break through illusions, exposing what is concealed.', ally: 'A keeper of secrets, a wise elder, or one who has access to forbidden knowledge.', strahd: 'A place of concealed knowledge, where he hides his most guarded secrets.' },
dmHints: { tome: 'The Tome speaks of ancient secrets or hidden truths. Hint at a revelation.', holySymbol: 'The Holy Symbol offers insight. Suggest spiritual discernment.', sunsword: 'The Sunsword can reveal hidden paths. Show its power to expose secrets.', ally: 'Your Ally is a keeper of secrets or forbidden knowledge. Describe their mysterious wisdom.', strahd: 'A place of concealed knowledge. Hint at its hidden nature.' }
},
{ id: 'seer', name: 'The Hero', suit: 'High', value: null, imageFront: basePath + 'The Hero.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of prophecy and destiny, of visions of the future and the unfolding of fate.', holySymbol: 'The holy symbol enhances perception, allowing one to see beyond the ordinary veil.', sunsword: 'The sunsword can cut through illusions and reveal the true nature of things, even future events.', ally: 'A visionary, a prophet, or someone with keen insight into the unseen.', strahd: 'A place where he observes, where he can foresee events, or where he attempts to manipulate destiny.' },
dmHints: { tome: 'The Tome speaks of prophecy, destiny, or future visions. Hint at a fated event.', holySymbol: 'The Holy Symbol enhances perception. Suggest spiritual foresight.', sunsword: 'The Sunsword can reveal true nature or future events. Show its power to see beyond.', ally: 'Your Ally is a visionary or prophet. Describe their insightful nature.', strahd: 'Strahd\'s location is a place of observation or manipulation of destiny. Hint at his foresight.' }
},
{ id: 'tempter', name: 'The Temptress', suit: 'High', value: null, imageFront: basePath + 'The Temptress.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of forbidden knowledge and dangerous allure, of choices that lead to ruin or power.', holySymbol: 'The holy symbol offers resistance to dark temptations and strengthens one\'s resolve.', sunsword: 'The sunsword can cut through deceptive appearances and expose the true nature of a tempting offer.', ally: 'One who has resisted temptation, or one who understands the nature of corruption.', strahd: 'A place of allure and deceit, where he offers dark bargains and preys on weaknesses.' },
dmHints: { tome: 'The Tome speaks of temptation, forbidden knowledge, or dangerous choices. Hint at a moral dilemma.', holySymbol: 'The Holy Symbol offers resistance to temptation. Suggest divine resolve.', sunsword: 'The Sunsword can expose deceit. Show its power to reveal hidden agendas.', ally: 'Your Ally has resisted temptation or understands corruption. Describe their resilience.', strahd: 'Strahd\'s location is a place of allure and deceit. Hint at his manipulative nature.' }
},
{ id: 'torturer', name: 'The Broken One', suit: 'High', value: null, imageFront: basePath + 'The Broken One.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of suffering and endurance, of the limits of pain and the breaking of spirit.', holySymbol: 'The holy symbol offers solace in suffering and strength to endure torment.', sunsword: 'The sunsword can end suffering, either by delivering justice or by providing a swift release.', ally: 'One who has endured great pain, or one who seeks to alleviate the suffering of others.', strahd: 'A dungeon, a torture chamber, or a place where he inflicts pain upon his victims.' },
dmHints: { tome: 'The Tome speaks of suffering, endurance, or broken spirits. Hint at a place of torment.', holySymbol: 'The Holy Symbol offers solace in pain. Suggest spiritual comfort.', sunsword: 'The Sunsword can end suffering. Show its power to bring justice or release.', ally: 'Your Ally has endured pain or seeks to alleviate it. Describe their resilience or compassion.', strahd: 'Strahd\'s location is a place of suffering. Emphasize its grim atmosphere.' }
},
{ id: 'broken_one', name: 'The Broken One', suit: 'High', value: null, imageFront: basePath + 'The Broken One.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of shattered dreams and broken promises, of loss and the struggle for wholeness.', holySymbol: 'The holy symbol offers healing and restoration, mending what is broken.', sunsword: 'The sunsword can mend a fractured spirit or bring an end to a cycle of despair.', ally: 'One who is wounded but resilient, or one who helps others find healing.', strahd: 'A place of ruin and despair, reflecting his own shattered existence.' },
dmHints: { tome: 'The Tome speaks of shattered dreams, loss, or a struggle for wholeness. Hint at a broken past.', holySymbol: 'The Holy Symbol offers healing and restoration. Suggest divine mending.', sunsword: 'The Sunsword can mend spirits or end despair. Show its power to restore.', ally: 'Your Ally is wounded but resilient, or helps others heal. Describe their strength.', strahd: 'Strahd\'s location is a place of ruin and despair. Emphasize its desolate nature.' }
},
{ id: 'donjon', name: 'The Prison', suit: 'High', value: null, imageFront: basePath + 'The Prison.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of confinement and isolation, of being trapped and the struggle for freedom.', holySymbol: 'The holy symbol offers a way out, a key to release, or a beacon of hope in captivity.', sunsword: 'The sunsword can cut through barriers and break chains, leading to liberation.', ally: 'A prisoner, an escapee, or one who knows the ways out of confinement.', strahd: 'A prison, a fortress, or a place from which there is no easy escape.' },
dmHints: { tome: 'The Tome speaks of confinement, being trapped, or a struggle for freedom. Hint at a prison or a difficult escape.', holySymbol: 'The Holy Symbol offers a way out. Suggest divine intervention for release.', sunsword: 'The Sunsword can break chains and barriers. Show its power to liberate.', ally: 'Your Ally is a prisoner or escapee. Describe their longing for freedom.', strahd: 'Strahd\'s location is a prison or fortress. Emphasize its inescapable nature.' }
},
// Common Deck (4 suits, 10 cards each - numbered 1-9 + Master)
// Swords (Scars) - 10 cards
{ id: 'swords-1', name: 'Ace of Swords', suit: 'Swords', value: 1, imageFront: basePath + 'Ace of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A sharp truth or a sudden insight.', holySymbol: 'Protection from verbal attacks or harmful ideas.', sunsword: 'A decisive action or a quick resolution to conflict.', ally: 'A quick-witted and sharp-tongued individual.', strahd: 'A place of conflict, sharp words, or intellectual challenge.' },
dmHints: { tome: 'A sudden truth or insight. Prepare for a revelation.', holySymbol: 'Protection from harmful words. Suggest spiritual defense.', sunsword: 'Decisive action or quick resolution. Encourage bold moves.', ally: 'A sharp-witted ally. Highlight their intellect.', strahd: 'A place of conflict or intellectual challenge. Describe its tension.' }
},
{ id: 'swords-2', name: 'Two of Swords', suit: 'Swords', value: 2, imageFront: basePath + 'Two of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A dual nature or a difficult choice, often intellectual.', holySymbol: 'Balance and harmony in opposing forces.', sunsword: 'A duel or a challenge of two wills.', ally: 'Someone conflicted or with two sides to their nature.', strahd: 'A place of division or opposing forces, often a battleground.' },
dmHints: { tome: 'A difficult choice or a dual nature. Present a dilemma.', holySymbol: 'Balance in opposing forces. Suggest a path to harmony.', sunsword: 'A duel or challenge of wills. Emphasize the conflict.', ally: 'A conflicted ally. Highlight their inner struggle.', strahd: 'A place of division or battle. Describe its fractured nature.' }
},
{ id: 'swords-3', name: 'Three of Swords', suit: 'Swords', value: 3, imageFront: basePath + 'Three of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A painful truth or a difficult revelation.', holySymbol: 'Spiritual resilience in the face of harsh realities.', sunsword: 'A necessary but painful cut, or a surgical strike.', ally: 'One who delivers hard truths, or has suffered greatly.', strahd: 'A place of sorrow, loss, or painful memories.' },
dmHints: { tome: 'A painful truth or revelation. Prepare for emotional impact.', holySymbol: 'Resilience against harsh realities. Suggest spiritual fortitude.', sunsword: 'A necessary but painful cut. Show its difficult consequence.', ally: 'An ally who has suffered or delivers hard truths. Describe their sorrow.', strahd: 'A place of sorrow or painful memories. Emphasize its tragic past.' }
},
{ id: 'swords-4', name: 'Four of Swords', suit: 'Swords', value: 4, imageFront: basePath + 'Four of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A period of truce, rest, or strategic pause.', holySymbol: 'Peace and calm amidst turmoil.', sunsword: 'A defensive stance or a fortified position.', ally: 'One who offers respite or a safe haven.', strahd: 'A place of temporary calm before a storm, or a strategic stronghold.' },
dmHints: { tome: 'A period of rest or strategic pause. Hint at a temporary calm.', holySymbol: 'Peace amidst turmoil. Suggest spiritual tranquility.', sunsword: 'A defensive stance or fortified position. Show its protective aspect.', ally: 'An ally offering respite. Describe their calming presence.', strahd: 'A place of temporary calm or a stronghold. Hint at its strategic importance.' }
},
{ id: 'swords-5', name: 'Five of Swords', suit: 'Swords', value: 5, imageFront: basePath + 'Five of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A hollow victory, defeat, or intellectual struggle.', holySymbol: 'Spiritual strength to overcome setbacks.', sunsword: 'A battle lost or a Pyrrhic victory.', ally: 'One who has faced defeat but learned from it.', strahd: 'A place of past defeats or where he has overcome rivals.' },
dmHints: { tome: 'A hollow victory or defeat. Prepare for a setback.', holySymbol: 'Strength to overcome setbacks. Suggest spiritual resilience.', sunsword: 'A lost battle or Pyrrhic victory. Show its bitter outcome.', ally: 'An ally who faced defeat. Describe their hard-earned wisdom.', strahd: 'A place of past defeats. Emphasize its somber history.' }
},
{ id: 'swords-6', name: 'Six of Swords', suit: 'Swords', value: 6, imageFront: basePath + 'Six of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A journey away from conflict, or moving on from a difficult situation.', holySymbol: 'Guidance through troubled waters, or safe passage.', sunsword: 'A strategic retreat or a path to safety.', ally: 'One who helps others escape or find new beginnings.', strahd: 'A hidden escape route or a place of no return.' },
dmHints: { tome: 'A journey away from conflict or moving on. Hint at a new path.', holySymbol: 'Guidance through troubled waters. Suggest divine aid in transit.', sunsword: 'A strategic retreat or path to safety. Show its protective aspect.', ally: 'An ally who helps others escape. Describe their guiding nature.', strahd: 'A hidden escape route or a place of no return. Emphasize its secretive nature.' }
},
{ id: 'swords-7', name: 'Seven of Swords', suit: 'Swords', value: 7, imageFront: basePath + 'Seven of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Deception, trickery, or hidden agendas.', holySymbol: 'Discernment to see through illusions.', sunsword: 'A weapon to expose lies or break enchantments.', ally: 'A cunning individual, or one who uncovers secrets.', strahd: 'A place of illusion, trickery, or hidden traps.' },
dmHints: { tome: 'Deception, trickery, or hidden agendas. Prepare for betrayal.', holySymbol: 'Discernment to see through illusions. Suggest spiritual insight.', sunsword: 'A weapon to expose lies. Show its power to reveal truth.', ally: 'A cunning ally or one who uncovers secrets. Describe their elusive nature.', strahd: 'A place of illusion or hidden traps. Emphasize its deceptive nature.' }
},
{ id: 'swords-8', name: 'Eight of Swords', suit: 'Swords', value: 8, imageFront: basePath + 'Eight of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Feeling trapped or restricted by one\'s own thoughts or circumstances.', holySymbol: 'Spiritual liberation from self-imposed limitations.', sunsword: 'A tool to cut through mental or physical binds.', ally: 'One who helps others find freedom, or is themselves constrained.', strahd: 'A place of mental anguish or psychological torment.' },
dmHints: { tome: 'Feeling trapped or restricted. Hint at self-imposed limits.', holySymbol: 'Spiritual liberation. Suggest a path to freedom.', sunsword: 'A tool to cut binds. Show its power to break free.', ally: 'An ally seeking freedom or helping others. Describe their yearning.', strahd: 'A place of mental anguish. Emphasize its oppressive atmosphere.' }
},
{ id: 'swords-9', name: 'Nine of Swords', suit: 'Swords', value: 9, imageFront: basePath + 'Nine of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Anxiety, despair, or profound mental anguish.', holySymbol: 'Comfort and solace in times of great distress.', sunsword: 'A desperate last stand, or the end of suffering.', ally: 'One who offers comfort or understands deep sorrow.', strahd: 'A place of nightmares and profound suffering.' },
dmHints: { tome: 'Anxiety, despair, or mental anguish. Prepare for a dark revelation.', holySymbol: 'Comfort in distress. Suggest spiritual solace.', sunsword: 'A desperate last stand or end of suffering. Show its grim finality.', ally: 'An ally offering comfort or understanding sorrow. Describe their empathy.', strahd: 'A place of nightmares and suffering. Emphasize its dread.' }
},
{ id: 'swords-master', name: 'Ten of Swords', suit: 'Swords', value: 10, imageFront: basePath + 'Ten of Swords.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Mastery over conflict, strategic insight, or intellectual prowess.', holySymbol: 'Ultimate spiritual fortitude and protection.', sunsword: 'Absolute victory, a final decisive strike, or military genius.', ally: 'A master of combat, strategy, or a skilled warrior.', strahd: 'Where his military might or strategic genius is most evident.' },
dmHints: { tome: 'Mastery over conflict or strategic insight. Hint at a powerful mind.', holySymbol: 'Ultimate spiritual fortitude. Suggest divine protection.', sunsword: 'Absolute victory or military genius. Show its overwhelming power.', ally: 'A master of combat or strategy. Describe their prowess.', strahd: 'Strahd\'s military might or strategic genius. Emphasize his tactical mind.' }
},
// Coins (Coins) - 10 cards
{ id: 'coins-1', name: 'Ace of Coins', suit: 'Coins', value: 1, imageFront: basePath + 'Ace of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A new opportunity, a fresh start in material wealth or resources.', holySymbol: 'Blessings for new ventures and prosperity.', sunsword: 'A tool to acquire new resources or defend existing wealth.', ally: 'A benefactor, a merchant, or someone who brings good fortune.', strahd: 'A place of hidden treasures or material gain.' },
dmHints: { tome: 'A new opportunity or material gain. Hint at a fresh start.', holySymbol: 'Blessings for new ventures. Suggest divine prosperity.', sunsword: 'A tool to acquire resources. Show its power to gain wealth.', ally: 'A benefactor or merchant. Describe their generosity.', strahd: 'A place of hidden treasures. Emphasize its potential for riches.' }
},
{ id: 'coins-2', name: 'Two of Coins', suit: 'Coins', value: 2, imageFront: basePath + 'Two of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Financial balance, partnership, or careful management of resources.', holySymbol: 'Harmony in material affairs.', sunsword: 'A fair exchange or a balanced transaction.', ally: 'A reliable partner in business or trade.', strahd: 'A place of negotiation or uneasy alliances concerning wealth.' },
dmHints: { tome: 'Financial balance or partnership. Hint at a trade or agreement.', holySymbol: 'Harmony in material affairs. Suggest spiritual equilibrium.', sunsword: 'A fair exchange. Show its power to balance scales.', ally: 'A reliable partner. Describe their trustworthiness.', strahd: 'A place of negotiation or uneasy alliances. Emphasize its delicate balance.' }
},
{ id: 'coins-3', name: 'Three of Coins', suit: 'Coins', value: 3, imageFront: basePath + 'Three of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Growth, collaboration, or building a foundation for future prosperity.', holySymbol: 'Divine blessing on creative endeavors.', sunsword: 'A tool for construction or or establishing a secure base.', ally: 'A skilled artisan, builder, or a supportive team member.', strahd: 'A place where his projects are underway, or where he consolidates power.' },
dmHints: { tome: 'Growth, collaboration, or building a foundation. Hint at a new project.', holySymbol: 'Divine blessing on endeavors. Suggest spiritual support.', sunsword: 'A tool for construction. Show its power to build.', ally: 'A skilled artisan or team member. Describe their craftsmanship.', strahd: 'A place where his projects are underway. Emphasize his ongoing work.' }
},
{ id: 'coins-4', name: 'Four of Coins', suit: 'Coins', value: 4, imageFront: basePath + 'Four of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Stability, security, but also possessiveness or stagnation.', holySymbol: 'Spiritual grounding and protection of what is sacred.', sunsword: 'A defense of territory or possessions.', ally: 'A guardian, a collector, or someone resistant to change.', strahd: 'A heavily guarded vault or a place where he hoards his possessions.' },
dmHints: { tome: 'Stability, security, or possessiveness. Hint at guarded wealth or secrets.', holySymbol: 'Protection of what is sacred. Suggest spiritual grounding.', sunsword: 'Defense of territory. Show its power to protect.', ally: 'A guardian or collector. Describe their protective nature.', strahd: 'A heavily guarded vault. Emphasize its impenetrable security.' }
},
{ id: 'coins-5', name: 'Five of Coins', suit: 'Coins', value: 5, imageFront: basePath + 'Five of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Loss, poverty, or material hardship.', holySymbol: 'Charity and compassion, or finding spiritual wealth in adversity.', sunsword: 'A desperate struggle for survival or a last resort.', ally: 'One who is destitute, or one who offers aid to the needy.', strahd: 'A place of destitution, suffering, or where he takes from others.' },
dmHints: { tome: 'Loss, poverty, or hardship. Prepare for a difficult situation.', holySymbol: 'Charity and compassion. Suggest spiritual aid for the needy.', sunsword: 'A desperate struggle. Show its grim reality.', ally: 'An ally who is destitute or offers aid. Describe their plight or generosity.', strahd: 'A place of destitution. Emphasize its despair.' }
},
{ id: 'coins-6', name: 'Six of Coins', suit: 'Coins', value: 6, imageFront: basePath + 'Six of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Generosity, giving and receiving, or debt.', holySymbol: 'Divine grace and the flow of blessings.', sunsword: 'A fair distribution of resources or a just reward.', ally: 'A benefactor, a philanthropist, or someone who gives freely.', strahd: 'A place where he demands tribute or doles out favors.' },
dmHints: { tome: 'Generosity, giving, or debt. Hint at a transaction or exchange.', holySymbol: 'Divine grace and blessings. Suggest spiritual abundance.', sunsword: 'Fair distribution or just reward. Show its power to balance.', ally: 'A benefactor or philanthropist. Describe their giving nature.', strahd: 'A place of tribute or favors. Emphasize his control over resources.' }
},
{ id: 'coins-7', name: 'Seven of Coins', suit: 'Coins', value: 7, imageFront: basePath + 'Seven of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Patience, investment, or waiting for results. Sometimes disappointment.', holySymbol: 'Trust in divine timing and spiritual growth.', sunsword: 'A long-term project or a patient siege.', ally: 'A diligent worker, a farmer, or one who waits for the right moment.', strahd: 'A place where he cultivates his plans, or where patience is required.' },
dmHints: { tome: 'Patience, investment, or waiting. Hint at a long-term plan.', holySymbol: 'Trust in divine timing. Suggest spiritual patience.', sunsword: 'A long-term project or siege. Show its slow but steady progress.', ally: 'A diligent worker or one who waits. Describe their perseverance.', strahd: 'A place where he cultivates plans. Emphasize his long game.' }
},
{ id: 'coins-8', name: 'Eight of Coins', suit: 'Coins', value: 8, imageFront: basePath + 'Eight of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Skill, craftsmanship, or dedication to one\'s work.', holySymbol: 'Divine inspiration for creative endeavors.', sunsword: 'A finely crafted weapon or a tool of great precision.', ally: 'A master artisan, a dedicated student, or a skilled laborer.', strahd: 'A workshop, a laboratory, or where he perfects his dark arts.' },
dmHints: { tome: 'Skill, craftsmanship, or dedication. Hint at a master at work.', holySymbol: 'Divine inspiration for creation. Suggest spiritual artistry.', sunsword: 'A finely crafted tool. Show its precision.', ally: 'A master artisan or skilled laborer. Describe their expertise.', strahd: 'A workshop or laboratory. Emphasize his dark creations.' }
},
{ id: 'coins-9', name: 'Nine of Coins', suit: 'Coins', value: 9, imageFront: basePath + 'Nine of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Abundance, self-sufficiency, or material comfort.', holySymbol: 'Spiritual fulfillment and inner peace.', sunsword: 'A reward for hard work or a secure, prosperous position.', ally: 'A successful individual, or one who enjoys their independence.', strahd: 'A place of luxury and self-indulgence, or where he enjoys his conquests.' },
dmHints: { tome: 'Abundance, self-sufficiency, or comfort. Hint at prosperity.', holySymbol: 'Spiritual fulfillment. Suggest inner peace.', sunsword: 'A reward for hard work. Show its bountiful outcome.', ally: 'An ally who is successful or independent. Describe their contentment.', strahd: 'A place of luxury and indulgence. Emphasize his decadent lifestyle.' }
},
{ id: 'coins-master', name: 'Ten of Coins', suit: 'Coins', value: 10, imageFront: basePath + 'Ten of Coins.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Ultimate financial security, profound understanding of resources, or shrewd business.', holySymbol: 'Abundant blessings and lasting prosperity.', sunsword: 'Securing vast wealth or protecting an empire of resources.', ally: 'A powerful patron, a master of commerce, or a wealthy individual.', strahd: 'His treasury, or where his vast wealth and influence are stored.' },
dmHints: { tome: 'Ultimate financial security or shrewd business. Hint at vast wealth.', holySymbol: 'Abundant blessings and prosperity. Suggest divine favor.', sunsword: 'Securing vast wealth. Show its power to control resources.', ally: 'A powerful patron or master of commerce. Describe their influence.', strahd: 'His treasury or seat of wealth. Emphasize his vast riches.' }
},
// Stars (Glyphs) - 10 cards
{ id: 'stars-1', name: 'Ace of Glyphs', suit: 'Stars', value: 1, imageFront: basePath + 'Ace of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A guiding light, new hope, or inspiration in the darkness.', holySymbol: 'Illumination of the path and spiritual guidance.', sunsword: 'Shining brightly, revealing the way forward even in confusion.', ally: 'An inspiring figure, a beacon of hope, or a dream guide.', strahd: 'A place where hope is scarce, or where his dark influence eclipses all light.' },
dmHints: { tome: 'A guiding light or new hope. Hint at inspiration in darkness.', holySymbol: 'Illumination of the path. Suggest spiritual guidance.', sunsword: 'Shining brightly, revealing the way. Show its power to clarify.', ally: 'An inspiring figure. Describe their hopeful presence.', strahd: 'A place where hope is scarce. Emphasize its oppressive nature.' }
},
{ id: 'stars-2', name: 'Two of Glyphs', suit: 'Stars', value: 2, imageFront: basePath + 'Two of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Intuition, mystery, or hidden knowledge. Often deception or illusion.', holySymbol: 'Enhanced perception, seeing beyond the ordinary veil.', sunsword: 'Cutting through illusions and revealing the true nature of things.', ally: 'One who is intuitive, secretive, or deals with the unseen.', strahd: 'A place of illusion, dreams, or where reality is distorted.' },
dmHints: { tome: 'Intuition, mystery, or hidden knowledge. Hint at deception or illusion.', holySymbol: 'Enhanced perception. Suggest spiritual insight.', sunsword: 'Cutting through illusions. Show its power to reveal truth.', ally: 'An intuitive or secretive ally. Describe their mysterious nature.', strahd: 'A place of illusion or distorted reality. Emphasize its deceptive nature.' }
},
{ id: 'stars-3', name: 'Three of Glyphs', suit: 'Stars', value: 3, imageFront: basePath + 'Three of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Creative expression, intuition, or the unfolding of inner visions.', holySymbol: 'Divine inspiration for artistic or magical endeavors.', sunsword: 'Bringing ideas into reality, or manifesting desires.', ally: 'An artist, a visionary, or someone who inspires creativity.', strahd: 'A place where dark rituals are performed, or where he manifests his will.' },
dmHints: { tome: 'Creative expression or inner visions. Hint at magical manifestation.', holySymbol: 'Divine inspiration. Suggest spiritual creativity.', sunsword: 'Bringing ideas to reality. Show its power to manifest.', ally: 'An artist or visionary. Describe their inspiring nature.', strahd: 'A place of dark rituals. Emphasize his sinister creations.' }
},
{ id: 'stars-4', name: 'Four of Glyphs', suit: 'Stars', value: 4, imageFront: basePath + 'Four of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Stability in magic, or a structured approach to the unknown.', holySymbol: 'Spiritual discipline and control over mystical forces.', sunsword: 'A magical defense or a stable arcane foundation.', ally: 'A disciplined spellcaster or one who brings order to chaos.', strahd: 'A place of powerful magical wards or a controlled arcane environment.' },
dmHints: { tome: 'Stability in magic or a structured approach. Hint at controlled power.', holySymbol: 'Spiritual discipline. Suggest mastery over mystical forces.', sunsword: 'A magical defense. Show its protective aura.', ally: 'A disciplined spellcaster. Describe their controlled power.', strahd: 'A place of powerful wards or controlled magic. Emphasize its arcane security.' }
},
{ id: 'stars-5', name: 'Five of Glyphs', suit: 'Stars', value: 5, imageFront: basePath + 'Five of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual crisis, loss of faith, or disillusionment.', holySymbol: 'Reclaiming faith and finding spiritual resilience.', sunsword: 'A challenge to one\'s beliefs or a test of magical prowess.', ally: 'One who has lost their way, or one who helps others find faith.', strahd: 'A place where faith is tested, or where he seeks to corrupt spirits.' },
dmHints: { tome: 'Spiritual crisis or loss of faith. Prepare for a test of belief.', holySymbol: 'Reclaiming faith. Suggest spiritual resilience.', sunsword: 'A challenge to beliefs. Show its power to test conviction.', ally: 'An ally who has lost their way or helps others find faith. Describe their struggle.', strahd: 'A place where faith is tested. Emphasize its corrupting influence.' }
},
{ id: 'stars-6', name: 'Six of Glyphs', suit: 'Stars', value: 6, imageFront: basePath + 'Six of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Moving towards enlightenment, or a journey of spiritual growth.', holySymbol: 'Divine guidance on a spiritual path.', sunsword: 'A path cleared by magic, or a journey through mystical realms.', ally: 'A spiritual guide, a mentor, or one who has walked a similar path.', strahd: 'A hidden magical path, or a journey into darkness.' },
dmHints: { tome: 'Moving towards enlightenment or spiritual growth. Hint at a mystical journey.', holySymbol: 'Divine guidance on a spiritual path. Suggest a blessed journey.', sunsword: 'A path cleared by magic. Show its power to illuminate.', ally: 'A spiritual guide or mentor. Describe their wisdom.', strahd: 'A hidden magical path or journey into darkness. Emphasize its mysterious route.' }
},
{ id: 'stars-7', name: 'Seven of Glyphs', suit: 'Stars', value: 7, imageFront: basePath + 'Seven of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Hidden truths, illusions, or choices in the realm of magic.', holySymbol: 'Clarity amidst confusion, or discerning true magic from trickery.', sunsword: 'A weapon to dispel illusions or reveal hidden magical effects.', ally: 'A master illusionist, or one who sees beyond the veil.', strahd: 'A place of powerful illusions or hidden magical secrets.' },
dmHints: { tome: 'Hidden truths, illusions, or magical choices. Prepare for deception.', holySymbol: 'Clarity amidst confusion. Suggest spiritual discernment.', sunsword: 'A weapon to dispel illusions. Show its power to reveal truth.', ally: 'A master illusionist or one who sees beyond. Describe their perception.', strahd: 'A place of powerful illusions. Emphasize its deceptive nature.' }
},
{ id: 'stars-8', name: 'Eight of Glyphs', suit: 'Stars', value: 8, imageFront: basePath + 'Eight of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Magical apprenticeship, study, or developing arcane skills.', holySymbol: 'Divine knowledge and understanding of the mystical.', sunsword: 'A tool for magical practice or a focus for spells.', ally: 'A student of magic, a researcher, or a dedicated apprentice.', strahd: 'A library of forbidden lore, or where he studies dark magic.' },
dmHints: { tome: 'Magical apprenticeship or developing arcane skills. Hint at study or training.', holySymbol: 'Divine knowledge of the mystical. Suggest spiritual understanding.', sunsword: 'A tool for magical practice. Show its arcane focus.', ally: 'A student of magic or researcher. Describe their dedication.', strahd: 'A library of forbidden lore. Emphasize his dark studies.' }
},
{ id: 'stars-9', name: 'Nine of Glyphs', suit: 'Glyphs', value: 9, imageFront: basePath + 'Nine of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual fulfillment, inner wisdom, or dreams realized.', holySymbol: 'Divine connection and profound spiritual insight.', sunsword: 'A magical achievement or the culmination of arcane power.', ally: 'A wise hermit, a spiritual guru, or one who has found inner peace.', strahd: 'A place of dark contemplation or where he seeks ultimate power.' },
dmHints: { tome: 'Spiritual fulfillment or inner wisdom. Hint at dreams realized.', holySymbol: 'Divine connection. Suggest profound spiritual insight.', sunsword: 'A magical achievement. Show its culmination of power.', ally: 'A wise hermit or spiritual guru. Describe their inner peace.', strahd: 'A place of dark contemplation. Emphasize his pursuit of ultimate power.' }
},
{ id: 'stars-master', name: 'Ten of Glyphs', suit: 'Stars', value: 10, imageFront: basePath + 'Ten of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Cosmic wisdom, understanding of destiny, or profound magical insight.', holySymbol: 'Divine insight and cosmic protection.', sunsword: 'Aligning with celestial power, granting immense magical ability.', ally: 'A powerful mage, a celestial being, or one with deep arcane knowledge.', strahd: 'A nexus of immense arcane power, or where he seeks to control the very stars.' },
dmHints: { tome: 'Cosmic wisdom or profound magical insight. Hint at destiny.', holySymbol: 'Divine insight and cosmic protection. Suggest celestial power.', sunsword: 'Aligning with celestial power. Show its immense magical ability.', ally: 'A powerful mage or celestial being. Describe their arcane knowledge.', strahd: 'A nexus of immense arcane power. Emphasize his control over magic.' }
},
// Glyphs (Scars) - 10 cards
{ id: 'glyphs-1', name: 'Ace of Scars', suit: 'Glyphs', value: 1, imageFront: basePath + 'Ace of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'A new spiritual beginning, enlightenment, or divine inspiration.', holySymbol: 'A powerful blessing or a fresh surge of faith.', sunsword: 'A path illuminated by divine light, or a clear moral choice.', ally: 'A pure-hearted individual, or one who brings hope.', strahd: 'A place where light struggles against darkness, or where he seeks to corrupt innocence.' },
dmHints: { tome: 'A new spiritual beginning or divine inspiration. Hint at enlightenment.', holySymbol: 'A powerful blessing or surge of faith. Suggest divine favor.', sunsword: 'A path illuminated by light. Show its clear moral choice.', ally: 'A pure-hearted ally. Describe their hopeful presence.', strahd: 'A place where light struggles against darkness. Emphasize its spiritual conflict.' }
},
{ id: 'glyphs-2', name: 'Two of Scars', suit: 'Glyphs', value: 2, imageFront: basePath + 'Two of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual partnership, shared beliefs, or a choice between two paths of faith.', holySymbol: 'Harmony in spiritual endeavors.', sunsword: 'A shared purpose or a unified front against evil.', ally: 'A devout companion, or one who shares your spiritual journey.', strahd: 'A place where spiritual beliefs clash, or where he seeks to divide faiths.' },
dmHints: { tome: 'Spiritual partnership or shared beliefs. Hint at a choice of faith.', holySymbol: 'Harmony in spiritual endeavors. Suggest unity.', sunsword: 'A shared purpose or unified front. Show its power in cooperation.', ally: 'A devout companion. Describe their shared spiritual journey.', strahd: 'A place where spiritual beliefs clash. Emphasize his divisive influence.' }
},
{ id: 'glyphs-3', name: 'Three of Scars', suit: 'Glyphs', value: 3, imageFront: basePath + 'Three of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Celebration, community, or spiritual gathering.', holySymbol: 'Divine blessing on communal efforts.', sunsword: 'A joyous victory or a shared triumph over adversity.', ally: 'A leader of a community, or one who fosters unity.', strahd: 'A place of dark celebration or a gathering of his loyal servants.' },
dmHints: { tome: 'Celebration, community, or spiritual gathering. Hint at a joyous event.', holySymbol: 'Divine blessing on communal efforts. Suggest spiritual harmony.', sunsword: 'A joyous victory. Show its triumphant outcome.', ally: 'A community leader. Describe their unifying presence.', strahd: 'A place of dark celebration. Emphasize his sinister gatherings.' }
},
{ id: 'glyphs-4', name: 'Four of Scars', suit: 'Glyphs', value: 4, imageFront: basePath + 'Four of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual foundation, tradition, or conservative beliefs.', holySymbol: 'Unwavering faith and divine protection of sacred traditions.', sunsword: 'A strong defense of principles or a fortified spiritual position.', ally: 'A traditionalist, an elder, or one who upholds ancient customs.', strahd: 'A place of ancient traditions he seeks to corrupt, or a stronghold of his dark faith.' },
dmHints: { tome: 'Spiritual foundation or tradition. Hint at ancient beliefs.', holySymbol: 'Unwavering faith and divine protection. Suggest spiritual steadfastness.', sunsword: 'A strong defense of principles. Show its protective power.', ally: 'A traditionalist or elder. Describe their adherence to customs.', strahd: 'A place of ancient traditions. Emphasize his attempts to corrupt them.' }
},
{ id: 'glyphs-5', name: 'Five of Scars', suit: 'Glyphs', value: 5, imageFront: basePath + 'Five of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual conflict, loss of faith, or moral crisis.', holySymbol: 'Guidance through spiritual trials and renewed faith.', sunsword: 'A test of conviction or a challenge to one\'s beliefs.', ally: 'One who has faced and overcome a spiritual crisis.', strahd: 'A place of spiritual despair or where faith is shattered.' },
dmHints: { tome: 'Spiritual conflict or loss of faith. Prepare for a moral crisis.', holySymbol: 'Guidance through trials. Suggest renewed faith.', sunsword: 'A test of conviction. Show its challenging nature.', ally: 'An ally who overcame spiritual crisis. Describe their resilience.', strahd: 'A place of spiritual despair. Emphasize its faith-shattering aura.' }
},
{ id: 'glyphs-6', name: 'Six of Scars', suit: 'Glyphs', value: 6, imageFront: basePath + 'Six of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Nostalgia, healing from the past, or returning to spiritual roots.', holySymbol: 'Divine comfort and reconciliation.', sunsword: 'A journey of healing or a return to a place of spiritual significance.', ally: 'One who brings comfort, or helps reconcile past grievances.', strahd: 'A place of lingering regret or where he seeks to twist past memories.' },
dmHints: { tome: 'Nostalgia, healing, or returning to roots. Hint at a past connection.', holySymbol: 'Divine comfort and reconciliation. Suggest spiritual peace.', sunsword: 'A journey of healing. Show its power to restore.', ally: 'An ally who brings comfort or reconciles. Describe their soothing presence.', strahd: 'A place of lingering regret. Emphasize his manipulation of memories.' }
},
{ id: 'glyphs-7', name: 'Seven of Scars', suit: 'Glyphs', value: 7, imageFront: basePath + 'Seven of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual temptation, hidden motives, or choices of faith.', holySymbol: 'Discernment to see through spiritual deceit.', sunsword: 'A weapon to expose hypocrisy or false prophets.', ally: 'One who tests faith, or reveals hidden truths.', strahd: 'A place of false worship or where he preys on spiritual weakness.' },
dmHints: { tome: 'Spiritual temptation or hidden motives. Prepare for a test of faith.', holySymbol: 'Discernment to see through deceit. Suggest spiritual insight.', sunsword: 'A weapon to expose hypocrisy. Show its power to reveal truth.', ally: 'An ally who tests faith or reveals truths. Describe their challenging nature.', strahd: 'A place of false worship. Emphasize his exploitation of spiritual weakness.' }
},
{ id: 'glyphs-8', name: 'Eight of Scars', suit: 'Glyphs', value: 8, imageFront: basePath + 'Eight of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual discipline, introspection, or seeking deeper meaning.', holySymbol: 'Divine wisdom and profound spiritual understanding.', sunsword: 'A tool for self-mastery or a focused spiritual quest.', ally: 'A hermit, a monk, or one who seeks solitude for spiritual growth.', strahd: 'A place of dark contemplation or where he seeks forbidden knowledge.' },
dmHints: { tome: 'Spiritual discipline or introspection. Hint at seeking deeper meaning.', holySymbol: 'Divine wisdom. Suggest profound spiritual understanding.', sunsword: 'A tool for self-mastery. Show its power to focus.', ally: 'A hermit or monk. Describe their contemplative nature.', strahd: 'A place of dark contemplation. Emphasize his pursuit of forbidden knowledge.' }
},
{ id: 'glyphs-9', name: 'Nine of Scars', suit: 'Glyphs', value: 9, imageFront: basePath + 'Nine of Glyphs.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Spiritual enlightenment, fulfillment, or divine blessing.', holySymbol: 'Profound spiritual connection and inner radiance.', sunsword: 'A beacon of hope and light, or a divine intervention.', ally: 'A saintly figure, a healer, or one who radiates positive energy.', strahd: 'A place where he attempts to extinguish all hope and light.' },
dmHints: { tome: 'Spiritual enlightenment or fulfillment. Hint at divine blessing.', holySymbol: 'Profound spiritual connection. Suggest inner radiance.', sunsword: 'A beacon of hope. Show its power to bring light.', ally: 'A saintly figure or healer. Describe their positive energy.', strahd: 'A place where hope is extinguished. Emphasize its oppressive darkness.' }
},
{ id: 'glyphs-master', name: 'Ten of Scars', suit: 'Glyphs', value: 10, imageFront: basePath + 'Ten of Scars.png', imageBack: basePath + 'back.png',
meanings: { tome: 'Profound spiritual knowledge, divine guidance, or ultimate faith.', holySymbol: 'Absolute divine protection and spiritual power.', sunsword: 'A weapon of holy vengeance or ultimate spiritual authority.', ally: 'A powerful cleric, a spiritual leader, or a divine agent.', strahd: 'A nexus of dark magic, where his most potent spells are woven.' },
dmHints: { tome: 'Profound spiritual knowledge or ultimate faith. Hint at divine guidance.', holySymbol: 'Absolute divine protection. Suggest ultimate spiritual power.', sunsword: 'A weapon of holy vengeance. Show its divine authority.', ally: 'A powerful cleric or spiritual leader. Describe their strong faith.', strahd: 'A nexus of dark magic. Emphasize his potent spells.' }
},
// Face Cards (4 suits, 3 cards each - 12 cards total)
// Assign these to specific suits
{ id: 'warrior', name: 'Warrior', suit: 'Swords', value: null, imageFront: basePath + 'Warrior.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of courage and martial prowess.', holySymbol: 'The holy symbol offers divine protection in battle.', sunsword: 'The sunsword is wielded by a true warrior.', ally: 'Your ally is a skilled combatant.', strahd: 'Strahd\'s location is a place of battle or military might.' },
dmHints: { tome: 'The Tome speaks of courage and martial prowess. Hint at a challenge.', holySymbol: 'The Holy Symbol offers divine protection in battle. Suggest spiritual defense.', sunsword: 'The Sunsword is wielded by a true warrior. Show its combat potential.', ally: 'Your Ally is a skilled combatant. Describe their strength.', strahd: 'Strahd\'s location is a place of battle. Emphasize its martial significance.' }
},
{ id: 'rogue', name: 'Rogue', suit: 'Coins', value: null, imageFront: basePath + 'Rogue.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals hidden paths and cunning strategies.', holySymbol: 'The holy symbol offers stealth and protection from detection.', sunsword: 'The sunsword can bypass defenses or strike from the shadows.', ally: 'Your ally is cunning and agile, a master of shadows.', strahd: 'Strahd\'s location is a place of intrigue, hidden passages, or traps.' },
dmHints: { tome: 'The Tome reveals hidden paths or cunning strategies. Hint at secrets.', holySymbol: 'The Holy Symbol offers stealth. Suggest spiritual concealment.', sunsword: 'The Sunsword can bypass defenses. Show its ability to find weaknesses.', ally: 'Your Ally is cunning and agile. Describe their elusive nature.', strahd: 'Strahd\'s location is a place of intrigue or traps. Emphasize its hidden dangers.' }
},
{ id: 'mage', name: 'Mage', suit: 'Stars', value: null, imageFront: basePath + 'Mage.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of arcane secrets and powerful spells.', holySymbol: 'The holy symbol offers protection against dark magic.', sunsword: 'The sunsword channels raw magical energy.', ally: 'Your ally is a powerful spellcaster.', strahd: 'Strahd\'s location is a place of immense magical power.' },
dmHints: { tome: 'The Tome speaks of arcane secrets and powerful spells. Hint at magic.', holySymbol: 'The Holy Symbol offers protection from dark magic. Suggest spiritual defense.', sunsword: 'The Sunsword channels raw magical energy. Show its arcane power.', ally: 'Your Ally is a powerful spellcaster. Describe their magical abilities.', strahd: 'Strahd\'s location is a place of immense magical power. Emphasize its arcane aura.' }
},
{ id: 'priest', name: 'Priest', suit: 'Glyphs', value: null, imageFront: basePath + 'Priest.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals divine knowledge and sacred rituals.', holySymbol: 'The holy symbol offers profound spiritual healing and protection.', sunsword: 'The sunsword is blessed with divine power.', ally: 'Your ally is a devout and wise spiritual leader.', strahd: 'Strahd\'s location is a place of corrupted faith or unholy rituals.' },
dmHints: { tome: 'The Tome reveals divine knowledge or sacred rituals. Hint at faith.', holySymbol: 'The Holy Symbol offers spiritual healing. Suggest divine intervention.', sunsword: 'The Sunsword is blessed with divine power. Show its holy influence.', ally: 'Your Ally is a devout spiritual leader. Describe their wisdom.', strahd: 'Strahd\'s location is a place of corrupted faith. Emphasize its unholy nature.' }
},
{ id: 'knight', name: 'Knight', suit: 'Swords', value: null, imageFront: basePath + 'Knight.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of chivalry and duty.', holySymbol: 'The holy symbol offers righteous protection.', sunsword: 'The sunsword is wielded by a noble defender.', ally: 'Your ally is a brave and honorable knight.', strahd: 'Strahd\'s location is a place of fallen heroes or broken oaths.' },
dmHints: { tome: 'The Tome speaks of chivalry and duty. Hint at a noble cause.', holySymbol: 'The Holy Symbol offers righteous protection. Suggest spiritual defense.', sunsword: 'The Sunsword is wielded by a noble defender. Show its honorable purpose.', ally: 'Your Ally is a brave knight. Describe their loyalty.', strahd: 'Strahd\'s location is a place of fallen heroes. Emphasize its tragic past.' }
},
{ id: 'thief', name: 'Thief', suit: 'Coins', value: null, imageFront: basePath + 'Thief.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals hidden stashes and illicit dealings.', holySymbol: 'The holy symbol offers a way to reclaim stolen goods.', sunsword: 'The sunsword can cut through locks or sever connections to ill-gotten gains.', ally: 'Your ally is resourceful and skilled in acquiring what is needed.', strahd: 'Strahd\'s location is a place of ill-gotten wealth or stolen artifacts.' },
dmHints: { tome: 'The Tome reveals hidden stashes or illicit dealings. Hint at theft.', holySymbol: 'The Holy Symbol offers a way to reclaim stolen goods. Suggest spiritual justice.', sunsword: 'The Sunsword can cut through locks. Show its ability to bypass security.', ally: 'Your Ally is resourceful in acquiring. Describe their cunning.', strahd: 'Strahd\'s location is a place of ill-gotten wealth. Emphasize its stolen riches.' }
},
{ id: 'wizard', name: 'Wizard', suit: 'Stars', value: null, imageFront: basePath + 'Wizard.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of ancient spells and forgotten lore.', holySymbol: 'The holy symbol offers protection against dark enchantments.', sunsword: 'The sunsword can channel immense magical power.', ally: 'Your ally is a wise and powerful wizard.', strahd: 'Strahd\'s location is a library of forbidden magic or a wizard\'s tower.' },
dmHints: { tome: 'The Tome speaks of ancient spells and forgotten lore. Hint at powerful magic.', holySymbol: 'The Holy Symbol offers protection from dark enchantments. Suggest spiritual defense.', sunsword: 'The Sunsword can channel immense magical power. Show its arcane power.', ally: 'Your Ally is a wise wizard. Describe their magical prowess.', strahd: 'Strahd\'s location is a library of forbidden magic. Emphasize its dangerous knowledge.' }
},
{ id: 'cleric', name: 'Cleric', suit: 'Glyphs', value: null, imageFront: basePath + 'Cleric.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome reveals divine revelations and sacred texts.', holySymbol: 'The holy symbol offers profound healing and spiritual guidance.', sunsword: 'The sunsword is imbued with holy power.', ally: 'Your ally is a devoted and compassionate cleric.', strahd: 'Strahd\'s location is a desecrated shrine or a place of twisted faith.' },
dmHints: { tome: 'The Tome reveals divine revelations. Hint at sacred texts.', holySymbol: 'The Holy Symbol offers profound healing. Suggest spiritual guidance.', sunsword: 'The Sunsword is imbued with holy power. Show its divine blessing.', ally: 'Your Ally is a devoted cleric. Describe their compassion.', strahd: 'Strahd\'s location is a desecrated shrine. Emphasize its twisted faith.' }
},
{ id: 'paladin', name: 'Paladin', suit: 'Swords', value: null, imageFront: basePath + 'Paladin.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of righteous crusades and sacred oaths.', holySymbol: 'The holy symbol offers unwavering divine protection and justice.', sunsword: 'The sunsword is a weapon of pure divine light against evil.', ally: 'Your ally is a zealous and unyielding paladin.', strahd: 'Strahd\'s location is a place where good has been corrupted or a holy site defiled.' },
dmHints: { tome: 'The Tome speaks of righteous crusades or sacred oaths. Hint at a holy quest.', holySymbol: 'The Holy Symbol offers unwavering divine protection. Suggest spiritual justice.', sunsword: 'The Sunsword is a weapon of pure divine light. Show its holy power.', ally: 'Your Ally is a zealous paladin. Describe their unwavering resolve.', strahd: 'Strahd\'s location is a place where good is corrupted. Emphasize its defiled nature.' }
},
{ id: 'bard', name: 'Bard', suit: 'Coins', value: null, imageFront: basePath + 'Bard.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of inspiring tales and forgotten songs.', holySymbol: 'The holy symbol offers solace through art and performance.', sunsword: 'The sunsword can inspire allies or dishearten foes with its presence.', ally: 'Your ally is a charismatic storyteller or a master of song.', strahd: 'Strahd\'s location is a place of twisted entertainment or forced revelry.' },
dmHints: { tome: 'The Tome speaks of inspiring tales or forgotten songs. Hint at a performance.', holySymbol: 'The Holy Symbol offers solace through art. Suggest spiritual comfort.', sunsword: 'The Sunsword can inspire or dishearten. Show its emotional impact.', ally: 'Your Ally is a charismatic storyteller. Describe their captivating presence.', strahd: 'Strahd\'s location is a place of twisted entertainment. Emphasize its dark revelry.' }
},
{ id: 'sorcerer', name: 'Sorcerer', suit: 'Stars', value: null, imageFront: basePath + 'Sorcerer.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of innate magical talent and raw power.', holySymbol: 'The holy symbol offers control over wild magic.', sunsword: 'The sunsword can channel untamed arcane energy.', ally: 'Your ally possesses powerful innate magical abilities.', strahd: 'Strahd\'s location is a place where raw magic runs wild or is dangerously contained.' },
dmHints: { tome: 'The Tome speaks of innate magical talent or raw power. Hint at wild magic.', holySymbol: 'The Holy Symbol offers control over wild magic. Suggest spiritual discipline.', sunsword: 'The Sunsword can channel untamed arcane energy. Show its raw power.', ally: 'Your Ally possesses powerful innate magic. Describe their unpredictable abilities.', strahd: 'Strahd\'s location is a place where raw magic runs wild. Emphasize its chaotic energy.' }
},
{ id: 'druid', name: 'Druid', suit: 'Glyphs', value: null, imageFront: basePath + 'Druid.png', imageBack: basePath + 'back.png',
meanings: { tome: 'The tome speaks of natural cycles and ancient wilderness lore.', holySymbol: 'The holy symbol offers connection to nature and its healing powers.', sunsword: 'The sunsword can restore natural balance or cut through unnatural growth.', ally: 'Your ally is a protector of nature or a shapeshifter.', strahd: 'Strahd\'s location is a corrupted natural site or a twisted grove.' },
dmHints: { tome: 'The Tome speaks of natural cycles or wilderness lore. Hint at nature\'s influence.', holySymbol: 'The Holy Symbol offers connection to nature. Suggest spiritual harmony.', sunsword: 'The Sunsword can restore natural balance. Show its power to heal the land.', ally: 'Your Ally is a protector of nature. Describe their connection to the wild.', strahd: 'Strahd\'s location is a corrupted natural site. Emphasize its twisted beauty.' }
},
];
// Ensure there are exactly 54 cards for a full deck simulation
// This loop will fill any missing cards with duplicates if the array is manually shortened,
// or trim it if it's accidentally lengthened.
while (tarokkaCards.length < 54) {
tarokkaCards.push(tarokkaCards[Math.floor(Math.random() * tarokkaCards.length)]);
}
if (tarokkaCards.length > 54) {
tarokkaCards.splice(54);
}
// Music track data - predefined list
const musicTracks = [
{ id: 'music_default', name: 'Barovian Night (Default)', src: basePath + 'music/music.mp3' },
{ id: 'deep_emotion', name: 'Deep Emotion', src: basePath + 'music/deep emotion.mp3' },
{ id: 'cosmic_horror', name: 'Cosmic Horror', src: basePath + 'music/cosmic horror.mp3' },
{ id: 'sinister_akroterion', name: 'Sinister Akroterion', src: basePath + 'music/sinister akroterion.mp3' },
{ id: 'scandinavian_forest', name: 'Scandinavian Forest', src: basePath + 'music/Scandinavian forest.mp3' },
{ id: 'sweet_anticipation', name: 'Sweet Anticipation', src: basePath + 'music/sweet anticipation.mp3' },
{ id: 'emotional_movement', name: 'Emotional Movement', src: basePath + 'music/emotional movement.mp3' }
];
// --- Global Variables ---
let currentDeck = [...tarokkaCards]; // Working copy of the deck
let dealtCards = {
tome: null,
holySymbol: null,
sunsword: null,
ally: null,
strahd: null
};
const fortunePositions = ['tome', 'holySymbol', 'sunsword', 'ally', 'strahd'];
let isDmPanelVisible = false; // State for DM panel visibility
let isCastModeActive = false; // State for Cast mode
// --- DOM Elements ---
const preloader = document.getElementById('preloader');
const backgroundTable = document.getElementById('background-table');
const mainGameView = document.getElementById('main-game-view');
// Main Game View elements
const cardSpreadContainer = document.getElementById('card-spread-container');
const fortuneDisplay = document.getElementById('fortune-display');
const prophecyLog = document.getElementById('prophecy-log');
const logEntriesContainer = document.getElementById('log-entries');
const candleLightSource = document.getElementById('candle-light-source');
const dmHintBox = document.getElementById('dm-hint-box'); // New DM Hint Box
const dmHintText = document.getElementById('dm-hint-text'); // Text element inside DM Hint Box
// DM Interface Container elements
const dmInterfaceContainer = document.getElementById('dm-interface-container');
const dmControlPanel = document.getElementById('dm-control-panel');
// Removed: const currentReadingList = document.getElementById('current-reading-list');
const castToPlayersBtn = document.getElementById('cast-to-players-btn'); // Moved
const patreonBtn = document.getElementById('patreon-btn'); // Moved
// Buttons
const toggleDmBtn = document.getElementById('toggle-dm-btn');
const randomizeAllBtn = document.getElementById('randomize-all-btn');
const shuffleDealBtn = document.getElementById('shuffle-deal-btn');
const revealAllBtn = document.getElementById('reveal-all-btn');
const hideAllBtn = document.getElementById('hide-all-btn');
const printHandoutBtn = document.getElementById('print-handout-btn');
const saveReadingBtn = document.getElementById('save-reading-btn');
const volumeBtn = document.getElementById('volume-btn'); // Volume button
const volumeSlider = document.getElementById('volume-slider'); // Volume slider
const backgroundMusic = document.getElementById('background-music'); // Audio element
const flipSound = document.getElementById('flip-sound'); // Audio element for flip sound
const shuffleSound = document.getElementById('shuffle-sound'); // Audio element for shuffle sound
const musicSelector = document.getElementById('music-selector'); // New music selector
// ESC Indicator
const escIndicator = document.getElementById('esc-indicator');
// --- Utility Functions ---
/**
* Fisher-Yates (Knuth) Shuffle algorithm.
* @param {Array} array - The array to shuffle.
* @returns {Array} - The shuffled array.
*/
function shuffleArray(array) {
let currentIndex = array.length, randomIndex;
while (currentIndex !== 0) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex--;
[array[currentIndex], array[randomIndex]] = [
array[randomIndex], array[currentIndex]];
}
return array;
}
/**
* Creates and appends a dust mote to the specified container.
*/
function createDustMote() {
const dustMotesContainer = document.querySelector('.dust-motes');
const mote = document.createElement('div');
mote.classList.add('dust-mote');
const size = Math.random() * 3 + 1; // 1 to 4px
mote.style.width = `${size}px`;
mote.style.height = `${size}px`;
mote.style.left = `${Math.random() * 100}%`;
mote.style.top = `${Math.random() * 100}%`;
mote.style.animationDelay = `-${Math.random() * 10}s`; // Stagger animation start
dustMotesContainer.appendChild(mote);
}
/**
* Initializes dust motes.
*/
function initDustMotes(count = 50) {
for (let i = 0; i < count; i++) {
createDustMote();
}
}
/**
* Creates a visual representation of a card.
* Returns a Promise that resolves with the card element once both front and back images are loaded.
* @param {Object} cardData - The card object from tarokkaCards.
* @param {boolean} isFlipped - Whether the card should be shown face up.
* @returns {Promise<HTMLElement>} - A promise resolving to the card DOM element.
*/
function createCardElement(cardData, isFlipped = false) {
return new Promise(resolve => {
console.log(`createCardElement: Creating card for ${cardData.name}, front: ${cardData.imageFront}, back: ${cardData.imageBack}`);
const card = document.createElement('div');
card.classList.add('card');
card.dataset.cardId = cardData.id;
card.dataset.position = '';
const cardFront = document.createElement('div');
cardFront.classList.add('card-face', 'card-front');
const frontImage = new Image();
let frontLoaded = false;
frontImage.onload = () => {
cardFront.style.backgroundImage = `url('${cardData.imageFront}')`;
console.log(`createCardElement: Front image loaded for ${cardData.name}`);
frontLoaded = true;
if (backLoaded) resolve(card); // Resolve when both are loaded
};
frontImage.onerror = () => {
console.error(`createCardElement: Failed to load front image for ${cardData.name} from ${cardData.imageFront}. Using placeholder.`);
cardFront.style.backgroundImage = `url('https://placehold.co/110x190/333333/FFFFFF?text=${cardData.name.replace(/ /g, '+')}')`;
frontLoaded = true;
if (backLoaded) resolve(card);
};
frontImage.src = cardData.imageFront;
const cardBack = document.createElement('div');
cardBack.classList.add('card-face', 'card-back');
const backImage = new Image();
let backLoaded = false;
backImage.onload = () => {
cardBack.style.backgroundImage = `url('${cardData.imageBack}')`;
console.log(`createCardElement: Back image loaded for ${cardData.name}`);
backLoaded = true;
if (frontLoaded) resolve(card); // Resolve when both are loaded
};
backImage.onerror = () => {
console.error(`createCardElement: Failed to load back image for ${cardData.name} from ${cardData.imageBack}. Using placeholder.`);
cardBack.style.backgroundImage = `url('https://placehold.co/110x190/3A1F1F/B8860B?text=Tarokka+Back+Ornate')`;
backLoaded = true;
if (frontLoaded) resolve(card);
};
backImage.src = cardData.imageBack;
card.appendChild(cardFront);
card.appendChild(cardBack);
if (isFlipped) {
card.classList.add('flipped');
console.log(`createCardElement: Card ${cardData.name} initialized as flipped.`);
}
// Add hover effects directly to the card element
card.addEventListener('mouseenter', function() {
if (!this.classList.contains('flipped')) {
this.style.transform = `translateY(-10px) scale(1.05) translate(${cardMoveX}px, ${cardMoveY}px)`; // Apply parallax on hover
}
});
card.addEventListener('mouseleave', function() {
if (!this.classList.contains('flipped')) {
this.style.transform = `translateY(0) scale(1) translate(${cardMoveX}px, ${cardMoveY}px)`; // Reset parallax on leave
}
});
// If images are already cached/loaded, they might fire onload immediately.
// Handle case where both are already loaded before event listeners are fully set up.
if (frontImage.complete && backImage.complete) {
frontLoaded = true;
backLoaded = true;
console.log(`createCardElement: Both images already complete for ${cardData.name}. Resolving immediately.`);
resolve(card);
}
});
}
/**
* Renders the initial empty card positions.
*/
function renderEmptyCardPositions() {
console.log('renderEmptyCardPositions: Clearing all card positions.');
fortunePositions.forEach(pos => {
const positionDiv = document.getElementById(`position-${pos}`);
if (positionDiv) {
positionDiv.innerHTML = ''; // Clear previous content
positionDiv.classList.remove('has-card'); // Ensure no card class
}
});
}
/**
* Deals cards to the specified positions.
* @param {Object} cardsToDeal - An object mapping position names to card objects.
* @param {boolean} animate - Whether to show a dealing animation.
*/
async function dealCards(cardsToDeal, animate = true) {
console.log('dealCards: Starting to deal cards.');
// Clear existing cards
renderEmptyCardPositions();
hideAllFortunes(); // Hide fortune display
clearProphecyLog(); // Clear prophecy log on new deal
clearDmHintBox(); // Clear DM hint box on new deal
const cardCreationPromises = [];
for (const pos of fortunePositions) {
const cardData = cardsToDeal[pos];
if (cardData) {
const positionDiv = document.getElementById(`position-${pos}`);
positionDiv.classList.add('has-card');
// Create card element and wait for its images to load
const cardPromise = createCardElement(cardData, false);
cardCreationPromises.push(cardPromise);
cardPromise.then(cardElement => {
cardElement.dataset.position = pos;
cardElement.addEventListener('click', () => {
console.log(`Card clicked: ${cardData.name} at ${pos}`);
if (!cardElement.classList.contains('flipped')) {
flipCard(cardElement, cardData, pos);
}
});
positionDiv.appendChild(cardElement);
if (animate) {
cardElement.style.transition = 'none';
cardElement.style.opacity = '0';
cardElement.style.transform = 'translateY(-20px)';
setTimeout(() => { // Use setTimeout for animation start
cardElement.style.opacity = '1';
cardElement.style.transform = 'translateY(0)';
cardElement.style.transition = ''; // Reset to CSS defined transition
}, 100 * fortunePositions.indexOf(pos)); // Stagger deal
}
});
}
}
await Promise.all(cardCreationPromises); // Wait for all cards to be created and images loaded
console.log('dealCards: All card elements created and images loaded.');
dealtCards = cardsToDeal; // Update global state
// Removed: updateCurrentReadingDisplay(); // Update DM panel display
}
/**
* Flips a card and displays its meaning.
* @param {HTMLElement} cardElement - The card DOM element.
* @param {Object} cardData - The card object.
* @param {string} positionName - The name of the fortune position (e.g., 'tome').
*/
function flipCard(cardElement, cardData, positionName) {
console.log(`flipCard: Attempting to flip card ${cardData.name} at ${positionName}`);
if (cardElement.classList.contains('flipped')) {
console.log(`flipCard: Card ${cardData.name} already flipped.`);
return; // Already flipped
}
// Play flip sound effect if available
playFlipSound();
// Add the flipped class for CSS animation
cardElement.classList.add('flipped');
console.log(`flipCard: 'flipped' class added to ${cardData.name}.`);
// Update the card front with the revealed card image
const cardFront = cardElement.querySelector('.card-front');
if (cardFront && cardData.imageFront) {
// Ensure the image is loaded before setting it as background
const img = new Image();
img.onload = () => {
cardFront.style.backgroundImage = `url(${cardData.imageFront})`;
cardFront.style.backgroundSize = 'cover';
cardFront.style.backgroundPosition = 'center';
};
img.onerror = () => {
console.error(`flipCard: Failed to load front image for ${cardData.name} from ${cardData.imageFront}. Using placeholder.`);
cardFront.style.backgroundImage = `url('https://placehold.co/110x190/333333/FFFFFF?text=${cardData.name.replace(/ /g, '+')}')`;
};
img.src = cardData.imageFront;
}
// Add a small delay before showing fortune to allow flip animation
setTimeout(() => {
displayFortune(cardData, positionName);
addEntryToProphecyLog(cardData, positionName);
updateDmHintBox(cardData, positionName); // Update DM hint box
}, 1200); // Match your CSS transition duration
}
/**
* Displays the fortune text for a revealed card.
* @param {Object} cardData - The card object.
* @param {string} positionName - The name of the fortune position.
*/
function displayFortune(cardData, positionName) {
console.log(`displayFortune: Displaying fortune for ${cardData.name} at ${positionName}.`);
const fortuneText = cardData.meanings[positionName] || 'No specific fortune for this position.';
const positionTitle = positionName.charAt(0).toUpperCase() + positionName.slice(1); // Capitalize
// Get or create the fortune display container
const fortuneDisplay = document.getElementById('fortune-display') ||
document.querySelector('.fortune-display');
if (!fortuneDisplay) {
console.error('Fortune display container not found');
return;
}
let fortuneEntry = document.getElementById(`fortune-entry-${positionName}`);
if (!fortuneEntry) {
fortuneEntry = document.createElement('div');
fortuneEntry.id = `fortune-entry-${positionName}`;
fortuneEntry.classList.add('fortune-entry', 'opacity-0'); // Start hidden for fade-in
fortuneDisplay.appendChild(fortuneEntry);
}
fortuneEntry.innerHTML = `
<h3 class="text-xl font-bold text-amber-300">${positionTitle}: ${cardData.name}</h3>
<p class="text-gray-200 mt-2">${fortuneText}</p>
`;
// Apply fade-in animation
fortuneEntry.style.transition = 'opacity 0.5s ease-in-out';
setTimeout(() => {
fortuneEntry.classList.remove('opacity-0');
fortuneEntry.classList.add('opacity-100');
}, 50);
fortuneDisplay.classList.add('active');
}
/**
* Hides all fortune text.
*/
function hideAllFortunes() {
console.log('hideAllFortunes: Hiding all fortune displays.');
if (fortuneDisplay) {
fortuneDisplay.classList.remove('active');
setTimeout(() => {
fortuneDisplay.innerHTML = '';
Array.from(fortuneDisplay.children).forEach(child => child.classList.add('opacity-0'));
}, 500);
}
}
/**
* Updates the DM Hint Box with the meaning of the flipped card.
* @param {Object} cardData - The card object.
* @param {string} positionName - The name of the fortune position.
*/
function updateDmHintBox(cardData, positionName) {
// Only show if not in cast mode AND DM panel is visible
if (!isCastModeActive && isDmPanelVisible) {
const hint = cardData.dmHints[positionName] || `The ${cardData.name} at the ${positionName} position holds a subtle truth. Consider its meaning in context.`;
dmHintText.textContent = hint;
dmHintBox.classList.add('active'); // Show the hint box
console.log(`updateDmHintBox: Displaying hint for ${cardData.name} at ${positionName}.`);
} else {
clearDmHintBox(); // Ensure it's hidden
}
}
/**
* Clears the DM Hint Box.
*/
function clearDmHintBox() {
dmHintText.textContent = '';
dmHintBox.classList.remove('active'); // Hide the hint box
console.log('clearDmHintBox: DM hint box cleared.');
}
/**
* Populates the DM rigging dropdowns with all card options.
*/
function populateRiggingDropdowns() {
console.log('populateRiggingDropdowns: Populating rigging dropdowns.');
fortunePositions.forEach(pos => {
const selectElement = document.getElementById(`rig-${pos}`);
if (selectElement) {
selectElement.innerHTML = '<option value="">-- Random --</option>'; // Default option
tarokkaCards.forEach(card => {
const option = document.createElement('option');
option.value = card.id;
option.textContent = `${card.name} (${card.suit})`;
selectElement.appendChild(option);
});
// Add event listener for rigging
selectElement.addEventListener('change', (event) => {
const selectedCardId = event.target.value;
const position = event.target.dataset.position;
const cardData = tarokkaCards.find(c => c.id === selectedCardId);
dealtCards[position] = cardData || null; // Update dealtCards directly
console.log(`Rigged ${cardData ? cardData.name : 'random'} for ${position}.`);
});
}
});
}
/**
* Adds an entry to the Prophecy Log sidebar.
* @param {Object} cardData - The card object.
* @param {string} positionName - The name of the fortune position.
*/
function addEntryToProphecyLog(cardData, positionName) {
if (logEntriesContainer) {
const logEntry = document.createElement('div');
logEntry.classList.add('log-entry', 'opacity-0');
const cardThumbnail = document.createElement('div');
cardThumbnail.classList.add('card-thumbnail');
const thumbImage = new Image();
thumbImage.onload = () => { cardThumbnail.style.backgroundImage = `url('${cardData.imageFront}')`; };
thumbImage.onerror = () => { cardThumbnail.style.backgroundImage = `url('https://placehold.co/110x190/333333/FFFFFF?text=Thumb')`; };
thumbImage.src = cardData.imageFront;
const logText = document.createElement('div');
logText.classList.add('log-text');
logText.innerHTML = `
<strong>${positionName.charAt(0).toUpperCase() + positionName.slice(1)}:</strong>
<span>${cardData.name}</span>
`;
logEntry.appendChild(cardThumbnail);
logEntry.appendChild(logText);
logEntriesContainer.appendChild(logEntry);
logEntriesContainer.scrollTop = logEntriesContainer.scrollHeight;
setTimeout(() => logEntry.classList.remove('opacity-0'), 50);
console.log(`addEntryToProphecyLog: Added ${cardData.name} to log.`);
}
}
/**
* Clears all entries from the Prophecy Log sidebar.
*/
function clearProphecyLog() {
if (logEntriesContainer) {
logEntriesContainer.innerHTML = '';
console.log('clearProphecyLog: Prophecy log cleared.');
}
}
/**
* Handles the "Shuffle & Deal" action.
*/
async function handleShuffleAndDeal() {
console.log('handleShuffleAndDeal: Shuffling and dealing cards.');
playShuffleSound(); // Play shuffle sound
currentDeck = shuffleArray([...tarokkaCards]); // Reshuffle the full deck
const newDealtCards = {};
const availableCards = [...currentDeck]; // Use a copy of the shuffled deck
// Get rigged cards directly from the dropdowns
const riggedSelections = {};
fortunePositions.forEach(pos => {
const selectElement = document.getElementById(`rig-${pos}`);
if (selectElement && selectElement.value) {
riggedSelections[pos] = selectElement.value;
}
});
for (const pos of fortunePositions) {
const riggedCardId = riggedSelections[pos];
if (riggedCardId) {
const riggedCardIndex = availableCards.findIndex(card => card.id === riggedCardId);
if (riggedCardIndex !== -1) {
newDealtCards[pos] = availableCards.splice(riggedCardIndex, 1)[0];
} else {
// If rigged card is not found (e.g., already used or invalid), pick random
newDealtCards[pos] = availableCards.pop();
console.warn(`Rigged card ${riggedCardId} for ${pos} not found or already used. Assigning random card.`);
}
} else {
newDealtCards[pos] = availableCards.pop();
}
}
await dealCards(newDealtCards, true); // Deal with animation
hideAllFortunes(); // Ensure fortunes are hidden initially
clearDmHintBox(); // Clear DM hint box on new deal
console.log('handleShuffleAndDeal: Cards shuffled and dealt.');
}
/**
* Handles "Randomize All" button.
*/
function handleRandomizeAll() {
console.log('handleRandomizeAll: Randomizing all rigging dropdowns.');
fortunePositions.forEach(pos => {
const selectElement = document.getElementById(`rig-${pos}`);
if (selectElement) {
selectElement.value = ''; // Reset dropdowns
}
});
}
/**
* Handles "Reveal All" button.
*/
function handleRevealAll() {
console.log('handleRevealAll: Revealing all cards.');
hideAllFortunes(); // Clear previous fortunes
clearDmHintBox(); // Clear DM hint box
fortunePositions.forEach(pos => {
const cardElement = document.querySelector(`#position-${pos} .card`);
const cardData = dealtCards[pos];
if (cardElement && cardData) {
// Directly flip without playing sound multiple times for reveal all
if (!cardElement.classList.contains('flipped')) {
cardElement.classList.add('flipped');
const cardFront = cardElement.querySelector('.card-front');
if (cardFront && cardData.imageFront) {
const img = new Image();
img.onload = () => { cardFront.style.backgroundImage = `url(${cardData.imageFront})`; };
img.onerror = () => { cardFront.style.backgroundImage = `url('https://placehold.co/110x190/333333/FFFFFF?text=${cardData.name.replace(/ /g, '+')}')`; };
img.src = cardData.imageFront;
}
displayFortune(cardData, pos);
addEntryToProphecyLog(cardData, pos);
updateDmHintBox(cardData, pos); // Update DM hint box
}
}