forked from Mike-Risher/5e-DnD-Character-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
10808 lines (8951 loc) · 286 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
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
<html>
<head>
<title>Listo v1.03 - Quick Character Generator for 5th Edition D&D by Mike Risher</title>
<meta charset="UTF-8">
<meta name="author" content="Mike Risher">
<meta name="description" content="Listo is a 5th Edition D&D Character Generator for level 1-10 Characters created by Mike Risher. Listo version 1.03 was released in July, 2015.">
<meta name="keywords" content="listo, DnD, D&D, Dungeons and Dragons, Character Generator, Character Maker, 5e, 5th edition, random">
<link rel="icon" type="image/gif" href="http://i.imgur.com/6y35IBy.gif">
<style>
.complete {
/*
http://i.imgur.com/DnuoN8l.gif
*/
font: 12pt helvetica;
width: 100%;
}
.top {
font: 11pt helvetica;
width: 100%;
}
.alText {
font: 11pt helvetica;
float: right;
}
.detailed {
font: 12pt helvetica;
display: none;
}
.rawAbils {
font: 10pt helvetica;
padding-left: 5px;
}
.buyDropdowns {
display: none;
}
.classOptions {
display: none;
}
.armorhp {
float: right;
padding-right: 1em;
padding-bottom: 1em;
padding-top: 1em;
padding-bottom: .5em;
}
.info {
float: right;
padding-right: 1em;
}
.spells {
border-top: 1px solid;
width: 100%;
margin-top: .5em;
padding-top: .5em;
/* padding: .5em;
margin: .5em;
visibility: hidden; */
}
.bg {
font-weight: bold;
}
.main-area {
}
.side-area {
float: right;
width: 350px;
padding-bottom: .5em;
padding-left: .5em;
border-left: 1px solid;
border-bottom: 1px solid;
margin-left: .5em;
}
</style>
</head>
<body onload="checkRun()">
<div class="top">
<button id="reset" onclick="reset()">Reset</button>
<select id="selLevel">
<option value="1">1st level</option>
<option value="2">2nd level</option>
<option value="3">3rd level</option>
<option value="4">4th level</option>
<option value="5">5th level</option>
<option value="6">6th level</option>
<option value="7">7th level</option>
<option value="8">8th level</option>
<option value="9">9th level</option>
<option value="10">10th level</option>
<option value="21">Level 1-4</option>
<option value="22">Level 5-10</option>
<!-- <option value="23">Level 8-12<option>
<option value="24">Level 12-16</option>
<option value="25">Level 17-20</option>
<option value="11">11th level</option>
<option value="12">12th level</option>
<option value="13">13th level</option>
<option value="14">14th level</option>
<option value="15">15th level</option>
<option value="16">16th level</option>
<option value="17">17th level</option>
<option value="18">18th level</option>
<option value="19">19th level</option>
<option value="20">20th level</option>
-->
<option value="0">Level 1-10</option>
</select>
<select id="selGender"><option value="0">Any Gender</option>
<option value="1">Male</option>
<option value="2">Female</option>
</select>
<select id="selRace"><option value="0">Any Race</option>
<option value="21">Aarakocra</option>
<option value="1">Dragonborn</option>
<option value="11">Dwarf (Hill)</option>
<option value="12">Dwarf (Mountain)</option>
<option value="6">Elf (Drow)</option>
<option value="14">Elf (High)</option>
<option value="15">Elf (Wood)</option>
<option value="23">Genasi (Air)</option>
<option value="24">Genasi (Earth)</option>
<option value="25">Genasi (Fire)</option>
<option value="26">Genasi (Water)</option>
<option value="2">Gnome (Forest)</option>
<option value="7">Gnome (Rock)</option>
<option value="22">Gnome (Svirfneblin)</option>
<option value="27">Goliath</option>
<option value="3">Half-Elf</option>
<option value="4">Half-Orc</option>
<option value="17">Halfling (Lightfoot)</option>
<option value="16">Halfling (Stout)</option>
<option value="13">Human</option>
<option value="5">Tiefling</option>
</select>
<select id="selClass" onchange="selectClass()"><option value="0">Any Class</option>
<option value="1">Barbarian</option>
<option value="2">Bard</option>
<option value="3">Cleric</option>
<option value="4">Druid</option>
<option value="5">Fighter (Eldritch Knight)</option>
<option value="6">Fighter (High Dexterity)</option>
<option value="7">Fighter (High Strength)</option>
<option value="8">Monk</option>
<option value="9">Paladin</option>
<option value="10">Ranger</option>
<option value="11">Rogue (Thief or Assassin)</option>
<option value="12">Rogue (Arcane Trickster)</option>
<option value="13">Sorcerer</option>
<option value="14">Warlock</option>
<option value="15">Wizard</option>
</select>
<span id="clericOptions" class="classOptions">
<select id="selCleric"><option value="-1">Any Cleric Domain</option>
<option value="0">Knowledge</option>
<option value="1">Life</option>
<option value="2">Light</option>
<option value="3">Nature</option>
<option value="4">Tempest</option>
<option value="5">Trickery</option>
<option value="6">War</option>
<option value="7">Death</option>
</select>
</span>
<span id="wizardOptions" class="classOptions">
<select id="selWizard"><option value="-1">Any Wizard School</option>
<option value="0">Abjuration</option>
<option value="1">Conjuration</option>
<option value="2">Divination</option>
<option value="3">Enchantment</option>
<option value="4">Evocation</option>
<option value="5">Illusion</option>
<option value="6">Necromancy</option>
<option value="7">Transmutation</option>
</select>
</span>
<span id="druidOptions" class="classOptions">
<select id="selDruid"><option value="-1">Any Druid Circle</option>
<option value="0">Circle of the Moon</option>
<option value="1">Circle of Land - Arctic</option>
<option value="2">Circle of Land - Coast</option>
<option value="3">Circle of Land - Desert</option>
<option value="4">Circle of Land - Forest</option>
<option value="5">Circle of Land - Grassland</option>
<option value="6">Circle of Land - Mountain</option>
<option value="7">Circle of Land - Swamp</option>
<option value="8">Circle of Land - Underdark</option>
</select>
</span>
<span id="barbarianOptions" class="classOptions">
<select id="selBarbarian"><option value="-1">Any Barbarian Path</option>
<option value="0">Path of the Berserker</option>
<option value="1">Path of the Totem Warrior (any)</option>
<option value="2">Path of the Totem Warrior (Bear)</option>
<option value="3">Path of the Totem Warrior (Eagle)</option>
<option value="4">Path of the Totem Warrior (Wolf)</option>
</select>
</span>
<span id="bardOptions" class="classOptions">
<select id="selBard"><option value="-1">Any Bard College</option>
<option value="0">College of Lore</option>
<option value="1">College of Valor</option>
</select>
</span>
<span id="fighterOptions" class="classOptions">
<select id="selFighter"><option value="-1">Any Fighter Archetype</option>
<option value="0">Champion</option>
<option value="1">Battle Master</option>
</select>
</span>
<span id="monkOptions" class="classOptions">
<select id="selMonk"><option value="-1">Any Monastic Tradition</option>
<option value="0">Way of the Open Hand</option>
<option value="1">Way of Shadow</option>
<option value="2">Way of the Four Elements</option>
</select>
</span>
<span id="paladinOptions" class="classOptions">
<select id="selPaladin"><option value="-1">Any Sacred Oath</option>
<option value="0">Oath of Devotion</option>
<option value="1">Oath of the Ancients</option>
<option value="2">Oath of Vengeance</option>
</select>
</span>
<span id="rangerOptions" class="classOptions">
<select id="selRanger"><option value="-1">Any Ranger Archetype</option>
<option value="0">Hunter</option>
<option value="1">Beast Master</option>
</select>
</span>
<span id="rogueOptions" class="classOptions">
<select id="selRogue"><option value="-1">Any Rogue Archetype</option>
<option value="0">Thief</option>
<option value="1">Assassin</option>
</select>
</span>
<span id="sorcererOptions" class="classOptions">
<select id="selSorcerer"><option value="-1">Any Sorcerous Origin</option>
<option value="0">Draconic Bloodline</option>
<option value="1">Wild Magic</option>
</select>
</span>
<span id="warlockOptions" class="classOptions">
<select id="selWarlock"><option value="-1">Any Patron</option>
<option value="0">The Archfey</option>
<option value="1">The Fiend</option>
<option value="2">The Great Old One</option>
</select>
<select id="selWarlockPact"><option value="-1">Any Pact Boon</option>
<option value="0">Pact of the Chain</option>
<option value="1">Pact of the Blade</option>
<option value="2">Pact of the Tome</option>
</select>
</span>
<select id="selBg"><option value="0">Any Background</option>
<option value="1">Acolyte</option>
<option value="2">Charlatan</option>
<option value="3">Criminal</option>
<option value="4">Entertainer</option>
<option value="7">Folk Hero</option>
<option value="5">Guild Artisan</option>
<option value="6">Hermit</option>
<option value="8">Noble</option>
<option value="9">Outlander</option>
<option value="10">Sage</option>
<option value="11">Sailor</option>
<option value="12">Soldier</option>
<option value="13">Urchin</option>
</select>
<button id="go" onclick="checkRun()">Generate Character</button>
<a href="info.html" class="info" target="_new">Info</a>
</div>
<div>
<span style="font: 10pt helvetica;">
<select id="genMethod" onClick="switchBuy()">
<option value="0" selected="selected">Roll abilities</option>
<option value="1">Buy abilities (random)</option>
<option value="2">Buy abilities (manual)</option>
<option value="3">Buy abilities (detailed)</option>
</select>
<select id="selAbil">
<option value="0" selected="selected">Reroll if the total is under 65</option>
<option value="35">35</option>
<option value="40">40</option>
<option value="45">45</option>
<option value="50">50</option>
<option value="55">55</option>
<option value="60">60</option>
<option value="70">70</option>
<option value="75">75</option>
<option value="80">80</option>
<option value="85">85</option>
<option value="90">90</option>
<option value="95">95</option>
</select>
</span>
<span id="ro" class="rawAbils"></span>
<span id="buyDropdowns" class="buyDropdowns">
<span class="rawAbils">Abilities:</span>
<span class="detailed">STR</span>
<select id="a1" onchange="addAbils(false)">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<span class="detailed">DEX</span>
<select id="a2" onchange="addAbils(false)">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<span class="detailed">CON</span>
<select id="a3" onchange="addAbils(false)">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<span class="detailed">INT</span>
<select id="a4" onchange="addAbils(false)">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<span class="detailed">WIS</span>
<select id="a5" onchange="addAbils(false)">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<span class="detailed">CHA</span>
<select id="a6" onchange="addAbils(false)">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<span id="points" style="font: 10pt helvetica;"></span>
<button id="resetabil" onclick="resetAbil()">Reset Abilities</button>
</span>
<span class="alText"><input type="checkbox" id="al" onclick="aLeague()">Adventurer's League</span>
</div>
<hr>
<div class="complete">
<div class="main-area">
<div class="side-area">
<span id="bg"></span><br>
</div>
<span id="status">Loading...</span>
<div class="armorhp">
<span id="ar"></span>
</div>
<div style="weapons">
<b>Melee weapons:</b>
<br>
<span id="wp"></span>
</div>
<b>Proficient skills:</b> <span id="sk"></span><br>
<span id="ab"></span><br>
<b>Equipment:</b> <span id="eq"></span>
<div class="spells" id="spellspot"><span id="sp"></span></div>
</div>
</div>
<script language="javascript">
var firstAbil=true;
function checkRun() {
if (document.getElementById("al").checked == true) {
if (document.getElementById("genMethod").value == "0") {
alert("Sorry, but you cannot roll abilities for Adventurer's League characters!");
document.getElementById("genMethod").selectedIndex = "1";
document.getElementById("buyDropdowns").style.display="none";
document.getElementById("selAbil").style.display="none";
document.getElementById("ro").style.display="inline";
}
if (document.getElementById("selLevel").selectedIndex != 0) {
alert("Sorry, but your Adventurer's League character must start at 1st level!");
document.getElementById("selLevel").selectedIndex = "0";
}
if (document.getElementById("selRace").value == "21") {
alert("Sorry, but Aarakocra aren't allowed in Adventurer's League play.")
document.getElementById("selRace").selectedIndex = "0";
}
}
if (((document.getElementById("genMethod").value == "2") || (document.getElementById("genMethod").value == "3")) && (addAbils(true) == true)) {
run();
}
if ((document.getElementById("genMethod").value == "0") || (document.getElementById("genMethod").value == "1")) {
run();
}
}
function aLeague() {
if (document.getElementById("al").checked == true) {
document.getElementById("selLevel").selectedIndex = "0";
if (document.getElementById("genMethod").value == "0") {
document.getElementById("genMethod").selectedIndex = "2";
document.getElementById("buyDropdowns").style.display="inline";
document.getElementById("selAbil").style.display="none";
document.getElementById("ro").style.display="none";
}
if (firstAbil == true) {
setStandardArray();
firstAbil=false;
}
addAbils(false);
}
}
function switchBuy() {
if (document.getElementById("genMethod").value == "0") {
document.getElementById("buyDropdowns").style.display="none";
document.getElementById("selAbil").style.display="inline";
document.getElementById("ro").style.display="inline";
}
if (document.getElementById("genMethod").value == "2") {
document.getElementById("buyDropdowns").style.display="inline";
document.getElementById("selAbil").style.display="none";
document.getElementById("ro").style.display="none";
var x = document.getElementsByClassName("detailed");
for(i=0;i<x.length;i++) {
x[i].style.display="none";
}
//.style.display="inline";
if (firstAbil == true) {
setStandardArray();
firstAbil=false;
}
addAbils(false);
}
if (document.getElementById("genMethod").value == "3") {
document.getElementById("buyDropdowns").style.display="inline";
document.getElementById("selAbil").style.display="none";
document.getElementById("ro").style.display="none";
var x = document.getElementsByClassName("detailed");
for(i=0;i<x.length;i++) {
x[i].style.display="inline";
}
if (firstAbil == true) {
setStandardArray();
firstAbil=false;
}
addAbils(false);
}
if (document.getElementById("genMethod").value == "1") {
document.getElementById("buyDropdowns").style.display="none";
document.getElementById("selAbil").style.display="none";
document.getElementById("ro").style.display="inline";
}
}
function selectClass() {
if (document.getElementById("selClass").value == 1) {
clearClassOptions();
document.getElementById("barbarianOptions").style.display="inline";
document.getElementById("selBarbarian").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 2) {
clearClassOptions();
document.getElementById("bardOptions").style.display="inline";
document.getElementById("selBard").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 5) {
clearClassOptions();
} else if ((document.getElementById("selClass").value == 6) || (document.getElementById("selClass").value == 7)) {
clearClassOptions();
document.getElementById("fighterOptions").style.display="inline";
document.getElementById("selFighter").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 8) {
clearClassOptions();
document.getElementById("monkOptions").style.display="inline";
document.getElementById("selMonk").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 9) {
clearClassOptions();
document.getElementById("paladinOptions").style.display="inline";
document.getElementById("selPaladin").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 10) {
clearClassOptions();
document.getElementById("rangerOptions").style.display="inline";
document.getElementById("selRanger").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 11) {
clearClassOptions();
document.getElementById("rogueOptions").style.display="inline";
document.getElementById("selRogue").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 12) {
clearClassOptions();
} else if (document.getElementById("selClass").value == 13) {
clearClassOptions();
document.getElementById("sorcererOptions").style.display="inline";
document.getElementById("selSorcerer").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 14) {
clearClassOptions();
document.getElementById("warlockOptions").style.display="inline";
document.getElementById("selWarlock").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 3) {
clearClassOptions();
document.getElementById("clericOptions").style.display="inline";
document.getElementById("selCleric").selectedIndex = "initial";
} else if (document.getElementById("selClass").value == 4) {
clearClassOptions();
document.getElementById("druidOptions").style.display="inline";
document.getElementById("selDruid").selectedIndex = "initial";
}
else if (document.getElementById("selClass").value == 15) {
clearClassOptions();
document.getElementById("wizardOptions").style.display="inline";
document.getElementById("selWizard").selectedIndex = "initial";
}
}
// give it false if you don't want an alert. true if you want to shout at the user!
function addAbils(bool) {
var ptAbil = [];
ptAbil.unshift(document.getElementById("a1").value * 1);
ptAbil.unshift(document.getElementById("a2").value * 1);
ptAbil.unshift(document.getElementById("a3").value * 1);
ptAbil.unshift(document.getElementById("a4").value * 1);
ptAbil.unshift(document.getElementById("a5").value * 1);
ptAbil.unshift(document.getElementById("a6").value * 1);
y=0;
for (i=0;i<6;i++) {
x=0;
if (ptAbil[i] < 14)
x = ptAbil[i] - 8;
else if (ptAbil[i] == 14)
x=7;
else if (ptAbil[i] == 15)
x=9;
y += x;
}
var ptOutput = 27 - y + " points";
document.getElementById("points").innerHTML = ptOutput;
if (y > 27) {
if (bool==true) {
alert("You cannot afford those abilities.");
}
document.getElementById("points").style.color = "red";
return false;
} else {
document.getElementById("points").style.color = "initial";
return true;
}
}
function clearClassOptions() {
document.getElementById("wizardOptions").style.display="none";
document.getElementById("druidOptions").style.display="none";
document.getElementById("clericOptions").style.display="none";
document.getElementById("fighterOptions").style.display="none";
document.getElementById("rangerOptions").style.display="none";
document.getElementById("bardOptions").style.display="none";
document.getElementById("barbarianOptions").style.display="none";
document.getElementById("rogueOptions").style.display="none";
document.getElementById("sorcererOptions").style.display="none";
document.getElementById("warlockOptions").style.display="none";
document.getElementById("monkOptions").style.display="none";
document.getElementById("paladinOptions").style.display="none";
}
function reset() {
document.getElementById("selLevel").selectedIndex = "0";
document.getElementById("selClass").selectedIndex = "0";
document.getElementById("selRace").selectedIndex = "0";
document.getElementById("selBg").selectedIndex = "0";
document.getElementById("selAbil").selectedIndex = "0";
document.getElementById("selGender").selectedIndex = "0";
clearClassOptions();
}
function resetAbil() {
document.getElementById("a1").selectedIndex = "0";
document.getElementById("a2").selectedIndex = "0";
document.getElementById("a3").selectedIndex = "0";
document.getElementById("a4").selectedIndex = "0";
document.getElementById("a5").selectedIndex = "0";
document.getElementById("a6").selectedIndex = "0";
addAbils(false);
}
function setStandardArray() {
document.getElementById("a1").selectedIndex = "7";
document.getElementById("a2").selectedIndex = "6";
document.getElementById("a3").selectedIndex = "5";
document.getElementById("a4").selectedIndex = "4";
document.getElementById("a5").selectedIndex = "2";
document.getElementById("a6").selectedIndex = "0";
addAbils(false);
}
function run() {
console.log("-------------------------starting--------------------------------");
if ((document.getElementById("genMethod").value == "2") || (document.getElementById("genMethod").value == "3")) {
document.getElementById("buyDropdowns").style.display="inline";
}
if (document.getElementById("genMethod").value == "3") {
var detailedStats = document.getElementsByClassName("detailed");
for(i=0;i<detailedStats.length;i++) {
detailedStats[i].style.display="inline";
}
}
if (document.getElementById("genMethod").value != "0") {
document.getElementById("selAbil").style.display="none";
}
if (document.getElementById("selClass").value == 15) {
document.getElementById("wizardOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 3) {
document.getElementById("clericOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 4) {
document.getElementById("druidOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 1) {
document.getElementById("barbarianOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 2) {
document.getElementById("bardOptions").style.display="inline";
}
if ((document.getElementById("selClass").value == 6) || (document.getElementById("selClass").value == 7)) {
document.getElementById("fighterOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 8) {
document.getElementById("monkOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 9) {
document.getElementById("paladinOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 10) {
document.getElementById("rangerOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 11) {
document.getElementById("rogueOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 13) {
document.getElementById("sorcererOptions").style.display="inline";
}
if (document.getElementById("selClass").value == 14) {
document.getElementById("warlockOptions").style.display="inline";
}
var al=false;
if (document.getElementById("al").checked == true)
al=true;
var gender=-1;
var forceGender =0;
forceGender = document.getElementById("selGender").value * 1;
var forceCl =0;
forceCl = document.getElementById("selClass").value * 1;
var forceRace =0;
forceRace = document.getElementById("selRace").value * 1;
var forceBg =0;
forceBg = document.getElementById("selBg").value * 1;
var forceAbil =0;
forceAbil = document.getElementById("selAbil").value * 1;
var forceDomain =0;
forceDomain = document.getElementById("selCleric").value * 1;
var forceSchool =0;
forceSchool = document.getElementById("selWizard").value * 1;
var forceCircle =0;
forceCircle = document.getElementById("selDruid").value * 1;
var forceBarb = document.getElementById("selBarbarian").value * 1;
var forceBard =document.getElementById("selBard").value * 1;
var forceFigh =document.getElementById("selFighter").value * 1;
var forceMonk =document.getElementById("selMonk").value * 1;
var forcePala =document.getElementById("selPaladin").value * 1;
var forceRang =document.getElementById("selRanger").value * 1;
var forceRogu =document.getElementById("selRogue").value * 1;
var forceSorc =document.getElementById("selSorcerer").value * 1;
var forceWarl =document.getElementById("selWarlock").value * 1;
var forceWarlPact =document.getElementById("selWarlockPact").value * 1;
var x = 0;
var y = 0;
var z = 0;
var xx =0;
var yy =0;
var i = 0;
var q = 0;
var whichMagic = -1;
var whichMagicArmor = -1;
var magicArrowPlus=0;
var magicArrows=0;
var magicArrowType="";
var magicArrowDisplay=false;
var rangedWeapons =[];
var mod = [0,0,0,0,0,0];
var abil = [0,0,0,0,0,0];
var abilNames = ["Strength","Dexterity","Constitution","Intelligence","Wisdom","Charisma"];
var firstIncrease = -1;
var output="";
var hp=0;
var initiative;
var ac=0;
var hd=0;
var gold=0;
var platinum=0;
var forceLvl =0;
forceLvl = document.getElementById("selLevel").value * 1;
var level = Math.floor((Math.random() * 10) + 1);
if (forceLvl > 0)
level =forceLvl;
if (forceLvl == 21)
level = Math.floor((Math.random() * 4) + 1);
if (forceLvl == 22)
level = Math.floor((Math.random() * 6) + 5);
if (forceLvl == 23)
level = Math.floor((Math.random() * 4) + 8);
if (forceLvl == 24)
level = Math.floor((Math.random() * 4) + 12);
if (forceLvl == 25)
level = Math.floor((Math.random() * 4) + 17);
var prof=2;
if (level > 4)
prof=3;
if (level > 8)
prof=4;
if (level > 12)
prof=5;
if (level > 16)
prof=6;
var languageOutput = "";
var moreLang=0;
// var skills =
var speed=0;
var size = "Medium";
var factions = ["Harpers","Order of the Gauntlet","Emerald Enclave","Lords' Alliance","Zhentarim"];
var myFaction = -1;
var lifestyles = ["Wretched","Squalid","Poor","Modest","Comfortable","Wealthy","Artistocratic"];
var myLifestyle = -1;
var skills = ["Acrobatics","Animal Handling","Arcana","Athletics","Deception","History","Insight","Intimidation","Investigation","Medicine","Nature","Perception","Perform","Persuasion","Religion","Sleight of Hand","Stealth","Survival"];
var patronSpells1=[];
var patronSpells2=[];
var patronSpells3=[];
var patronSpells4=[];
var patronSpells5=[];
var pa1 = ["Bless","Command","Compelled Duel","Cure Wounds","Detect Evil and Good","Detect Magic","Detect Poison and Disease","Divine Favor","Heroism","Protection from Evil and Good","Purify Food and Drink","Searing Smite","Shield of Faith","Thunderous Smite","Wrathful Smite"];
var pa2 = ["Aid","Branding Smite","Find Steed","Lesser Restoration","Locate Object","Magic Weapon","Protection from Poison","Zone of Truth"];
var pa3 = ["Aura of Vitality","Blinding Smite","Create Food and Water","Crusader's Mantle","Daylight","Dispel Magic","Elemental Weapon"];
var ra1 = ["Absorb Elements","Beast Bond","Alarm","Animal Friendship","Cure Wounds","Detect Magic","Detect Poison and Disease","Ensnaring Strike","Fog Cloud","Goodberry","Hail of Thorns","Hunter's Mark","Jump","Longstrider","Speak with Animals"];
//var ra1 = ["Alarm","Animal Friendship","Cure Wounds","Detect Magic","Detect Poison and Disease","Ensnaring Strike","Fog Cloud","Goodberry","Hail of Thorns","Hunter's Mark","Jump","Longstrider","Speak with Animals"];
var ra2 = ["Animal Messenger","Barkskin","Beast Sense","Cordon of Arrows","Darkvision","Find Traps","Lesser Restoration","Locate Animals or Plants","Locate Object","Pass without Trace","Protection from Poison","Silence","Spike Growth"];
var ra3 = ["Flame Arrows","Conjure Animals","Conjure Barrage","Daylight","Lightning Arrow","Nondetection","Plant Growth","Protection from Energy","Speak with Plants","Water Breathing","Water Walk","Wind Wall"];
//var ra3 = ["Conjure Animals","Conjure Barrage","Daylight","Lightning Arrow","Nondetection","Plant Growth","Protection from Energy","Speak with Plants","Water Breathing","Water Walk","Wind Wall"];
var clCantrip = ["Guidance","Light","Mending","Resistance","Sacred Flame","Spare the Dying","Thaumaturgy"];
var cl1 = ["Bane","Bless","Command","Create or Destroy Water","Cure Wounds","Detect Evil and Good","Detect Magic","Detect Poison and Disease","Guiding Bolt","Healing Word","Inflict Wounds","Protection from Evil and Good","Purify Food and Drink","Sanctuary","Shield of Faith"];
var cl2 = ["Aid","Augury","Blindness/Deafness","Calm Emotions","Continual Flame","Enhance Ability","Find Traps","Gentle Repose","Hold Person","Lesser Restoration","Locate Object","Prayer of Healing","Protection from Poison","Silence","Spiritual Weapon","Warding Bond","Zone of Truth"];
//var baCantrip = ["Blade Ward","Dancing Lights","Friends","Light","Mage Hand","Mending","Message","Minor Illusion","Prestidigitation","True Strike","Vicious Mockery"];
var cl3 = ["Animate Dead","Beacon of Hope","Bestow Curse","Clairvoyance","Create Food and Water","Daylight","Dispel Magic","Feign Death","Glyph of Warding","Magic Circle","Mass Healing Word","Meld into Stone","Protection from Energy","Remove Curse","Revivify","Sending","Speak with Dead","Spirit Guardians","Tongues","Water Walk"];
var cl4 = ["Banishment","Control Water","Death Ward","Divination","Freedom of Movement","Guardian of Faith","Locate Creature","Stone Shape"];
var cl5 = ["Commune","Contagion","Dispel Evil and Good","Flame Strike","Geas","Greater Restoration","Hallow","Insect Plague","Legend Lore","Mass Cure Wounds","Planar Binding","Raise Dead","Scrying"];
var baCantrip = ["Blade Ward","Dancing Lights","Friends","Light","Mage Hand","Mending","Message","Minor Illusion","Prestidigitation","Thunderclap","True Strike","Vicious Mockery"];
var ba1 = ["Animal Friendship","Bane","Charm Person","Comprehend Languages","Cure Wounds","Detect Magic","Disguise Self","Dissonant Whispers","Earth Tremor","Faerie Fire","Feather Fall","Healing Word","Heroism","Identify","Illusory Script","Longstrider","Silent Image","Sleep","Speak with Animals","Tasha's Hideous Laughter","Thunderwave","Unseen Servant"];
var ba2 = ["Animal Messenger","Blindness/Deafness","Calm Emotions","Cloud of Daggers","Crown of Madness","Detect Thoughts","Enhance Ability","Enthrall","Heat Metal","Hold Person","Invisibility","Knock","Lesser Restoration","Locate Animals or Plants","Locate Object","Magic Mouth","Phantasmal Force","Pyrotechnics","See Invisibility","Shatter","Silence","Skywrite","Suggestion","Warding Wind","Zone of Truth"];
var ba3 = ["Bestow Curse","Clairvoyance","Dispel Magic","Fear","Feign Death","Glyph of Warding","Hypnotic Pattern","Leomund’s Tiny Hut","Major Image","Nondetection","Plant Growth","Sending","Speak with Dead","Speak with Plants","Stinking Cloud","Tongues"];
//var ba1 = ["Animal Friendship","Bane","Charm Person","Comprehend Languages","Cure Wounds","Detect Magic","Disguise Self","Dissonant Whispers","Faerie Fire","Feather Fall","Healing Word","Heroism","Identify","Illusory Script","Longstrider","Silent Image","Sleep","Speak with Animals","Tasha's Hideous Laughter","Thunderwave","Unseen Servant"];
//var ba2 = ["Animal Messenger","Blindness/Deafness","Calm Emotions","Cloud of Daggers","Crown of Madness","Detect Thoughts","Enhance Ability","Enthrall","Heat Metal","Hold Person","Invisibility","Knock","Lesser Restoration","Locate Animals or Plants","Locate Object","Magic Mouth","Phantasmal Force","See Invisibility","Shatter","Silence","Suggestion","Zone of Truth"];
var ba4 = ["Compulsion","Confusion","Dimension Door","Freedom of Movement","Greater Invisibility","Hallucinatory Terrain","Locate Creature","Polymorph"];
var ba5 = ["Animate Objects","Awaken","Dominate Person","Dream","Geas","Greater Restoration","Hold Monster","Legend Lore","Mass Cure Wounds","Mislead","Modify Memory","Planar Binding","Raise Dead","Scrying","Seeming","Teleportation Circle"];
var drCantrip = ["Create Bonfire","Control Flames","Druidcraft","Frostbite","Guidance","Gust","Magic Stone","Mending","Mold earth","Poison Spray","Produce Flame","Resistance","Shillelagh","Shape Water","Thorn Whip","Thunderclap"];
var dr1 = ["Absorb Elements","Beast Bond","Ice Knife","Earth Tremor","Animal Friendship","Charm Person","Create or Destroy Water","Cure Wounds","Detect Magic","Detect Poison and Disease","Entangle","Faerie Fire","Fog Cloud","Goodberry","Healing Word","Jump","Longstrider","Purify Food and Drink","Speak with Animals","Thunderwave"];
var dr2 = ["Dust Devil","Earthbind","Skywrite","Warding Wind","Animal Messenger","Barkskin","Beast Sense", "Darkvision", "Enhance Ability", "Find Traps", "Flame Blade", "Flaming Sphere", "Gust of Wind", "Heat Metal", "Hold Person","Lesser Restoration","Locate Object", "Moonbeam", "Pass without Trace", "Protection from Poison","Spike Growth"];
//var drCantrip = ["Druidcraft","Guidance","Mending","Poison Spray","Produce Flame","Resistance","Shillelagh","Thorn Whip"];
//var dr1 = ["Animal Friendship","Charm Person","Create or Destroy Water","Cure Wounds","Detect Magic","Detect Poison and Disease","Entangle","Faerie Fire","Fog Cloud","Goodberry","Healing Word","Jump","Longstrider","Purify Food and Drink","Speak with Animals","Thunderwave"];
//var dr2 = ["Animal Messenger","Barkskin","Beast Sense", "Darkvision", "Enhance Ability", "Find Traps", "Flame Blade", "Flaming Sphere", "Gust of Wind", "Heat Metal", "Hold Person","Lesser Restoration","Locate Object", "Moonbeam", "Pass without Trace", "Protection from Poison","Spike Growth"];
var dr3 = ["Erupting Earth","Flame Arrows","Tidal Wave","Wall of Water","Call Lightning","Conjure Animals","Daylight","Dispel Magic","Feign Death","Meld into Stone","Plant Growth","Protection from Energy","Sleet Storm","Speak with Plants","Water Breathing","Water Walk","Wind Wall"];
//var dr3 = ["Call Lightning","Conjure Animals","Daylight","Dispel Magic","Feign Death","Meld into Stone","Plant Growth","Protection from Energy","Sleet Storm","Speak with Plants","Water Breathing","Water Walk","Wind Wall"];
var dr4 = ["Elemental Bane","Watery Sphere","Blight","Confusion","Conjure Minor Elementals","Conjure Woodland Beings","Control Water","Dominate Beast","Freedom of Movement","Giant Insect","Grasping Vine","Hallucinatory Terrain","Ice Storm","Locate Creature","Polymorph","Stone Shape","Stoneskin","Wall of Fire"];
var dr5 = ["Control Winds","Maelstrom","Transmute Rock","Antilife Shell","Awaken","Commune with Nature","Conjure Elemental","Contagion","Geas","Greater Restoration","Insect Plague","Mass Cure Wounds","Planar Binding","Reincarnate","Scrying","Tree Stride","Wall of Stone"];
//var dr4 = ["Blight","Confusion","Conjure Minor Elementals","Conjure Woodland Beings","Control Water","Dominate Beast","Freedom of Movement","Giant Insect","Grasping Vine","Hallucinatory Terrain","Ice Storm","Locate Creature","Polymorph","Stone Shape","Stoneskin","Wall of Fire"];
//var dr5 = ["Antilife Shell","Awaken","Commune with Nature","Conjure Elemental","Contagion","Geas","Greater Restoration","Insect Plague","Mass Cure Wounds","Planar Binding","Reincarnate","Scrying","Tree Stride","Wall of Stone"];
var soCantrip = ["Create Bonfire","Control Flames","Frostbite","Gust","Mold Earth","Shape Water","Thunderclap","Acid Splash","Blade Ward","Chill Touch","Dancing Lights","Fire Bolt","Friends","Light","Mage Hand","Mending","Message","Minor Illusion","Poison Spray","Prestidigitation","Ray of Frost","Shocking Grasp","True Strike"];
var so1 = ["Catapult","Ice Knife","Earth Tremor","Burning Hands","Burning Hands","Charm Person","Chromatic Orb","Color Spray","Comprehend Languages","Detect Magic","Disguise Self","Expeditious Retreat","False Life","Feather Fall","Fog Cloud","Jump","Magic Missile","Magic Missile","Mage Armor","Ray of Sickness","Shield","Silent Image","Sleep","Thunderwave","Witch Bolt"];
var so2 = ["Aganazzar's Scorcher","Dust Devil","Earthbind","Maximilian's Earthen Grasp","Pyrotechnics","Snilloc's Snowball Swarm","Warding Wind","Alter Self","Blindness/Deafness","Blur","Cloud of Daggers","Crown of Madness","Darkness","Darkvision","Detect Thoughts","Enhance Ability","Enlarge/Reduce","Gust of Wind","Hold Person","Invisibility","Knock","Levitate","Mirror Image","Misty Step","Phantasmal Force","Scorching Ray","See Invisibility","Shatter","Spider Climb","Suggestion","Web"];
var so3 = ["Erupting Earth","Flame Arrows","Melf's Minute Meteors","Wall of Water","Blink","Clairvoyance","Counterspell","Daylight","Dispel Magic","Fear","Fireball","Fly","Gaseous Form","Haste","Hypnotic Pattern","Lightning Bolt","Major Image","Protection from Energy","Sleet Storm","Slow","Stinking Cloud","Tongues","Water Breathing","Water Walk"];
var so4 = ["Storm Sphere","Vitriolic Sphere","Watery Sphere","Banishment","Blight","Confusion","Dimension Door","Dominate Beast","Greater Invisibility","Ice Storm","Polymorph","Stoneskin","Wall of Fire"];
var so5 = ["Control Winds","Immolation","Animate Objects","Cloudkill","Cone of Cold","Creation","Dominate Person","Hold Monster","Insect Plague","Seeming","Telekinesis","Teleportation Circle","Wall of Stone"];
//var soCantrip = ["Acid Splash","Blade Ward","Chill Touch","Dancing Lights","Fire Bolt","Friends","Light","Mage Hand","Mending","Message","Minor Illusion","Poison Spray","Prestidigitation","Ray of Frost","Shocking Grasp","True Strike"];
//var so1 = ["Burning Hands","Burning Hands","Charm Person","Chromatic Orb","Color Spray","Comprehend Languages","Detect Magic","Disguise Self","Expeditious Retreat","False Life","Feather Fall","Fog Cloud","Jump","Magic Missile","Magic Missile","Mage Armor","Ray of Sickness","Shield","Silent Image","Sleep","Thunderwave","Witch Bolt"];
//var so2 = ["Alter Self","Blindness/Deafness","Blur","Cloud of Daggers","Crown of Madness","Darkness","Darkvision","Detect Thoughts","Enhance Ability","Enlarge/Reduce","Gust of Wind","Hold Person","Invisibility","Knock","Levitate","Mirror Image","Misty Step","Phantasmal Force","Scorching Ray","See Invisibility","Shatter","Spider Climb","Suggestion","Web"];
//var so3 = ["Blink","Clairvoyance","Counterspell","Daylight","Dispel Magic","Fear","Fireball","Fly","Gaseous Form","Haste","Hypnotic Pattern","Lightning Bolt","Major Image","Protection from Energy","Sleet Storm","Slow","Stinking Cloud","Tongues","Water Breathing","Water Walk"];
//var so4 = ["Banishment","Blight","Confusion","Dimension Door","Dominate Beast","Greater Invisibility","Ice Storm","Polymorph","Stoneskin","Wall of Fire"];
//var so5 = ["Animate Objects","Cloudkill","Cone of Cold","Creation","Dominate Person","Hold Monster","Insect Plague","Seeming","Telekinesis","Teleportation Circle","Wall of Stone"];
var waCantrip = ["Create Bonfire","Frostbite","Magic Stone","Thunderclap","Blade Ward","Chill Touch","Eldritch Blast","Friends","Mage Hand","Minor Illusion","Poison Spray","Prestidigitation","True Strike"];
//var waCantrip = ["Blade Ward","Chill Touch","Eldritch Blast","Friends","Mage Hand","Minor Illusion","Poison Spray","Prestidigitation","True Strike"];
var wa1 = ["Armor of Agathys","Arms of Hadar","Charm Person","Comprehend Languages","Expeditious Retreat","Hellish Rebuke","Hex","Illusory Script","Protection from Good and Evil","Unseen Servant","Witch Bolt"];
var wa2 = ["Earthbind","Cloud of Daggers","Crown of Madness","Darkness","Enthrall","Hold Person","Invisibility","Mirror Image","Misty Step","Ray of Enfeeblement","Shatter","Spider Climb","Suggestion"];
//var wa2 = ["Cloud of Daggers","Crown of Madness","Darkness","Enthrall","Hold Person","Invisibility","Mirror Image","Misty Step","Ray of Enfeeblement","Shatter","Spider Climb","Suggestion"];
var wa3 = ["Counterspell","Dispel Magic","Fear","Fly","Gaseous Form","Hunger of Hadar","Hypnotic Pattern","Magic Circle","Major Image","Remove Curse","Tongues","Vampiric Touch"];
var wa4 = ["Elemental Bane","Banishment","Blight","Dimension Door","Hallucinatory Terrain"];
//var wa4 = ["Banishment","Blight","Dimension Door","Hallucinatory Terrain"];
var wa5 = ["Contact Other Plane","Dream","Hold Monster","Scrying"];
var tomeRituals = ["Illusory Script","Identify","Identify","Identify","Find Familiar","Detect Disease and Poison","Detect Magic","Detect Magic","Detect Magic","Comprehend Languages","Unseen Servant","Tenser's Floating Disk","Speak with Animals","Speak with Animals","Purify Food and Drink","Alarm","Alarm"];
var wiCantrip = ["Create Bonfire","Control Flames","Frostbite","Gust","Mold Earth","Shape Water","Thunderclap","Acid Splash","Blade Ward","Chill Touch","Dancing Lights","Fire Bolt","Friends","Light","Mage Hand","Mending","Message","Minor Illusion","Poison Spray","Prestidigitation","Ray of Frost","Shocking Grasp","True Strike"];
//var wiCantrip = ["Acid Splash","Blade Ward","Chill Touch","Dancing Lights","Fire Bolt","Friends","Light","Mage Hand","Mending","Message","Minor Illusion","Poison Spray","Prestidigitation","Ray of Frost","Shocking Grasp","True Strike"];
//NOT ENOUGH FAMILIARS. therefore, 2 find familiar spells
var wi1 = ["Absorb Elements","Catapult","Ice Knife","Earth Tremor","Alarm","Burning Hands","Charm Person","Chromatic Orb","Color Spray","Comprehend Languages","Detect Magic","Disguise Self","Expeditious Retreat","False Life","Feather Fall","Find Familiar","Find Familiar","Fog Cloud","Grease","Identify","Illusory Script","Jump","Longstrider","Mage Armor","Magic Missile","Protection from Good and Evil","Ray of Sickness","Shield","Silent Image","Sleep","Tasha's Hideous Laughter","Tenser's Floating Disk","Thunderwave","Unseen Servant","Witch Bolt"];
var wi2 = ["Aganazzar's Scorcher","Dust Devil","Earthbind","Maximilian's Earthen Grap","Pyrotechnics","Skywrite","Snilloc's Snowball Swarm","Alter Self","Arcane Lock","Blindness/Deafness","Blur","Cloud of Daggers","Continual Flame","Crown of Madness","Darkness","Darkvision","Detect Thoughts","Enlarge/Reduce","Flaming Sphere","Gentle Repose","Gust of Wind","Hold Person","Invisibility","Knock","Levitate","Locate Object","Magic Mouth","Magic Weapon","Melf's Acid Arrow","Mirror Image","Misty Step","Nystul's Magic Aura","Phantasmal Force","Ray of Enfeeblement","Rope Trick","Scorching Ray","See Invisibility","Shatter","Spider Climb","Suggestion","Web"];
var wi3 = ["Erupting Earth","Flame Arrows","Melf's Minute Meteors","Tidal Wave","Wall of Sand","Wall of Water","Animate Dead","Bestow Curse","Blink","Clairvoyance","Counterspell","Dispel Magic","Fear","Feign Death","Fireball","Fly","Gaseous Form","Glyph of Warding","Haste","Hypnotic Pattern","Leomund’s Tiny Hut","Lightning Bolt","Magic Circle","Major Image","Nondetection","Phantom Steed","Protection from Energy","Remove Curse","Sending","Sleet Storm","Slow","Stinking Cloud","Tongues","Vampiric Touch","Water Breathing"];
var wi4 = ["Elemental Bane","Storm Sphere","Vitriolic Sphere","Watery Sphere","Arcane Eye","Banishment","Blight","Confusion","Conjure Minor Elementals","Control Water","Dimension Door","Evard's Black Tentacles","Fabricate","Fire Shield","Greater Invisibility","Hallucinatory Terrain","Ice Storm","Leomund’s Secret Chest","Locate Creature","Mordenkainen’s Faithful Hound","Mordenkainen’s Private Sanctum","Otiluke’s Resilient Sphere","Phantasmal Killer","Polymorph","Stone Shape","Stoneskin","Wall of Fire"];
var wi5 = ["Control Winds","Immolation","Transmute Rock","Animate Objects","Bigby’s Hand","CloudkilI","Cone of Cold","Conjure Elemental","Contact Other Plane","Creation","Dominate Person","Dream","Geas","Hold Monster","Legend Lore","Mislead","Modify Memory","Passwall","Planar Binding","Rary’s Telepathic Bond","Scrying","Seeming","Telekinesis","Teleportation Circle","Wall of Force","Wall of Stone"];
//var wi1 = ["Alarm","Burning Hands","Charm Person","Chromatic Orb","Color Spray","Comprehend Languages","Detect Magic","Disguise Self","Expeditious Retreat","False Life","Feather Fall","Find Familiar","Find Familiar","Fog Cloud","Grease","Identify","Illusory Script","Jump","Longstrider","Mage Armor","Magic Missile","Protection from Good and Evil","Ray of Sickness","Shield","Silent Image","Sleep","Tasha's Hideous Laughter","Tenser's Floating Disk","Thunderwave","Unseen Servant","Witch Bolt"];
//var wi2 = ["Alter Self","Arcane Lock","Blindness/Deafness","Blur","Cloud of Daggers","Continual Flame","Crown of Madness","Darkness","Darkvision","Detect Thoughts","Enlarge/Reduce","Flaming Sphere","Gentle Repose","Gust of Wind","Hold Person","Invisibility","Knock","Levitate","Locate Object","Magic Mouth","Magic Weapon","Melf's Acid Arrow","Mirror Image","Misty Step","Nystul's Magic Aura","Phantasmal Force","Ray of Enfeeblement","Rope Trick","Scorching Ray","See Invisibility","Shatter","Spider Climb","Suggestion","Web"];
//var wi3 = ["Animate Dead","Bestow Curse","Blink","Clairvoyance","Counterspell","Dispel Magic","Fear","Feign Death","Fireball","Fly","Gaseous Form","Glyph of Warding","Haste","Hypnotic Pattern","Leomund’s Tiny Hut","Lightning Bolt","Magic Circle","Major Image","Nondetection","Phantom Steed","Protection from Energy","Remove Curse","Sending","Sleet Storm","Slow","Stinking Cloud","Tongues","Vampiric Touch","Water Breathing"];
//var wi4 = ["Arcane Eye","Banishment","Blight","Confusion","Conjure Minor Elementals","Control Water","Dimension Door","Evard's Black Tentacles","Fabricate","Fire Shield","Greater Invisibility","Hallucinatory Terrain","Ice Storm","Leomund’s Secret Chest","Locate Creature","Mordenkainen’s Faithful Hound","Mordenkainen’s Private Sanctum","Otiluke’s Resilient Sphere","Phantasmal Killer","Polymorph","Stone Shape","Stoneskin","Wall of Fire"];
//var wi5 = ["Animate Objects","Bigby’s Hand","CloudkilI","Cone of Cold","Conjure Elemental","Contact Other Plane","Creation","Dominate Person","Dream","Geas","Hold Monster","Legend Lore","Mislead","Modify Memory","Passwall","Planar Binding","Rary’s Telepathic Bond","Scrying","Seeming","Telekinesis","Teleportation Circle","Wall of Force","Wall of Stone"];
var scrollBardUnc = ["Cure Wounds","Speak with Dead","Fear","Invisibility","Dispel Magic","Polymorph","Major Image"];
var scrollBardRare = ["Animate Objects","Hold Monster","Guards and Wards","Raise Dead"];
var scrollBardVery = ["Teleport","Power Word Kill","Power Word Stun"];
var scrollClerUnc = ["Prayer of Healing","Prayer of Healing","Magic Circle","Aid","Tongues","Mass Healing Word","Revivify","Revivify","Guardian of Faith"];
var scrollClerRare = ["Flame Strike","Mass Cure Wounds","Blade Barrier","Raise Dead","Heal"];
var scrollClerVery = ["Control Weather","Regenerate","Heal","True Resurrection","Gate"];
var scrollDruiUnc = ["Cure Wounds","Conjure Animals","Conjure Minor Elementals","Hold Person","Water Breathing"];
var scrollDruiRare = ["Mass Cure Wounds","Scrying","Dominate Beast","Heal"];
var scrollDruiVery = ["Heal","Wall of Thorns","Earthquake","True Resurrection","Tsunami"];
var scrollPalaUnc = ["Cure Wounds","Blinding Smite","Dispel Magic","Aura of Life","Detect Magic","Aid"];
var scrollPalaRare = ["Raise Dead","Geas","Banishing Smite"];
var scrollPalaVery = ["Raise Dead","Geas","Banishing Smite"];
var scrollRangUnc = ["Cure Wounds","Lightning Arrow","Conjure Barrage","Water Breathing"];
var scrollRangRare = ["Conjure Volley","Swift Quiver"];
var scrollRangVery = ["Conjure Volley","Swift Quiver"];
var scrollWarlUnc = ["Vampiric Touch","Tongues","Gaseous Form","Fear","Spider Climb","Comprehend Languages","Shatter"];
var scrollWarlRare = ["Blight","Scrying","Hold Monster","Conjure Fey",];
var scrollWarlVery = ["Mass Suggestion","Finger of Death","Power Word Stun"];