/
isaac-eden-finder.linq
1211 lines (1159 loc) · 42.7 KB
/
isaac-eden-finder.linq
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
<Query Kind="Program">
<IncludeUncapsulator>false</IncludeUncapsulator>
</Query>
// isaac-eden-finder Script
// For The Binding of Isaac: Repentance v1.7.5+ & Pre v1.7.5
// Created by Blade
// Originally modified from:
// https://gist.github.com/bladecoding/5fcc1356bfb0cf26555b0ade7c4fedca
// Things tried:
// 1) Deck of Cards + Cancer + Emp Card + Chaos Card
// 2) Deck of Cards + Cancer + Stars Card + Chaos Card
// 3) Deck of Cards + Cancer + Hermit Card + Chaos Card
// 4) Deck of Cards + Cancer + anything + Chaos Card
// (searched through both normal mode and hard mode for connecting Sacrifice Room)
// 5) Plan C + Card Reading + ? Card <--
// 6) Plan C + Card Reading + Wild Card
// 7) Mystery Gift + TMTRAINER
public static class Constants
{
public const int ACTIVE_ITEM_TO_SEARCH_FOR = CollectibleType.COLLECTIBLE_MYSTERY_GIFT;
public const int PASSIVE_ITEM_TO_SEARCH_FOR = CollectibleType.COLLECTIBLE_TMTRAINER;
// public const int CARD_TO_SEARCH_FOR = Card.CARD_STARS;
public const bool PRE_PATCH_1_7_5 = true;
public const int MAX_COLLECTIBLES =
PRE_PATCH_1_7_5
? CollectibleType.NUM_COLLECTIBLES_PRE_PATCH_1_7_5 - 1
: CollectibleType.NUM_COLLECTIBLES - 1;
public const int MAX_CARDS = Card.NUM_CARDS - 1;
}
// https://moddingofisaac.com/docs/rep/enums/CollectibleType.html
public static class CollectibleType
{
public const int COLLECTIBLE_TELEPORT = 44;
public const int COLLECTIBLE_DECK_OF_CARDS = 85;
public const int COLLECTIBLE_SCAPULAR = 142;
public const int COLLECTIBLE_CANCER = 301;
public const int COLLECTIBLE_DIPLOPIA = 347;
public const int COLLECTIBLE_MEGA_BLAST = 441;
public const int COLLECTIBLE_MYSTERY_GIFT = 515;
public const int COLLECTIBLE_CARD_READING = 660;
public const int COLLECTIBLE_TMTRAINER = 721;
public const int COLLECTIBLE_MOMS_RING = 732;
public const int NUM_COLLECTIBLES = 733;
public const int NUM_COLLECTIBLES_PRE_PATCH_1_7_5 = 730;
}
// https://moddingofisaac.com/docs/rep/enums/Card.html
public static class Card
{
public const int CARD_FOOL = 1;
public const int CARD_MAGICIAN = 2;
public const int CARD_HIGH_PRIESTESS = 3;
public const int CARD_EMPRESS = 4;
public const int CARD_EMPEROR = 5;
public const int CARD_HIEROPHANT = 6;
public const int CARD_LOVERS = 7;
public const int CARD_CHARIOT = 8;
public const int CARD_JUSTICE = 9;
public const int CARD_HERMIT = 10;
public const int CARD_WHEEL_OF_FORTUNE = 11;
public const int CARD_STRENGTH = 12;
public const int CARD_HANGED_MAN = 13;
public const int CARD_DEATH = 14;
public const int CARD_TEMPERANCE = 15;
public const int CARD_DEVIL = 16;
public const int CARD_TOWER = 17;
public const int CARD_STARS = 18;
public const int CARD_MOON = 19;
public const int CARD_SUN = 20;
public const int CARD_JUDGEMENT = 21;
public const int CARD_WORLD = 22;
public const int CARD_CLUBS_2 = 23;
public const int CARD_DIAMONDS_2 = 24;
public const int CARD_SPADES_2 = 25;
public const int CARD_HEARTS_2 = 26;
public const int CARD_ACE_OF_CLUBS = 27;
public const int CARD_ACE_OF_DIAMONDS = 28;
public const int CARD_ACE_OF_SPADES = 29;
public const int CARD_ACE_OF_HEARTS = 30;
public const int CARD_JOKER = 31;
public const int RUNE_HAGALAZ = 32;
public const int RUNE_JERA = 33;
public const int RUNE_EHWAZ = 34;
public const int RUNE_DAGAZ = 35;
public const int RUNE_ANSUZ = 36;
public const int RUNE_PERTHRO = 37;
public const int RUNE_BERKANO = 38;
public const int RUNE_ALGIZ = 39;
public const int RUNE_BLANK = 40;
public const int RUNE_BLACK = 41;
public const int CARD_CHAOS = 42;
public const int CARD_CREDIT = 43;
public const int CARD_RULES = 44;
public const int CARD_HUMANITY = 45;
public const int CARD_SUICIDE_KING = 46;
public const int CARD_GET_OUT_OF_JAIL = 47;
public const int CARD_QUESTIONMARK = 48;
public const int CARD_DICE_SHARD = 49;
public const int CARD_EMERGENCY_CONTACT = 50;
public const int CARD_HOLY = 51;
public const int CARD_HUGE_GROWTH = 52;
public const int CARD_ANCIENT_RECALL = 53;
public const int CARD_ERA_WALK = 54;
public const int RUNE_SHARD = 55;
public const int CARD_REVERSE_FOOL = 56;
public const int CARD_REVERSE_MAGICIAN = 57;
public const int CARD_REVERSE_HIGH_PRIESTESS = 58;
public const int CARD_REVERSE_EMPRESS = 59;
public const int CARD_REVERSE_EMPEROR = 60;
public const int CARD_REVERSE_HIEROPHANT = 61;
public const int CARD_REVERSE_LOVERS = 62;
public const int CARD_REVERSE_CHARIOT = 63;
public const int CARD_REVERSE_JUSTICE = 64;
public const int CARD_REVERSE_HERMIT = 65;
public const int CARD_REVERSE_WHEEL_OF_FORTUNE = 66;
public const int CARD_REVERSE_STRENGTH = 67;
public const int CARD_REVERSE_HANGED_MAN = 68;
public const int CARD_REVERSE_DEATH = 69;
public const int CARD_REVERSE_TEMPERANCE = 70;
public const int CARD_REVERSE_DEVIL = 71;
public const int CARD_REVERSE_TOWER = 72;
public const int CARD_REVERSE_STARS = 73;
public const int CARD_REVERSE_MOON = 74;
public const int CARD_REVERSE_SUN = 75;
public const int CARD_REVERSE_JUDGEMENT = 76;
public const int CARD_REVERSE_WORLD = 77;
public const int CARD_CRACKED_KEY = 78;
public const int CARD_QUEEN_OF_HEARTS = 79;
public const int CARD_WILD = 80;
public const int CARD_SOUL_ISAAC = 81;
public const int CARD_SOUL_MAGDALENE = 82;
public const int CARD_SOUL_CAIN = 83;
public const int CARD_SOUL_JUDAS = 84;
public const int CARD_SOUL_BLUEBABY = 85;
public const int CARD_SOUL_EVE = 86;
public const int CARD_SOUL_SAMSON = 87;
public const int CARD_SOUL_AZAZEL = 88;
public const int CARD_SOUL_LAZARUS = 89;
public const int CARD_SOUL_EDEN = 90;
public const int CARD_SOUL_LOST = 91;
public const int CARD_SOUL_LILITH = 92;
public const int CARD_SOUL_KEEPER = 93;
public const int CARD_SOUL_APOLLYON = 94;
public const int CARD_SOUL_FORGOTTEN = 95;
public const int CARD_SOUL_BETHANY = 96;
public const int CARD_SOUL_JACOB = 97;
public const int NUM_CARDS = 98;
}
// https://moddingofisaac.com/docs/rep/enums/LevelStage.html
public static class LevelStage
{
public const int NUM_STAGES = 14;
}
void Main()
{
var rand = new Random();
var seeds = new List<uint>();
for(uint i = 0; i < uint.MaxValue; i++)
{
var startSeed = (uint)i;
var dropSeed = CalculatePlayerSeed(startSeed);
var items = CalculateEdenItems(dropSeed);
if (
items.Active == Constants.ACTIVE_ITEM_TO_SEARCH_FOR
&& items.Passive == Constants.PASSIVE_ITEM_TO_SEARCH_FOR
// && items.Card == Constants.CARD_TO_SEARCH_FOR
)
{
seeds.Add(startSeed);
var seedString = SeedToString(startSeed);
var formattedSeedString = $"{seedString.Substring(0, 4)} {seedString.Substring(4)}";
formattedSeedString.Dump();
// File.AppendAllText(@"D:\Repositories\isaac-eden-finder\seeds.txt", formattedSeedString + Environment.NewLine);
}
if (i % 100000000 == 0) // 100 million (with 4.2 billion total seeds)
{
// Uncomment the next line to see the progress
// ("On numerical seed: " + i).Dump();
}
}
seeds.Select(s => SeedToString(s)).ToArray().Dump();
}
public static EdenItems CalculateEdenItems(uint dropSeed, int itemCount = Constants.MAX_COLLECTIBLES)
{
var rng = new Rng(dropSeed, 0x1, 0x5, 0x13);
var trinket = 0;
var card = 0;
var pill = 0;
var hearts = 0;
var soulHearts = 0;
if ((rng.Next() % 3) == 0)
{
// Trinket
}
else if ((rng.Next() & 1) == 0)
{
if ((rng.Next() & 1) == 0)
{
card = GetCard(rng.Next());
}
else
{
// Pill
var pillSeed = rng.Next();
}
}
var activeId = 0;
var passiveId = 0;
for (var i = 0; i < 100; i++)
{
int itemId = (int)(rng.Next() % itemCount) + 1;
// Black-list
if (itemId > Constants.MAX_COLLECTIBLES)
{
continue;
}
switch (itemId) {
// These are all of the gaps in vanilla items
// https://bindingofisaacrebirth.fandom.com/wiki/Items#Item_ID_Gaps
case 43:
case 61:
case 235:
case 587:
case 613:
case 620:
case 630:
case 648:
case 662:
case 666:
case 718:
continue;
// These are the items that Eden cannot get, which are defined in the "items_metadata.xml"
// file with a tag of "noeden"
case 59: // Book of Belial (Birthright)
case 238: // Key Piece 1
case 239: // Key Piece 2
case 327: // Polaroid
case 328: // Negative
case 550: // Broken Shovel 1
case 551: // Broken Shovel 2
case 552: // Mom's Shovel
case 626: // Knife Piece 1
case 627: // Knife Piece 2
case 633: // Dogma
case 668: // Dad's Note
case 714: // Recall
case 715: // Hold
continue;
default:
break;
}
var itemType = ItemConfig[itemId];
if (itemType == ItemType.Active)
{
activeId = activeId != 0 ? activeId : itemId;
}
else if (itemType == ItemType.Passive || itemType == ItemType.Familiar)
{
passiveId = passiveId != 0 ? passiveId : itemId;
}
// Isaac doesn't exit early :thinking:
if (activeId != 0 && passiveId != 0)
{
break;
}
}
// Hearts and SoulHearts are actually done in Player::Init
var healthRng = new Rng(dropSeed, 0x1, 0x5, 0x13);
var halfHearts = (int)healthRng.Next() & 3;
hearts = halfHearts * 2;
soulHearts = ((int)healthRng.Next() % (4 - halfHearts)) * 2;
if (hearts == 0 && soulHearts < 4)
{
soulHearts = 4;
}
return new EdenItems(hearts, soulHearts, activeId, passiveId, trinket, card, pill);
}
public static int GetCard(uint seed, bool rune = false, bool playing = false)
{
var specialCards = new int[] {
Card.CARD_CHAOS,
Card.CARD_CREDIT,
Card.CARD_RULES,
Card.CARD_HUMANITY,
Card.CARD_SUICIDE_KING,
Card.CARD_GET_OUT_OF_JAIL,
Card.CARD_QUESTIONMARK,
Card.CARD_DICE_SHARD,
Card.CARD_EMERGENCY_CONTACT,
Card.CARD_HOLY,
Card.CARD_HUGE_GROWTH,
Card.CARD_ANCIENT_RECALL,
Card.CARD_ERA_WALK,
Card.CARD_CRACKED_KEY,
Card.CARD_WILD,
};
var cardRng = new Rng(seed, 0x3, 0x3, 0x1d);
if (cardRng.Next() % 25 == 0)
{
// Special cards
return specialCards[cardRng.Next() % specialCards.Length];
}
if (rune && cardRng.Next() % 10 == 0)
{
// Rune
// TODO
}
if (playing && cardRng.Next() % 5 == 0)
{
// Playing card
return (int)(cardRng.Next() % 9) + 23;
}
// Normal card
return (int)(cardRng.Next() % 22) + 1;
}
public static Rng[] CalculateCollectibleSeeds(uint startSeed, int itemCount = Constants.MAX_COLLECTIBLES)
{
var playerInitSeed = CalculatePlayerInitSeed(startSeed);
var playerInitRng = new Rng(playerInitSeed, 0x1, 0xB, 0x10);
var collRng = new Rng(playerInitRng.Next(), 0x1, 0x13, 0x3);
var seeds = new Rng[itemCount];
for(var i = 0; i < seeds.Length; i++) {
seeds[i] = new Rng(collRng.Next(), 5, 9, 7);
}
return seeds;
}
public static Rng[] CalculateCardSeeds(uint startSeed, int cardCount = Constants.MAX_CARDS)
{
var playerInitSeed = CalculatePlayerInitSeed(startSeed);
var playerInitRng = new Rng(playerInitSeed, 0x1, 0xB, 0x10);
playerInitRng.Next();
playerInitRng.Next();
playerInitRng.Next();
var cardsRng = new Rng(playerInitRng.Next(), 0x2, 0x5, 0xf);
var seeds = new Rng[cardCount];
for (var i = 0; i < seeds.Length; i++) {
seeds[i] = new Rng(cardsRng.Next(), 5, 9, 7);
}
return seeds;
}
public static uint CalculatePlayerInitSeed(uint startSeed)
{
var startRng = new Rng(startSeed, 0x3, 0x17, 0x19);
// Stage Seeds
for (var i = 0; i < LevelStage.NUM_STAGES; i++) {
startRng.Next();
}
return startRng.Next(); // Seeds::PlayerInitSeed
}
public static uint CalculatePlayerSeed(uint startSeed)
{
var playerInitSeed = CalculatePlayerInitSeed(startSeed);
// These happen inside Player::Init
var playerInitRng = new Rng(playerInitSeed, 0x1, 0xB, 0x10);
playerInitRng.Next();
playerInitRng.Next();
playerInitRng.Next();
playerInitRng.Next();
return playerInitRng.Next(); // Entity::DropSeed
}
public class EdenItems
{
public int Hearts;
public int SoulHearts;
public int Active;
public int Passive;
public int Trinket;
public int Card;
public int Pill;
public EdenItems(int hearts, int soulHearts, int active, int passive, int trinket, int card, int pill)
{
Hearts = hearts;
SoulHearts = soulHearts;
Active = active;
Passive = passive;
Trinket = trinket;
Card = card;
Pill = pill;
}
}
static string SeedToString(uint num)
{
const string chars = "ABCDEFGHJKLMNPQRSTWXYZ01234V6789";
byte x = 0;
var tNum = num;
while (tNum != 0)
{
x += ((byte)tNum);
x += (byte)(x + (x >> 7));
tNum >>= 5;
}
num ^= 0x0FEF7FFD;
tNum = (num) << 8 | x;
var ret = new char[8];
for (int i = 0; i < 6; i++)
{
ret[i] = chars[(int)(num >> (27 - (i * 5)) & 0x1F)];
}
ret[6] = chars[(int)(tNum >> 5 & 0x1F)];
ret[7] = chars[(int)(tNum & 0x1F)];
return new string(ret);
}
public class Rng
{
public uint Seed;
public int Shift1;
public int Shift2;
public int Shift3;
public uint Next()
{
var num = Seed;
num ^= num >> Shift1;
num ^= num << Shift2;
num ^= num >> Shift3;
Seed = num;
return num;
}
public Rng(uint seed, int s1, int s2, int s3) {
this.Seed = seed;
Shift1 = s1;
Shift2 = s2;
Shift3 = s3;
}
};
public enum ItemType {
Null = 0,
Passive = 1,
Trinket = 2,
Active = 3,
Familiar = 4,
}
public static ItemType[] ItemConfig = GetItemConfig();
public static ItemType[] GetItemConfig() {
var itemConfigSize = Constants.MAX_COLLECTIBLES + 1;
var itemConfig = new ItemType[itemConfigSize];
itemConfig[1] = ItemType.Passive;
itemConfig[2] = ItemType.Passive;
itemConfig[3] = ItemType.Passive;
itemConfig[4] = ItemType.Passive;
itemConfig[5] = ItemType.Passive;
itemConfig[6] = ItemType.Passive;
itemConfig[7] = ItemType.Passive;
itemConfig[8] = ItemType.Familiar;
itemConfig[9] = ItemType.Passive;
itemConfig[10] = ItemType.Familiar;
itemConfig[11] = ItemType.Familiar;
itemConfig[12] = ItemType.Passive;
itemConfig[13] = ItemType.Passive;
itemConfig[14] = ItemType.Passive;
itemConfig[15] = ItemType.Passive;
itemConfig[16] = ItemType.Passive;
itemConfig[17] = ItemType.Passive;
itemConfig[18] = ItemType.Passive;
itemConfig[19] = ItemType.Passive;
itemConfig[20] = ItemType.Passive;
itemConfig[21] = ItemType.Passive;
itemConfig[22] = ItemType.Passive;
itemConfig[23] = ItemType.Passive;
itemConfig[24] = ItemType.Passive;
itemConfig[25] = ItemType.Passive;
itemConfig[26] = ItemType.Passive;
itemConfig[27] = ItemType.Passive;
itemConfig[28] = ItemType.Passive;
itemConfig[29] = ItemType.Passive;
itemConfig[30] = ItemType.Passive;
itemConfig[31] = ItemType.Passive;
itemConfig[32] = ItemType.Passive;
itemConfig[33] = ItemType.Active;
itemConfig[34] = ItemType.Active;
itemConfig[35] = ItemType.Active;
itemConfig[36] = ItemType.Active;
itemConfig[37] = ItemType.Active;
itemConfig[38] = ItemType.Active;
itemConfig[39] = ItemType.Active;
itemConfig[40] = ItemType.Active;
itemConfig[41] = ItemType.Active;
itemConfig[42] = ItemType.Active;
itemConfig[44] = ItemType.Active;
itemConfig[45] = ItemType.Active;
itemConfig[46] = ItemType.Passive;
itemConfig[47] = ItemType.Active;
itemConfig[48] = ItemType.Passive;
itemConfig[49] = ItemType.Active;
itemConfig[50] = ItemType.Passive;
itemConfig[51] = ItemType.Passive;
itemConfig[52] = ItemType.Passive;
itemConfig[53] = ItemType.Passive;
itemConfig[54] = ItemType.Passive;
itemConfig[55] = ItemType.Passive;
itemConfig[56] = ItemType.Active;
itemConfig[57] = ItemType.Familiar;
itemConfig[58] = ItemType.Active;
itemConfig[59] = ItemType.Active;
itemConfig[60] = ItemType.Passive;
itemConfig[62] = ItemType.Passive;
itemConfig[63] = ItemType.Passive;
itemConfig[64] = ItemType.Passive;
itemConfig[65] = ItemType.Active;
itemConfig[66] = ItemType.Active;
itemConfig[67] = ItemType.Familiar;
itemConfig[68] = ItemType.Passive;
itemConfig[69] = ItemType.Passive;
itemConfig[70] = ItemType.Passive;
itemConfig[71] = ItemType.Passive;
itemConfig[72] = ItemType.Passive;
itemConfig[73] = ItemType.Familiar;
itemConfig[74] = ItemType.Passive;
itemConfig[75] = ItemType.Passive;
itemConfig[76] = ItemType.Passive;
itemConfig[77] = ItemType.Active;
itemConfig[78] = ItemType.Active;
itemConfig[79] = ItemType.Passive;
itemConfig[80] = ItemType.Passive;
itemConfig[81] = ItemType.Familiar;
itemConfig[82] = ItemType.Passive;
itemConfig[83] = ItemType.Active;
itemConfig[84] = ItemType.Active;
itemConfig[85] = ItemType.Active;
itemConfig[86] = ItemType.Active;
itemConfig[87] = ItemType.Passive;
itemConfig[88] = ItemType.Familiar;
itemConfig[89] = ItemType.Passive;
itemConfig[90] = ItemType.Passive;
itemConfig[91] = ItemType.Passive;
itemConfig[92] = ItemType.Passive;
itemConfig[93] = ItemType.Active;
itemConfig[94] = ItemType.Familiar;
itemConfig[95] = ItemType.Familiar;
itemConfig[96] = ItemType.Familiar;
itemConfig[97] = ItemType.Active;
itemConfig[98] = ItemType.Familiar;
itemConfig[99] = ItemType.Familiar;
itemConfig[100] = ItemType.Familiar;
itemConfig[101] = ItemType.Passive;
itemConfig[102] = ItemType.Active;
itemConfig[103] = ItemType.Passive;
itemConfig[104] = ItemType.Passive;
itemConfig[105] = ItemType.Active;
itemConfig[106] = ItemType.Passive;
itemConfig[107] = ItemType.Active;
itemConfig[108] = ItemType.Passive;
itemConfig[109] = ItemType.Passive;
itemConfig[110] = ItemType.Passive;
itemConfig[111] = ItemType.Active;
itemConfig[112] = ItemType.Familiar;
itemConfig[113] = ItemType.Familiar;
itemConfig[114] = ItemType.Passive;
itemConfig[115] = ItemType.Passive;
itemConfig[116] = ItemType.Passive;
itemConfig[117] = ItemType.Passive;
itemConfig[118] = ItemType.Passive;
itemConfig[119] = ItemType.Passive;
itemConfig[120] = ItemType.Passive;
itemConfig[121] = ItemType.Passive;
itemConfig[122] = ItemType.Passive;
itemConfig[123] = ItemType.Active;
itemConfig[124] = ItemType.Active;
itemConfig[125] = ItemType.Passive;
itemConfig[126] = ItemType.Active;
itemConfig[127] = ItemType.Active;
itemConfig[128] = ItemType.Familiar;
itemConfig[129] = ItemType.Passive;
itemConfig[130] = ItemType.Active;
itemConfig[131] = ItemType.Familiar;
itemConfig[132] = ItemType.Passive;
itemConfig[133] = ItemType.Active;
itemConfig[134] = ItemType.Passive;
itemConfig[135] = ItemType.Active;
itemConfig[136] = ItemType.Active;
itemConfig[137] = ItemType.Active;
itemConfig[138] = ItemType.Passive;
itemConfig[139] = ItemType.Passive;
itemConfig[140] = ItemType.Passive;
itemConfig[141] = ItemType.Passive;
itemConfig[142] = ItemType.Passive;
itemConfig[143] = ItemType.Passive;
itemConfig[144] = ItemType.Familiar;
itemConfig[145] = ItemType.Active;
itemConfig[146] = ItemType.Active;
itemConfig[147] = ItemType.Active;
itemConfig[148] = ItemType.Passive;
itemConfig[149] = ItemType.Passive;
itemConfig[150] = ItemType.Passive;
itemConfig[151] = ItemType.Passive;
itemConfig[152] = ItemType.Passive;
itemConfig[153] = ItemType.Passive;
itemConfig[154] = ItemType.Passive;
itemConfig[155] = ItemType.Familiar;
itemConfig[156] = ItemType.Passive;
itemConfig[157] = ItemType.Passive;
itemConfig[158] = ItemType.Active;
itemConfig[159] = ItemType.Passive;
itemConfig[160] = ItemType.Active;
itemConfig[161] = ItemType.Passive;
itemConfig[162] = ItemType.Passive;
itemConfig[163] = ItemType.Familiar;
itemConfig[164] = ItemType.Active;
itemConfig[165] = ItemType.Passive;
itemConfig[166] = ItemType.Active;
itemConfig[167] = ItemType.Familiar;
itemConfig[168] = ItemType.Passive;
itemConfig[169] = ItemType.Passive;
itemConfig[170] = ItemType.Familiar;
itemConfig[171] = ItemType.Active;
itemConfig[172] = ItemType.Familiar;
itemConfig[173] = ItemType.Passive;
itemConfig[174] = ItemType.Familiar;
itemConfig[175] = ItemType.Active;
itemConfig[176] = ItemType.Passive;
itemConfig[177] = ItemType.Active;
itemConfig[178] = ItemType.Familiar;
itemConfig[179] = ItemType.Passive;
itemConfig[180] = ItemType.Passive;
itemConfig[181] = ItemType.Active;
itemConfig[182] = ItemType.Passive;
itemConfig[183] = ItemType.Passive;
itemConfig[184] = ItemType.Passive;
itemConfig[185] = ItemType.Passive;
itemConfig[186] = ItemType.Active;
itemConfig[187] = ItemType.Familiar;
itemConfig[188] = ItemType.Familiar;
itemConfig[189] = ItemType.Passive;
itemConfig[190] = ItemType.Passive;
itemConfig[191] = ItemType.Passive;
itemConfig[192] = ItemType.Active;
itemConfig[193] = ItemType.Passive;
itemConfig[194] = ItemType.Passive;
itemConfig[195] = ItemType.Passive;
itemConfig[196] = ItemType.Passive;
itemConfig[197] = ItemType.Passive;
itemConfig[198] = ItemType.Passive;
itemConfig[199] = ItemType.Passive;
itemConfig[200] = ItemType.Passive;
itemConfig[201] = ItemType.Passive;
itemConfig[202] = ItemType.Passive;
itemConfig[203] = ItemType.Passive;
itemConfig[204] = ItemType.Passive;
itemConfig[205] = ItemType.Passive;
itemConfig[206] = ItemType.Familiar;
itemConfig[207] = ItemType.Familiar;
itemConfig[208] = ItemType.Passive;
itemConfig[209] = ItemType.Passive;
itemConfig[210] = ItemType.Passive;
itemConfig[211] = ItemType.Passive;
itemConfig[212] = ItemType.Passive;
itemConfig[213] = ItemType.Passive;
itemConfig[214] = ItemType.Passive;
itemConfig[215] = ItemType.Passive;
itemConfig[216] = ItemType.Passive;
itemConfig[217] = ItemType.Passive;
itemConfig[218] = ItemType.Passive;
itemConfig[219] = ItemType.Passive;
itemConfig[220] = ItemType.Passive;
itemConfig[221] = ItemType.Passive;
itemConfig[222] = ItemType.Passive;
itemConfig[223] = ItemType.Passive;
itemConfig[224] = ItemType.Passive;
itemConfig[225] = ItemType.Passive;
itemConfig[226] = ItemType.Passive;
itemConfig[227] = ItemType.Passive;
itemConfig[228] = ItemType.Passive;
itemConfig[229] = ItemType.Passive;
itemConfig[230] = ItemType.Passive;
itemConfig[231] = ItemType.Passive;
itemConfig[232] = ItemType.Passive;
itemConfig[233] = ItemType.Passive;
itemConfig[234] = ItemType.Passive;
itemConfig[236] = ItemType.Passive;
itemConfig[237] = ItemType.Passive;
itemConfig[238] = ItemType.Familiar;
itemConfig[239] = ItemType.Familiar;
itemConfig[240] = ItemType.Passive;
itemConfig[241] = ItemType.Passive;
itemConfig[242] = ItemType.Passive;
itemConfig[243] = ItemType.Passive;
itemConfig[244] = ItemType.Passive;
itemConfig[245] = ItemType.Passive;
itemConfig[246] = ItemType.Passive;
itemConfig[247] = ItemType.Passive;
itemConfig[248] = ItemType.Passive;
itemConfig[249] = ItemType.Passive;
itemConfig[250] = ItemType.Passive;
itemConfig[251] = ItemType.Passive;
itemConfig[252] = ItemType.Passive;
itemConfig[253] = ItemType.Passive;
itemConfig[254] = ItemType.Passive;
itemConfig[255] = ItemType.Passive;
itemConfig[256] = ItemType.Passive;
itemConfig[257] = ItemType.Passive;
itemConfig[258] = ItemType.Passive;
itemConfig[259] = ItemType.Passive;
itemConfig[260] = ItemType.Passive;
itemConfig[261] = ItemType.Passive;
itemConfig[262] = ItemType.Passive;
itemConfig[263] = ItemType.Active;
itemConfig[264] = ItemType.Familiar;
itemConfig[265] = ItemType.Familiar;
itemConfig[266] = ItemType.Familiar;
itemConfig[267] = ItemType.Familiar;
itemConfig[268] = ItemType.Familiar;
itemConfig[269] = ItemType.Familiar;
itemConfig[270] = ItemType.Familiar;
itemConfig[271] = ItemType.Familiar;
itemConfig[272] = ItemType.Familiar;
itemConfig[273] = ItemType.Familiar;
itemConfig[274] = ItemType.Familiar;
itemConfig[275] = ItemType.Familiar;
itemConfig[276] = ItemType.Familiar;
itemConfig[277] = ItemType.Familiar;
itemConfig[278] = ItemType.Familiar;
itemConfig[279] = ItemType.Familiar;
itemConfig[280] = ItemType.Familiar;
itemConfig[281] = ItemType.Familiar;
itemConfig[282] = ItemType.Active;
itemConfig[283] = ItemType.Active;
itemConfig[284] = ItemType.Active;
itemConfig[285] = ItemType.Active;
itemConfig[286] = ItemType.Active;
itemConfig[287] = ItemType.Active;
itemConfig[288] = ItemType.Active;
itemConfig[289] = ItemType.Active;
itemConfig[290] = ItemType.Active;
itemConfig[291] = ItemType.Active;
itemConfig[292] = ItemType.Active;
itemConfig[293] = ItemType.Active;
itemConfig[294] = ItemType.Active;
itemConfig[295] = ItemType.Active;
itemConfig[296] = ItemType.Active;
itemConfig[297] = ItemType.Active;
itemConfig[298] = ItemType.Active;
itemConfig[299] = ItemType.Passive;
itemConfig[300] = ItemType.Passive;
itemConfig[301] = ItemType.Passive;
itemConfig[302] = ItemType.Passive;
itemConfig[303] = ItemType.Passive;
itemConfig[304] = ItemType.Passive;
itemConfig[305] = ItemType.Passive;
itemConfig[306] = ItemType.Passive;
itemConfig[307] = ItemType.Passive;
itemConfig[308] = ItemType.Passive;
itemConfig[309] = ItemType.Passive;
itemConfig[310] = ItemType.Passive;
itemConfig[311] = ItemType.Passive;
itemConfig[312] = ItemType.Passive;
itemConfig[313] = ItemType.Passive;
itemConfig[314] = ItemType.Passive;
itemConfig[315] = ItemType.Passive;
itemConfig[316] = ItemType.Passive;
itemConfig[317] = ItemType.Passive;
itemConfig[318] = ItemType.Familiar;
itemConfig[319] = ItemType.Familiar;
itemConfig[320] = ItemType.Familiar;
itemConfig[321] = ItemType.Familiar;
itemConfig[322] = ItemType.Familiar;
itemConfig[323] = ItemType.Active;
itemConfig[324] = ItemType.Active;
itemConfig[325] = ItemType.Active;
itemConfig[326] = ItemType.Active;
itemConfig[327] = ItemType.Passive;
itemConfig[328] = ItemType.Passive;
itemConfig[329] = ItemType.Passive;
itemConfig[330] = ItemType.Passive;
itemConfig[331] = ItemType.Passive;
itemConfig[332] = ItemType.Passive;
itemConfig[333] = ItemType.Passive;
itemConfig[334] = ItemType.Passive;
itemConfig[335] = ItemType.Passive;
itemConfig[336] = ItemType.Passive;
itemConfig[337] = ItemType.Passive;
itemConfig[338] = ItemType.Active;
itemConfig[339] = ItemType.Passive;
itemConfig[340] = ItemType.Passive;
itemConfig[341] = ItemType.Passive;
itemConfig[342] = ItemType.Passive;
itemConfig[343] = ItemType.Passive;
itemConfig[344] = ItemType.Passive;
itemConfig[345] = ItemType.Passive;
itemConfig[346] = ItemType.Passive;
itemConfig[347] = ItemType.Active;
itemConfig[348] = ItemType.Active;
itemConfig[349] = ItemType.Active;
itemConfig[350] = ItemType.Passive;
itemConfig[351] = ItemType.Active;
itemConfig[352] = ItemType.Active;
itemConfig[353] = ItemType.Passive;
itemConfig[354] = ItemType.Passive;
itemConfig[355] = ItemType.Passive;
itemConfig[356] = ItemType.Passive;
itemConfig[357] = ItemType.Active;
itemConfig[358] = ItemType.Passive;
itemConfig[359] = ItemType.Passive;
itemConfig[360] = ItemType.Familiar;
itemConfig[361] = ItemType.Familiar;
itemConfig[362] = ItemType.Familiar;
itemConfig[363] = ItemType.Familiar;
itemConfig[364] = ItemType.Familiar;
itemConfig[365] = ItemType.Familiar;
itemConfig[366] = ItemType.Passive;
itemConfig[367] = ItemType.Passive;
itemConfig[368] = ItemType.Passive;
itemConfig[369] = ItemType.Passive;
itemConfig[370] = ItemType.Passive;
itemConfig[371] = ItemType.Passive;
itemConfig[372] = ItemType.Familiar;
itemConfig[373] = ItemType.Passive;
itemConfig[374] = ItemType.Passive;
itemConfig[375] = ItemType.Passive;
itemConfig[376] = ItemType.Passive;
itemConfig[377] = ItemType.Passive;
itemConfig[378] = ItemType.Passive;
itemConfig[379] = ItemType.Passive;
itemConfig[380] = ItemType.Passive;
itemConfig[381] = ItemType.Passive;
itemConfig[382] = ItemType.Active;
itemConfig[383] = ItemType.Active;
itemConfig[384] = ItemType.Familiar;
itemConfig[385] = ItemType.Familiar;
itemConfig[386] = ItemType.Active;
itemConfig[387] = ItemType.Familiar;
itemConfig[388] = ItemType.Familiar;
itemConfig[389] = ItemType.Familiar;
itemConfig[390] = ItemType.Familiar;
itemConfig[391] = ItemType.Passive;
itemConfig[392] = ItemType.Passive;
itemConfig[393] = ItemType.Passive;
itemConfig[394] = ItemType.Passive;
itemConfig[395] = ItemType.Passive;
itemConfig[396] = ItemType.Active;
itemConfig[397] = ItemType.Passive;
itemConfig[398] = ItemType.Passive;
itemConfig[399] = ItemType.Passive;
itemConfig[400] = ItemType.Passive;
itemConfig[401] = ItemType.Passive;
itemConfig[402] = ItemType.Passive;
itemConfig[403] = ItemType.Familiar;
itemConfig[404] = ItemType.Familiar;
itemConfig[405] = ItemType.Familiar;
itemConfig[406] = ItemType.Active;
itemConfig[407] = ItemType.Passive;
itemConfig[408] = ItemType.Passive;
itemConfig[409] = ItemType.Passive;
itemConfig[410] = ItemType.Passive;
itemConfig[411] = ItemType.Passive;
itemConfig[412] = ItemType.Passive;
itemConfig[413] = ItemType.Passive;
itemConfig[414] = ItemType.Passive;
itemConfig[415] = ItemType.Passive;
itemConfig[416] = ItemType.Passive;
itemConfig[417] = ItemType.Familiar;
itemConfig[418] = ItemType.Passive;
itemConfig[419] = ItemType.Active;
itemConfig[420] = ItemType.Passive;
itemConfig[421] = ItemType.Active;
itemConfig[422] = ItemType.Active;
itemConfig[423] = ItemType.Passive;
itemConfig[424] = ItemType.Passive;
itemConfig[425] = ItemType.Passive;
itemConfig[426] = ItemType.Familiar;
itemConfig[427] = ItemType.Active;
itemConfig[428] = ItemType.Passive;
itemConfig[429] = ItemType.Passive;
itemConfig[430] = ItemType.Familiar;
itemConfig[431] = ItemType.Familiar;
itemConfig[432] = ItemType.Passive;
itemConfig[433] = ItemType.Passive;
itemConfig[434] = ItemType.Active;
itemConfig[435] = ItemType.Familiar;
itemConfig[436] = ItemType.Familiar;
itemConfig[437] = ItemType.Active;
itemConfig[438] = ItemType.Passive;
itemConfig[439] = ItemType.Active;
itemConfig[440] = ItemType.Passive;
itemConfig[441] = ItemType.Active;
itemConfig[442] = ItemType.Passive;
itemConfig[443] = ItemType.Passive;
itemConfig[444] = ItemType.Passive;
itemConfig[445] = ItemType.Passive;
itemConfig[446] = ItemType.Passive;
itemConfig[447] = ItemType.Passive;
itemConfig[448] = ItemType.Passive;
itemConfig[449] = ItemType.Passive;
itemConfig[450] = ItemType.Passive;
itemConfig[451] = ItemType.Passive;
itemConfig[452] = ItemType.Passive;
itemConfig[453] = ItemType.Passive;
itemConfig[454] = ItemType.Passive;
itemConfig[455] = ItemType.Passive;
itemConfig[456] = ItemType.Passive;
itemConfig[457] = ItemType.Passive;
itemConfig[458] = ItemType.Passive;
itemConfig[459] = ItemType.Passive;
itemConfig[460] = ItemType.Passive;
itemConfig[461] = ItemType.Passive;
itemConfig[462] = ItemType.Passive;
itemConfig[463] = ItemType.Passive;
itemConfig[464] = ItemType.Passive;
itemConfig[465] = ItemType.Passive;
itemConfig[466] = ItemType.Passive;
itemConfig[467] = ItemType.Familiar;
itemConfig[468] = ItemType.Familiar;
itemConfig[469] = ItemType.Familiar;
itemConfig[470] = ItemType.Familiar;
itemConfig[471] = ItemType.Familiar;
itemConfig[472] = ItemType.Familiar;
itemConfig[473] = ItemType.Familiar;
itemConfig[474] = ItemType.Familiar;
itemConfig[475] = ItemType.Active;
itemConfig[476] = ItemType.Active;
itemConfig[477] = ItemType.Active;
itemConfig[478] = ItemType.Active;
itemConfig[479] = ItemType.Active;
itemConfig[480] = ItemType.Active;
itemConfig[481] = ItemType.Active;
itemConfig[482] = ItemType.Active;
itemConfig[483] = ItemType.Active;
itemConfig[484] = ItemType.Active;
itemConfig[485] = ItemType.Active;
itemConfig[486] = ItemType.Active;
itemConfig[487] = ItemType.Active;
itemConfig[488] = ItemType.Active;
itemConfig[489] = ItemType.Active;
itemConfig[490] = ItemType.Active;
itemConfig[491] = ItemType.Familiar;
itemConfig[492] = ItemType.Familiar;
itemConfig[493] = ItemType.Passive;
itemConfig[494] = ItemType.Passive;
itemConfig[495] = ItemType.Passive;
itemConfig[496] = ItemType.Passive;
itemConfig[497] = ItemType.Passive;
itemConfig[498] = ItemType.Passive;
itemConfig[499] = ItemType.Passive;
itemConfig[500] = ItemType.Familiar;
itemConfig[501] = ItemType.Passive;
itemConfig[502] = ItemType.Passive;
itemConfig[503] = ItemType.Passive;
itemConfig[504] = ItemType.Active;
itemConfig[505] = ItemType.Passive;
itemConfig[506] = ItemType.Passive;
itemConfig[507] = ItemType.Active;
itemConfig[508] = ItemType.Familiar;
itemConfig[509] = ItemType.Familiar;
itemConfig[510] = ItemType.Active;
itemConfig[511] = ItemType.Familiar;
itemConfig[512] = ItemType.Active;
itemConfig[513] = ItemType.Passive;
itemConfig[514] = ItemType.Passive;
itemConfig[515] = ItemType.Active;
itemConfig[516] = ItemType.Active;
itemConfig[517] = ItemType.Passive;
itemConfig[518] = ItemType.Familiar;
itemConfig[519] = ItemType.Familiar;