-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSharedScript.js
More file actions
6320 lines (5525 loc) · 254 KB
/
SharedScript.js
File metadata and controls
6320 lines (5525 loc) · 254 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
function setupNav(){
const tabs = document.querySelectorAll('.tabs a');
const sections = document.querySelectorAll('main section');
tabs.forEach(tab => {
tab.addEventListener('click', function (e) {
e.preventDefault();
// Hide all sections
sections.forEach(section => {
section.style.display = 'none';
});
if (tab.getAttribute('href').substring(1) === "Docs"){
autoResizeTextareas()
}
tabs.forEach(t => {
t.style.border = '';
});
// Show the selected section
const targetId = tab.getAttribute('href').substring(1);
const targetSection = document.getElementById(targetId);
if (targetSection) {
targetSection.style.display = 'block';
tab.style.border = '1px solid rgb(151, 151, 151)';
} else {
console.log(`Target section with ID '${targetId}' not found.`);
}
});
});
// Display the initial section (e.g., Player Stats)
const initialTab = tabs[0];
initialTab.click();
}
let modalShouldShowActions = false;
async function setVersionToggle() {
const versionData = await loadDataFromGlobalStorage("D&DVersion");
const versionSetting = versionData?.Version || '2014';
setActiveVersionButton(versionSetting);
}
document.querySelectorAll('.version-option').forEach(button => {
button.addEventListener('click', function() {
const value = this.dataset.value;
setActiveVersionButton(value);
saveToGlobalStorage("D&DVersion", "Version", value, false)
loadSpellDataFiles()
});
});
function setActiveVersionButton(value) {
console.warn("Setting version toggle to: " + value);
document.querySelectorAll('.version-option').forEach(btn => {
btn.classList.toggle('active', btn.dataset.value === value);
});
}
//Adding event listeners to the toggle buttons for Adv and Disadv
const toggleButtons = document.querySelectorAll('.toggle-button');
toggleButtons.forEach(button => {
button.addEventListener('click', () => {
toggleButtons.forEach(btn => btn.classList.remove('active'));
button.classList.add('active');
});
});
function generateUUID() {
return 'xxx-xx-4xxx-yxxx-xx'.replace(/[xy]/g, function(c) {
const r = Math.random() * 16 | 0;
const v = c === 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
//The characterStatBonuses will be used to maintain an array of all bonuses effecting each skill, save profiencey, etc. This will then be added into each skill.
const characterStatBonuses = {
None: {
},
skills: {
Acrobatics: { bonuses: [] },
AnimalHandling: { bonuses: [] },
Arcana: { bonuses: [] },
Athletics: { bonuses: [] },
Deception: { bonuses: [] },
History: { bonuses: [] },
Initiative: { bonuses: [] },
Insight: { bonuses: [] },
Intimidation: { bonuses: [] },
Investigation: { bonuses: [] },
Medicine: { bonuses: [] },
Nature: { bonuses: [] },
Perception: { bonuses: [] },
Performance: { bonuses: [] },
Persuasion: { bonuses: [] },
Religion: { bonuses: [] },
SleightOfHand: { bonuses: [] },
Stealth: { bonuses: [] },
Survival: { bonuses: [] },
All: { bonuses: [] },
},
saves: {
STR: { bonuses: [] },
DEX: { bonuses: [] },
CON: { bonuses: [] },
INT: { bonuses: [] },
WIS: { bonuses: [] },
CHA: { bonuses: [] },
All: { bonuses: [] },
},
attributes: {
STR: { bonuses: [] },
DEX: { bonuses: [] },
CON: { bonuses: [] },
INT: { bonuses: [] },
WIS: { bonuses: [] },
CHA: { bonuses: [] },
All: { bonuses: [] },
},
combatStats: {
AC: { bonuses: [] },
// toHitBonus: { bonuses: [] },
// damageBonus: { bonuses: [] },
// AttackandDamage: { bonuses: [] },
// MeleeAttackRolls: { bonuses: [] },
// MeleeDamageRolls: { bonuses: [] },
RangedAttackRolls: { bonuses: [] },
RageDamageBonus: { bonuses: [] },
RangedDamageRolls: { bonuses: [] },
// SpellDamageRolls: { bonuses: [] },
EldritchBlastDamage: { bonuses: [] },
SpellSaveDC: { bonuses: [] },
SpellAttackModifier: { bonuses: [] },
SpellAttackandSave: { bonuses: [] },
HitPoints: { bonuses: [] },
// Speed: { bonuses: [] },
CarryWeightBonus:{ bonuses: [] },
BrutalCritical:{ bonuses: [] },
CriticalThreashold:{ bonuses: [] },
},
senses: {
PassivePerception: { bonuses: [] },
PassiveInsight: { bonuses: [] },
PassiveInvestigation: { bonuses: [] },
// Darkvision: { bonuses: [] },
// Tremorsense: { bonuses: [] },
// Blindsight: { bonuses: [] },
// Truesight: { bonuses: [] },
}
};
const damageTypes = [
"N/A",
"Slashing",
"Piercing",
"Bludgeoning",
"Fire",
"Cold",
"Lightning",
"Thunder",
"Acid",
"Poison",
"Psychic",
"Radiant",
"Necrotic",
"Force",
"Healing"
];
const resistanceTypes = [
"Slashing",
"Piercing",
"Bludgeoning",
"Fire",
"Cold",
"Lightning",
"Thunder",
"Acid",
"Poison",
"Psychic",
"Radiant",
"Necrotic",
"Force",
"Non-magical damage",
"Silvered weapons",
"Magical weapons",
"Bludgeoning (Non-magical)",
"Slashing (Non-magical)",
"Piercing (Non-magical)",
];
const conditionTypes = [
"Blinded",
"Charmed",
"Deafened",
"Frightened",
"Grappled",
"Incapacitated",
"Invisible",
"Paralyzed",
"Petrified",
"Poisoned",
"Prone",
"Restrained",
"Stunned",
"Unconscious",
"Exhaustion"
];
// Define the global variable with conditions and their descriptions
const CONDITIONS = [
{
condition: "Blinded",
description: [
"A blinded creature can't see and automatically fails any ability check that requires sight.",
"<br>Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage."
]
},
{
condition: "Charmed",
description: [
"A charmed creature can't attack the charmer or target the charmer with harmful abilities or magical effects.",
"The charmer has advantage on any ability check to interact socially with the creature."
]
},
{
condition: "Deafened",
description: [
"A deafened creature can't hear and automatically fails any ability check that requires hearing."
]
},
{
condition: "Exhaustion",
description: [
"Level 1: Disadvantage on ability checks",
"<br>Level 2: Speed halved",
"<br>Level 3: Disadvantage on attack rolls and saving throws",
"<br>Level 4: Hit point maximum halved",
"<br>Level 5: Speed reduced to 0",
"<br>Level 6: Death"
]
},
{
condition: "Frightened",
description: [
"A frightened creature has disadvantage on ability checks and attack rolls while the source of its fear is within line of sight.",
"<br>The creature can't willingly move closer to the source of its fear."
]
},
{
condition: "Grappled",
description: [
"A grappled creature's speed becomes 0, and it can't benefit from any bonus to its speed.",
"<br>The condition ends if the grappler is incapacitated (see the condition).",
"<br>The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell."
]
},
{
condition: "Incapacitated",
description: [
"An incapacitated creature can't take actions or reactions."
]
},
{
condition: "Paralyzed",
description: [
"A paralyzed creature is incapacitated (see the condition) and can't move or speak.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>Attack rolls against the creature have advantage.",
"<br>Any attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature."
]
},
{
condition: "Petrified",
description: [
"A petrified creature is transformed, along with any nonmagical object it is wearing or carrying, into a solid inanimate substance (usually stone). Its weight increases by a factor of ten, and it ceases aging.",
"<br>The creature is incapacitated (see the condition), can't move or speak, and is unaware of its surroundings.",
"<br>Attack rolls against the creature have advantage.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>The creature has resistance to all damage.",
"<br>The creature is immune to poison and disease, although a poison or disease already in its system is suspended, not neutralized."
]
},
{
condition: "Poisoned",
description: [
"A poisoned creature has disadvantage on attack rolls and ability checks."
]
},
{
condition: "Prone",
description: [
"A prone creature's only movement option is to crawl, unless it stands up and thereby ends the condition.",
"<br>The creature has disadvantage on attack rolls.",
"<br>An attack roll against the creature has advantage if the attacker is within 5 feet of the creature. Otherwise, the attack roll has disadvantage."
]
},
{
condition: "Restrained",
description: [
"A restrained creature's speed becomes 0, and it can't benefit from any bonus to its speed.",
"<br>Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage.",
"<br>The creature has disadvantage on Dexterity saving throws."
]
},
{
condition: "Stunned",
description: [
"A stunned creature is incapacitated (see the condition), can't move, and can speak only falteringly.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>Attack rolls against the creature have advantage."
]
},
{
condition: "Unconscious",
description: [
"An unconscious creature is incapacitated, can't move or speak, and is unaware of its surroundings.",
"<br>The creature drops whatever it's holding and falls prone.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>Attack rolls against the creature have advantage.",
"<br>Any attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature."
]
}
];
const EFFECTS = [
{
effect: "Aid",
description: [
"The creature gains 5 Max hp per level of aid they have."
]
},
{
effect: "Bane",
description: [
"The creature must subtract a d4 from attack rolls or saving throws while the effect lasts."
]
},
{
effect: "Bless",
description: [
"The creature can add a d4 to attack rolls or saving throws while the effect lasts."
]
},
{
effect: "Bloodied",
description: [
"The creature's hit points are at or below half its maximum hit points."
]
},
{
effect: "Concentration",
description: [
"The creature is concentrating on a spell. Concentration is broken if the creature takes damage and fails a Constitution saving throw."
]
},
{
effect: "Curse",
description: [
"The curse applies a specific penalty, such as reduced hit points, disadvantage on certain rolls, or inability to regain hit points."
]
},
{
effect: "Drained",
description: [
"The creature's maximum hit points are reduced until it finishes a long rest."
]
},
{
effect: "Haste",
description: [
"The creature's speed is doubled.",
"It gains a +2 bonus to AC.",
"It has advantage on Dexterity saving throws.",
"It gains an additional action each turn (limited to certain actions)."
]
},
{
effect: "Heroism",
description: [
"The creature gains temporary hit points at the start of each turn while the effect lasts.",
"It is immune to being frightened."
]
},
{
effect: "Hex",
description: [
"The creature has disadvantage on ability checks of a chosen ability.",
"It takes extra necrotic damage from attacks by the caster."
]
},
{
effect: "Inspire",
description: [
"The creature can add a Bardic Inspiration die to an ability check, attack roll, or saving throw."
]
},
{
effect: "Invisible",
description: [
"The creature can't be seen without magical aid or special senses.",
"Attack rolls against the creature have disadvantage, and the creature's attack rolls have advantage."
]
},
{
effect: "Raging",
description: [
"The creature gains advantage on Strength checks and saving throws.",
"The creature's melee weapon attacks deal bonus damage based on level.",
"The creature has resistance to bludgeoning, piercing, and slashing damage."
]
},
{
effect: "Recharging",
"description": [
"This monster's ability recharges after use. At the end of its turns, roll a d6.",
"<br>If the result is within the recharge range specified in the ability (e.g., 5–6), the ability becomes available to use again.",
"<br>Otherwise, it remains unavailable until the next successful recharge roll."
]
},
{
effect: "Sanctuary",
description: [
"Creatures attempting to attack the protected creature must make a Wisdom saving throw or choose a new target."
]
},
{
effect: "Shield",
description: [
"The creature gains a temporary increase to its AC (e.g., Shield spell adds +5 to AC until the start of the next turn)."
]
},
{
effect: "Slow",
description: [
"The creature's speed is halved.",
"It takes a -2 penalty to AC and Dexterity saving throws.",
"It can't use reactions, and it can take only one action or bonus action on its turn."
]
}
];
let savedLanguage = 'eng';
//This is the translation library that changes the textcontent of the id listed as a key below.
//It looks through the active DOM elements and switchs textcontent to the language based on what the user has selcted.
const translations = {
eng: {
//Spell Section
spellModLabel: "Spell Mod:",
spellModSTR: "STR",
spellModDEX: "DEX",
spellModCON: "CON",
spellModINT: "INT",
spellModWIS: "WIS",
spellModCHA: "CHA",
toHitLabel: "To Hit:",
saveDcLabel: "Save DC:",
spellLevelLabel: "Spell Level",
bonusLabel: "Bonus",
cantripsLabel: "Cantrips",
level1Label: "Level 1",
level2Label: "Level 2",
level3Label: "Level 3",
level4Label: "Level 4",
level5Label: "Level 5",
level6Label: "Level 6",
level7Label: "Level 7",
level8Label: "Level 8",
level9Label: "Level 9",
CantripSpellNameHeader: "Spell Name",
CantripTimeHeader: "Time",
CantripHitDCHeader: "Hit/DC",
CantripDiceHeader: "Dice",
CantripConcentrationHeader: "Con",
CantripNotesHeader: "Notes",
CantripDeleteHeader: "Del",
//Header
inspiration: "Inspiration",
shortRestButton: "Short Rest",
longRestButton: "Long Rest",
deleteCharacter: "Delete a Character",
customSpells: "Create Spell",
'get-selection-button': "Link mini",
disadvButton: "DisAdv",
normalButton: "Flat",
advButton: "Adv",
characterInit: "Init",
armorClass: "AC",
walkingSpeed: "Speed",
prof: "Prof",
levelTextSpan: "Level",
deathSaves: "Death Saves",
deathSavesSuccess: "Success :",
deathSavesFailures: "Failure :",
healButton: "Heal",
damageButton: "Damage",
currentHP: "Current",
maxHP: "Max",
hpButtomText: "Player Hit Points",
tempHPText: "Temp Health",
//This all needs to be moved to the approriate grouping. Together for translating.
playerStatsHeader: "Player Stats",
actionsHeader: "Actions",
spellListHeader: "Spell List",
inventoryHeader: "Inventory",
featuresHeader: "Features & Traits",
docsHeader: "Notes",
extrasHeader: "Extra",
initHeader: "Init List",
addItemModalHeader: "Add New Inventory Item",
addItemModalBagSelect: "Select Bag:",
addItemModalEquipment: "Equipment",
addItemModalBackpack: "Backpack",
addItemModalOtherPossessions: "Other Possessions",
addItemModalDropdownText: "Select Item:",
'confirm-add-item': "Add Item",
'close-modal': "Cancel",
spellScrollText: "Spell Scroll",
conditionPlayerAddButton: "Add Condition",
hitDiceOpenModalButton: "Hit Dice",
longRestHeader: "Long Rest Summary",
shortRestHeader: "Short Rest Summary",
longRestHPChangeTrans: "HP Restored:",
longRestTempHPChangeTrans: "Removing Temp HP:",
longRestSpellSlotsTrans: "slots reset",
longRestSpellSlotDefaultText: "No used spell slots to reset.",
longRestHitDiceTrans: "Adding up to:",
longRestHitDice01: "Hit Dice",
longRestFeatures: "Traits to reset:",
traitDescriptionTexts0: "reseting up to",
traitDescriptionTexts1: "uses",
confirmLongRestButton: "Confirm",
cancelLongRestButton: "Cancel",
hitDiceModalHeader: "Spend Hit Dice",
hitDiceModalText: "Current Hit Dice Available:",
featuresAddGroupButton:"+ Add New Group",
featuresAddTraitButton: "+ Add New Trait",
featuresUsesText: "Uses",
featuresCategoryText: "Category",
featuresSubcategoryText: "Subcategory",
featuresAbilityScoreText: "Ability Score to use for adjustment value",
featuresAdjustmentText: "Adjustment Value:",
featuresNumberUsesText: "Number of Uses:",
featuresResetText: "Reset On:",
featuresDeleteButton: "Delete Trait",
docsSectionHeader: "Character Notes",
docsSectionGroupButton: "+ Add Group",
docsSectionNoteButton: "+ Add Note",
characterAbilityScores: {
str: "Strength (STR)",
dex: "Dexterity (DEX)",
con: "Constution (CON)",
int: "Intelligence (INT)",
wis: "Wisdom (WIS)",
cha: "Charisma (CHA)"
},
damageTypesTranslate: {
na: "N/A",
slashing: "Slashing",
piercing: "Piercing",
bludgeoning: "Bludgeoning",
fire: "Fire",
cold: "Cold",
lightning: "Lightning",
thunder: "Thunder",
acid: "Acid",
poison: "Poison",
psychic: "Psychic",
radiant: "Radiant",
necrotic: "Necrotic",
force: "Force",
healing: "Healing"
},
resistanceTypesTranslate: {
slashing: "Slashing",
piercing: "Piercing",
bludgeoning: "Bludgeoning",
fire: "Fire",
cold: "Cold",
lightning: "Lightning",
thunder: "Thunder",
acid: "Acid",
poison: "Poison",
psychic: "Psychic",
radiant: "Radiant",
necrotic: "Necrotic",
force: "Force",
non_magical_damage: "Non-magical damage",
silvered_weapons: "Silvered weapons",
magical_weapons: "Magical weapons",
bludgeoning_non_magical: "Bludgeoning (Non-magical)",
slashing_non_magical: "Slashing (Non-magical)",
piercing_non_magical: "Piercing (Non-magical)"
},
conditionTypesTranslated: {
blinded: "Blinded",
charmed: "Charmed",
deafened: "Deafened",
frightened: "Frightened",
grappled: "Grappled",
incapacitated: "Incapacitated",
invisible: "Invisible",
paralyzed: "Paralyzed",
petrified: "Petrified",
poisoned: "Poisoned",
prone: "Prone",
restrained: "Restrained",
stunned: "Stunned",
unconscious: "Unconscious",
exhaustion: "Exhaustion"
},
conditions: {
blinded: {
name: "Blinded",
description: [
"A blinded creature can't see and automatically fails any ability check that requires sight.",
"<br>Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage."
]
},
charmed: {
name: "Charmed",
description: [
"A charmed creature can't attack the charmer or target the charmer with harmful abilities or magical effects.",
"The charmer has advantage on any ability check to interact socially with the creature."
]
},
deafened: {
name: "Deafened",
description: [
"A deafened creature can't hear and automatically fails any ability check that requires hearing."
]
},
exhaustion: {
name: "Exhaustion",
description: [
"Level 1: Disadvantage on ability checks",
"<br>Level 2: Speed halved",
"<br>Level 3: Disadvantage on attack rolls and saving throws",
"<br>Level 4: Hit point maximum halved",
"<br>Level 5: Speed reduced to 0",
"<br>Level 6: Death"
]
},
frightened: {
name: "Frightened",
description: [
"A frightened creature has disadvantage on ability checks and attack rolls while the source of its fear is within line of sight.",
"<br>The creature can't willingly move closer to the source of its fear."
]
},
grappled: {
name: "Grappled",
description: [
"A grappled creature's speed becomes 0, and it can't benefit from any bonus to its speed.",
"<br>The condition ends if the grappler is incapacitated (see the condition).",
"<br>The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell."
]
},
incapacitated: {
name: "Incapacitated",
description: [
"An incapacitated creature can't take actions or reactions."
]
},
paralyzed: {
name: "Paralyzed",
description: [
"A paralyzed creature is incapacitated (see the condition) and can't move or speak.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>Attack rolls against the creature have advantage.",
"<br>Any attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature."
]
},
petrified: {
name: "Petrified",
description: [
"A petrified creature is transformed, along with any nonmagical object it is wearing or carrying, into a solid inanimate substance (usually stone). Its weight increases by a factor of ten, and it ceases aging.",
"<br>The creature is incapacitated (see the condition), can't move or speak, and is unaware of its surroundings.",
"<br>Attack rolls against the creature have advantage.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>The creature has resistance to all damage.",
"<br>The creature is immune to poison and disease, although a poison or disease already in its system is suspended, not neutralized."
]
},
poisoned: {
name: "Poisoned",
description: [
"A poisoned creature has disadvantage on attack rolls and ability checks."
]
},
prone: {
name: "Prone",
description: [
"A prone creature's only movement option is to crawl, unless it stands up and thereby ends the condition.",
"<br>The creature has disadvantage on attack rolls.",
"<br>An attack roll against the creature has advantage if the attacker is within 5 feet of the creature. Otherwise, the attack roll has disadvantage."
]
},
restrained: {
name: "Restrained",
description: [
"A restrained creature's speed becomes 0, and it can't benefit from any bonus to its speed.",
"<br>Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage.",
"<br>The creature has disadvantage on Dexterity saving throws."
]
},
stunned: {
name: "Stunned",
description: [
"A stunned creature is incapacitated (see the condition), can't move, and can speak only falteringly.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>Attack rolls against the creature have advantage."
]
},
unconscious: {
name: "Unconscious",
description: [
"An unconscious creature is incapacitated, can't move or speak, and is unaware of its surroundings.",
"<br>The creature drops whatever it's holding and falls prone.",
"<br>The creature automatically fails Strength and Dexterity saving throws.",
"<br>Attack rolls against the creature have advantage.",
"<br>Any attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature."
]
},
// ... all conditions
},
effects: {
aid: {
name: "Aid",
description: [
"The creature gains 5 Max hp per level of aid they have."
]
},
bane: {
name: "Bane",
description: [
"The creature must subtract a d4 from attack rolls or saving throws while the effect lasts."
]
},
bless: {
name: "Bless",
description: [
"The creature can add a d4 to attack rolls or saving throws while the effect lasts."
]
},
bloodied: {
name: "Bloodied",
description: [
"The creature's hit points are at or below half its maximum hit points."
]
},
concentration: {
name: "Concentration",
description: [
"The creature is concentrating on a spell. Concentration is broken if the creature takes damage and fails a Constitution saving throw."
]
},
curse: {
name: "Curse",
description: [
"The curse applies a specific penalty, such as reduced hit points, disadvantage on certain rolls, or inability to regain hit points."
]
},
drained: {
name: "Drained",
description: [
"The creature's maximum hit points are reduced until it finishes a long rest."
]
},
haste: {
name: "Haste",
description: [
"The creature's speed is doubled.",
"It gains a +2 bonus to AC.",
"It has advantage on Dexterity saving throws.",
"It gains an additional action each turn (limited to certain actions)."
]
},
heroism: {
name: "Heroism",
description: [
"The creature gains temporary hit points at the start of each turn while the effect lasts.",
"It is immune to being frightened."
]
},
hex: {
name: "Hex",
description: [
"The creature has disadvantage on ability checks of a chosen ability.",
"It takes extra necrotic damage from attacks by the caster."
]
},
inspire: {
name: "Inspire",
description: [
"The creature can add a Bardic Inspiration die to an ability check, attack roll, or saving throw."
]
},
invisible: {
name: "Invisible",
description: [
"The creature can't be seen without magical aid or special senses.",
"Attack rolls against the creature have disadvantage, and the creature's attack rolls have advantage."
]
},
raging: {
name: "Raging",
description: [
"The creature gains advantage on Strength checks and saving throws.",
"The creature's melee weapon attacks deal bonus damage based on level.",
"The creature has resistance to bludgeoning, piercing, and slashing damage."
]
},
recharging: {
name: "Recharging",
description: [
"This monster's ability recharges after use. At the end of its turns, roll a d6.",
"<br>If the result is within the recharge range specified in the ability (e.g., 5–6), the ability becomes available to use again.",
"<br>Otherwise, it remains unavailable until the next successful recharge roll."
]
},
sanctuary: {
name: "Sanctuary",
description: [
"Creatures attempting to attack the protected creature must make a Wisdom saving throw or choose a new target."
]
},
shield: {
name: "Shield",
description: [
"The creature gains a temporary increase to its AC (e.g., Shield spell adds +5 to AC until the start of the next turn)."
]
},
slow: {
name: "Slow",
description: [
"The creature's speed is halved.",
"It takes a -2 penalty to AC and Dexterity saving throws.",
"It can't use reactions, and it can take only one action or bonus action on its turn."
]
}
},
schools: {
abjuration: {
name: "Abjuration",
description: ["The School of Abjuration emphasizes magic that blocks, banishes, or protects."]
},
conjuration: {
name: "Conjuration",
description: ["The School of Conjuration deals with creating objects and creatures, or making them disappear."]
},
divination: {
name: "Divination",
description: ["The magical School of Divination is centered around revealing and granting knowledge and information to the caster. Useful for reading ancient scripts, identifying magical items, and seeing invisible enemies."]
},
enchantment: {
name: "Enchantment",
description: ["Spells within the School of Enchantment are designed to manipulate the mental state of the target. This entire school is very similar to hypnotism, where the affected creature may act completely differently than how they normally behave."]
},
evocation: {
name: "Evocation" ,
description: ["Casters within the school of evocation unleash a raw magical energy upon their enemies. Whether it be flames, ice, or pure arcane energy."]
},
illusion: {
name: "Illusion" ,
description: ["The School of Illusion is concerned with manipulating the various senses of people and creatures. This could be vision, hearing, or other various senses such as body temperature."]
},
necromancy: {
name: "Necromancy",
description:[
"In general, think of spells within the School of Necromancy as manipulating the ebb and flow of different creatures life energy, or the balance of energy between life and death. This can come across in the form of helping resurrection, or draining necrotic damage."]
},
transmutation: {
name: "Transmutation",
description: ["Casters who study within the School of Transmutation are able to manipulate the physical properties of both items and people. This could be something simple such as turning copper into gold or could be an advanced spell that turns you into a newt"]
}
},
travel: {
fast: {
name: "Fast",
description: ["Per Minute - 400 feet","Per Hour - 4 miles","Per Day - 30 miles", " Effect - -5 penalty to passive Wisdom (Perception) scores"]
},
normal: {
name: "Normal",
description: ["Per Minute - 300 feet","Per Hour - 3 miles","Per Day - 24 miles"," Effect-"]
},
slow: {
name: "Slow",
description: ["Per Minute - 200 feet","Per Hour - 2 miles","Per Day - 18 miles"," Effect - Able to use stealth"]
},
},
travelCosts: {
airship: {
name: "Airship",
description: ["Cost - 1 gp Per Mile","Speed - 20mph"]
},
galleon: {
name: "Galleon",
description: ["Cost - 5 sp Per Mile","Speed - 10mph"]
},
coach: {
name: "Coach",
description: ["Cost - 2 sp Per Mile","Speed - 30mph"]
},
teleportationCircle: {
name: "Teleportation Circle",
description: ["Cost - 2,500 gp","Speed - Instant"]
},
},
//Player Stats Section
characterAbilityStr: "STR",
characterAbilityDex: "DEX",
characterAbilityCon: "CON",
characterAbilityInt: "INT",
characterAbilityWis: "WIS",
characterAbilityCha: "CHA",
acrobaticsMod: "DEX",
animalHandlingMod: "WIS",
arcanaMod: "INT",
athleticsMod: "STR",
deceptionMod: "CHA",
historyMod: "INT",
insightMod: "WIS",
intimidationMod: "CHA",
investigationMod: "INT",
medicineMod: "WIS",
natureMod: "INT",
perceptionMod: "WIS",
performanceMod: "CHA",
persuasionMod: "CHA",
religionMod: "INT",
sleightofHandMod: "DEX",
stealthMod: "DEX",
survivalMod: "WIS",
skillAcrobatics: "Acrobatics",
skillAnimalHandling: "Animal Handling",
skillArcana: "Arcana",
skillAthletics: "Athletics",
skillDeception: "Deception",
skillHistory: "History",
skillInsight: "Insight",
skillIntimidation: "Intimidation",
skillInvestigation: "Investigation",
skillMedicine: "Medicine",
skillNature: "Nature",
skillPerception: "Perception",
skillPerformance: "Performance",
skillPersuasion: "Persuasion",
skillReligion: "Religion",
skillSleightofHand: "Sleight of Hand",
skillStealth: "Stealth",
skillSurvival: "Survival",
strSave: "Str Save",
dexSave: "Dex Save",
conSave: "Con Save",
intSave: "Int Save",
wisSave: "Wis Save",
chaSave: "Cha Save",
passivePerceptionTitle: "Passive WIS (Perception)",
passiveInvestigationTitle: "Passive INT (Investigation)",
passiveInsightTitle: "Passive WIS (Insight)",
proficiencyGroupHeading: "Proficiencies",
proficiencyWeapons: "Weapons",
proficiencyArmor: "Armor",