Nopre

Blackout True Ending Tourny Goalpack

Feb 22nd, 2026 (edited)
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 35.29 KB | None | 0 0
  1. //FOR BLACKOUT
  2. //Based on the original Hollow Knight item rando board generator, edited by Adyn99 and Nopre
  3.  
  4. // # Changelog:
  5. // * Increased "1 extra mask" to "2 extra masks", and in settings increased mask shards to double mask shards --> want to give more hp
  6. //   to runners.
  7. // * Change "Ride to Stag Nest" to "Ride to Stag Nest or Open the stag door in Dirtmouth" --> Make a stag pair
  8. // * Change "City crest AND Elevators" to "City crest OR Elevators" --> Less random obtains
  9. // * Removed "Kill Myla" entirely --> this is like the most basic version of "Obtain Crystal Heart + 1" goal and we don't need those
  10. // * Added the word "Overworld" to the hotsprings goal
  11.  
  12. var bingoList = {
  13.   "bingoTypes": {
  14.     "Tiebreaker": {"Max": 1}
  15.   },
  16.   "maxScore": 9.5,
  17.  
  18.   //Sorted alphabetically and grouped
  19.   //Bosses. Dream versions grouped instead of alphabetical
  20.  
  21.   "2DreamBosses": {
  22.     "Desc": "Defeat two Dream Bosses",
  23.     "Excludes": ["LostKin", "FChamp", "SoulTyrant"]
  24.   },
  25.  
  26.   "BVessel": {
  27.     "Desc": "Defeat Broken Vessel",
  28.     "Excludes": ["LostKin"]
  29.   },
  30.  
  31.   "LostKin": {
  32.     "Desc": "Defeat Lost Kin",
  33.     "Excludes": ["BVessel"]
  34.   },
  35.  
  36.   "CG1": {
  37.     "Desc": "Defeat Crystal Guardian",
  38.     "Excludes": ["CG2"]
  39.   },
  40.  
  41.   "CG2": {
  42.     "Desc": "Defeat Enraged Guardian",
  43.     "Excludes": ["CG1"]
  44.   },
  45.  
  46.   "Collector": {
  47.     "Desc": "Defeat Collector",
  48.     "Excludes": ["KEGrubs", "LoveKey", "Vitruvian", "VisitTower"],
  49.     "Score": 1.30
  50.   },
  51.  
  52.   "DDefender": {
  53.     "Desc": "Defeat Dung Defender",
  54.     "Excludes": ["WhiteDefender"]
  55.   },
  56.  
  57.   "WhiteDefender": {
  58.     "Desc": "Defeat White Defender",
  59.     "Types": ["Tiebreaker"],
  60.     "Excludes": ["DDefender", "MrMushroom1"]
  61.   },
  62.  
  63.   "FChamp": {
  64.     "Desc": "Defeat Failed Champion",
  65.     "Excludes": ["Maggots", "FKnight_BMawlek"]
  66.   },
  67.  
  68.   "FKnight_BMawlek": {
  69.     "Desc": "Defeat False Knight and Brooding Mawlek",
  70.     "Excludes": ["Maggots", "FChamp"]
  71.   },
  72.  
  73.   "Flukemarm": {
  74.     "Desc": "Defeat Flukemarm"
  75.   },
  76.  
  77.   "HiveKnight": {
  78.     "Desc": "Defeat Hive Knight",
  79.     "Excludes": ["HiveMask"]
  80.   },
  81.  
  82.   "Hornet2": {
  83.     "Desc": "Defeat Hornet Sentinel",
  84.     "Excludes": ["VisitQueensShell"]
  85.   },
  86.  
  87.   "MLords": {
  88.     "Desc": "Defeat Mantis Lords"
  89.   },
  90.  
  91.   "Nosk": {
  92.     "Desc": "Defeat Nosk",
  93.     "Excludes": ["PaleOreCheck"]
  94.   },
  95.  
  96.   "SoulMaster": {
  97.     "Desc": "Defeat Soul Master",
  98.     "Excludes": ["SoulTyrant", "LoreSanctum"]
  99.   },
  100.  
  101.   "SoulTyrant": {
  102.     "Desc": "Defeat Soul Tyrant",
  103.     "Excludes": ["SoulMaster", "LoreSanctum"]
  104.   },
  105.  
  106.   "TLord": {
  107.     "Desc": "Defeat Traitor Lord",
  108.     "Excludes": ["WhiteLady", "ClothQuest"]
  109.   },
  110.  
  111.   "TMGrimm": {
  112.     "Desc": "Defeat Troupe Master Grimm",
  113.     "Excludes": ["NKGrimm", "CarefreeMelody", "Brumm"]
  114.   },
  115.  
  116.   "NKGrimm": {
  117.     "Desc": "Defeat Nightmare King Grimm",
  118.     "Types": ["Tiebreaker"],
  119.     "Excludes": ["CarefreeMelody", "TMGrimm", "Brumm"]
  120.   },
  121.  
  122.   "Uumuu": {
  123.     "Desc": "Defeat Uumuu",
  124.     "Excludes": ["Lumafly", "LoreArchives", "Dreamers"]
  125.   },
  126.  
  127.   "WK": {
  128.     "Desc": "Defeat Watcher Knights",
  129.     "Excludes": ["Telescope", "LoreCity", "Dreamers"]
  130.   },
  131.  
  132.   "VK_MMC": {
  133.     "Desc": "Defeat Vengefly King and Massive Moss Charger"
  134.   },
  135.  
  136.   //Dream Warriors
  137.  
  138.   "2DreamWarriors": {
  139.     "Desc": "Defeat two dream warriors",
  140.     "Excludes": [
  141.             "Galien",
  142.             "Gorb",
  143.             "Hu",
  144.             "Marmu",
  145.             "Markoth",
  146.             "NoEyes",
  147.             "Xero"
  148.         ]
  149.   },
  150.  
  151.   "Galien": {
  152.     "Desc": "Defeat Galien"
  153.   },
  154.  
  155.   "Gorb": {
  156.     "Desc": "Defeat Gorb",
  157.     "Excludes": ["LoreCliffs"]
  158.   },
  159.  
  160.   "Hu": {
  161.     "Desc": "Defeat Elder Hu"
  162.   },
  163.  
  164.   "Marmu": {
  165.     "Desc": "Defeat Marmu"
  166.   },
  167.  
  168.   "Markoth": {
  169.     "Desc": "Defeat Markoth"
  170.   },
  171.  
  172.   "NoEyes": {
  173.     "Desc": "Defeat No Eyes"
  174.   },
  175.  
  176.   "Xero": {
  177.     "Desc": "Defeat Xero"
  178.   },
  179.  
  180.  
  181.  
  182.  
  183.   //Enemies
  184.  
  185.   "2Warriors": {
  186.     "Desc": "Kill two Soul Warriors",
  187.     "Excludes": ["SSoulCheck"]
  188.   },
  189.  
  190.   "Aluba2": {
  191.     "Desc": "Kill two different Alubas"
  192.   },
  193.  
  194.   "Colo1": {
  195.     "Desc": "Complete Colosseum 1",
  196.     "Excludes": ["ColoZote"]
  197.   },
  198.  
  199.   "ColoZote": {
  200.     "Desc": "Defeat Zote in the Colosseum",
  201.     "Excludes": ["Colo1", "DeepnestZote"]
  202.   },
  203.  
  204.   "Devout": {
  205.     "Desc": "Kill 6 different Stalking Devouts"
  206.   },
  207.  
  208.   "ColoLoodle": {
  209.       "Desc": "Kill a Death Loodle in Colosseum 3",
  210.       "Excludes": ["ColoZote", "Colo1"]
  211.   },
  212.  
  213.   "GHopper": {
  214.     "Desc": "Kill a Great Hopper",
  215.     "Excludes": ["HopperHell", "420Rock", "AncientNailsmith"]
  216.   },
  217.  
  218.   "Kingsmould": {
  219.     "Desc": "Kill a Kingsmould",
  220.     "Excludes": ["PoP", "Workshop"],
  221.     "Score": 0.88
  222.   },
  223.  
  224.   "Maggots": { //No more doEsFalSEkNiGhtCoUNtAsaMaGgOT
  225.     "Desc": "Kill the two mourning Maggots",
  226.     "Excludes": ["FChamp", "FKnight_BMawlek"]
  227.   },
  228.  
  229.   "Marissa": {
  230.     "Desc": "Dream Nail Marissa",
  231.     "Excludes": ["Springs", "2Keys"]
  232.   },
  233.  
  234.   "Millibelle": {
  235.     "Desc": "Slash Millibelle in Pleasure House",
  236.     "Excludes": ["Bank"]
  237.   },
  238.  
  239.   "Mimics": {
  240.     "Desc": "Check/Kill 4 Mimics",
  241.     "Excludes": ["DirtmouthElevator"]
  242.   },
  243.  
  244.   //Items. Different types (Dreamers/Skills/Keys/etc) grouped together
  245.  
  246.   "Herrah": {
  247.     "Desc": "Obtain Herrah",
  248.     "Score": 1.30
  249.   },
  250.  
  251.   "Lurien": {
  252.     "Desc": "Obtain Lurien",
  253.     "Score": 1.30
  254.   },
  255.  
  256.   "Monomon": {
  257.     "Desc": "Obtain Monomon",
  258.     "Score": 1.30
  259.   },
  260.  
  261.   "GPXRoadsStag": {
  262.       "Desc": "Ride the stag to Crossroads or Greenpath",
  263.       "Score": 1.06
  264.   },
  265.   "DeepRestingStag": {
  266.       "Desc": "Ride the stag to Distant Village or Resting Grounds",
  267.       "Excludes": [
  268.           "Midwife",
  269.           "VisitDistantHive",
  270.       ],
  271.       "Score": 1.06
  272.   },
  273.   "CityStag": {
  274.       "Desc": "Ride the stag to King's Station or City Storerooms",
  275.       "Score": 1.06
  276.   },
  277.   "QueensStag": {
  278.       "Desc": "Ride the stag to Queen's Gardens or Queen's Station",
  279.       "Score": 1.06
  280.   },
  281.   "StagNestStag": {
  282.       "Desc": "Ride the stag to Stag Nest OR Open the stag station door in Dirtmouth",
  283.       "Excludes": [
  284.           "StagVessel"
  285.       ],
  286.       "Score": 1.06
  287.   },
  288.  
  289.   "5Charms": {
  290.     "Desc": "Have 5 or more Charms",
  291.     "Score": 0.20
  292.   },
  293.  
  294.   "5CharmsEquipped": {
  295.     "Desc": "Equip 5 Charms at the same time"
  296.   },
  297.  
  298.   "CarefreeMelody": {
  299.     "Desc": "Obtain Carefree Melody",
  300.     "Excludes": ["NKGrimm", "Brumm", "TMGrimm"]
  301.   },
  302.  
  303.   "CompassSwarm": {
  304.     "Desc": "Obtain Wayward Compass or Gathering Swarm",
  305.     "Score": 1.06
  306.   },
  307.  
  308.   "DWielderShield": {
  309.     "Desc": "Obtain Dream Wielder or Dreamshield",
  310.     "Score": 1.06
  311.   },
  312.  
  313.   "FCharms": {
  314.     "Desc": "Obtain all three Fragile charms, or a Fragile and an Unbreakable charm",
  315.     "Score": 1.00
  316.   },
  317.  
  318.   "FlukenestFury": {
  319.     "Desc": "Obtain Flukenest or Fury of the Fallen",
  320.     "Score": 1.06
  321.   },
  322.  
  323.   "GrubsongElegy": {
  324.     "Desc": "Obtain Grubsong or Grubberfly's Elegy",
  325.     "Score": 1.06
  326.   },
  327.  
  328.   "GWombWeavers": {
  329.     "Desc": "Obtain Glowing Womb or Weaversong",
  330.     "Excludes": ["DamnItGrimmchild"],
  331.     "Score": 1.06
  332.   },
  333.  
  334.   "HeavyBlowSteady": {
  335.     "Desc": "Obtain Heavy Blow or Steady Body",
  336.     "Score": 1.06
  337.   },
  338.  
  339.   "HivebloodShadow": {
  340.     "Desc": "Obtain Hiveblood or Sharp Shadow",
  341.     "Score": 1.06
  342.   },
  343.  
  344.   "LifebloodCharms": {
  345.     "Desc": "Obtain two Lifeblood charms",
  346.     "Score": 1.00
  347.   },
  348.  
  349.   "Longnail": {
  350.     "Desc": "Obtain Longnail or Mark of Pride",
  351.     "Score": 1.06
  352.   },
  353.  
  354.   "QSlashGlory": {
  355.     "Desc": "Obtain Quick Slash or Nailmaster's Glory",
  356.     "Score": 1.06
  357.   },
  358.  
  359.   "QuickDeepFocus": {
  360.     "Desc": "Obtain Quick Focus or Deep Focus",
  361.     "Score": 1.06
  362.   },
  363.  
  364.   "ShamanStoneTwister": {
  365.     "Desc": "Obtain Shaman Stone or Spell Twister",
  366.     "Score": 1.06
  367.   },
  368.  
  369.   "SprintmasterDashmaster": {
  370.     "Desc": "Obtain Sprintmaster or Dashmaster",
  371.     "Score": 1.06
  372.   },
  373.  
  374.   "SoulTools": {
  375.     "Desc": "Obtain Soul Eater or Soul Catcher",
  376.     "Score": 1.06
  377.   },
  378.  
  379.   "ThornsStalwart": {
  380.     "Desc": "Obtain Thorns of Agony or Stalwart Shell",
  381.     "Score": 1.06
  382.   },
  383.  
  384.   "UnnShell": {
  385.     "Desc": "Obtain Shape of Unn or Baldur Shell",
  386.     "Score": 1.06
  387.   },
  388.  
  389.   "LoveKey": {
  390.     "Desc": "Obtain the Love Key",
  391.     "Excludes": ["KEGrubs", "Collector", "Vitruvian"],
  392.     "Score": 1.30
  393.   },
  394.  
  395.   "DDark": {
  396.     "Desc": "Obtain Descending Dark",
  397.     "Score": 1.03
  398.   },
  399.  
  400.   "DNail": {
  401.     "Desc": "Obtain Dream Nail",
  402.     "Score": 0.80
  403.   },
  404.  
  405.   "DGate": {
  406.     "Desc": "Obtain Dream Gate",
  407.     "Score": 0.95
  408.   },
  409.  
  410.   "NailArts": {
  411.     "Desc": "Obtain 2 Nail Arts",
  412.     "Score": 1.00
  413.   },
  414.  
  415.   "Shriek": {
  416.     "Desc": "Obtain Abyss Shriek",
  417.     "Score": 1.03
  418.   },
  419.  
  420.   "SSoul": {
  421.     "Desc": "Obtain Shade Soul",
  422.     "Score": 1.03
  423.   },
  424.  
  425.   "Tear": {
  426.     "Desc": "Obtain Isma's Tear",
  427.     "Excludes": ["UnnSkip", "LoveKeySkip"],
  428.     "Score": 1.18
  429.   },
  430.  
  431.   "VSpirit": {
  432.     "Desc": "Obtain Vengeful Spirit",
  433.     "Score": 0.96
  434.   },
  435.  
  436.   "Wraiths": {
  437.     "Desc": "Obtain Howling Wraiths",
  438.     "Score": 0.96
  439.   },
  440.  
  441.  
  442.   "15Grub": {
  443.     "Desc": "Obtain 20 grubs",
  444.     "Excludes": ["KEGrubs", "35Grub", "Grubfather"]
  445.   },
  446.  
  447.   "2Keys": {
  448.     "Desc": "Use 2 Simple Keys",
  449.     "Excludes": ["Jiji", "Marissa"],
  450.     "Score": 0.89
  451.   },
  452.  
  453.   "3Maps": {
  454.     "Desc": "Have 3 different maps not counting Dirtmouth or Hive",
  455.     "Excludes": ["Cornifer3"]
  456.   },
  457.  
  458.   "MiscObtains": {
  459.     "Desc": "Obtain Collector's Map, World Sense, or Godtuner",
  460.     "Score": 1.30
  461.   },
  462.  
  463.   "Egg": {
  464.     "Desc": "Obtain 1 Arcane Egg",
  465.     "Score": 0.73
  466.   },
  467.  
  468.   "Idols": {
  469.     "Desc": "Obtain 2 King's Idols",
  470.     "Score": 0.66
  471.   },
  472.  
  473.   "Journals": {
  474.     "Desc": "Obtain 5 Wanderer's Journals",
  475.     "Score": 0.51
  476.   },
  477.  
  478.   "Lantern": {
  479.     "Desc": "Obtain Lumafly Lantern",
  480.     "Excludes": ["JoniDarkRoom"],
  481.     "Score": 1.30
  482.   },
  483.  
  484.   "Mask1": {
  485.     "Desc": "Obtain 2 extra masks",
  486.     "Score": 0.43
  487.   },
  488.  
  489.   "Notches": {
  490.     "Desc": "Have 6 Charm Notches total",
  491.     "Score": 0.41
  492.   },
  493.  
  494. /*
  495.   "RancidEggs": {
  496.     "Desc": "Obtain 4 Rancid Eggs",
  497.     "Score": 0.36
  498.   },
  499.   */
  500.  
  501.   "Seals": {
  502.     "Desc": "Obtain 6 Hallownest Seals",
  503.     "Score": 0.44
  504.   },
  505.  
  506.   "SoulVessel": {
  507.     "Desc": "Obtain 1 extra Soul Vessel",
  508.     "Score": 0.61
  509.   },
  510.  
  511.   "TramPass": {
  512.     "Desc": "Ride the tram to all 5 stations",
  513.     "Excludes": ["PinsAll", "KEGrubs"],
  514.     "Score": 1.30
  515.   },
  516.  
  517.   //Checks (Grubs are grouped)
  518.  
  519.   "CHeartCheck": {
  520.     "Desc": "Check Crystal Heart",
  521.     "Excludes": ["CPeaksChest"]
  522.   },
  523.  
  524.   "CPeaksChest": {
  525.     "Desc": "Open the Crystal Peak chest",
  526.     "Excludes": ["CHeartCheck"]
  527.   },
  528.  
  529.   "DeepFocusCheck": {
  530.     "Desc": "Check Deep Focus"
  531.   },
  532.  
  533.   "Dreamers": {
  534.     "Desc": "Get 2 Dreamer's checks (Requires Dream Nail)",
  535.     "Excludes": ["Uumuu", "WK", "Lumafly", "Telescope", "LoreCity", "Trilobite"]
  536.   },
  537.      
  538.   "WaterwaysArenas": {
  539.     "Desc": "Defeat both arenas in Royal Waterways",
  540.     "Excludes": ["TearCheck"]
  541.   },
  542.  
  543.   "QGArena": {
  544.     "Desc": "Defeat both Queen's Gardens arenas (Petra arena and below the stag)"
  545.   },
  546.  
  547.   "GreenpathRoot": {
  548.     "Desc": "Complete the Greenpath Root"
  549.   },
  550.  
  551.   "HallownestCrown": {
  552.     "Desc": "Dream Nail the Radiance statue on Hallownest's Crown",
  553.     "Excludes": ["PaleOreCheck"]
  554.   },
  555.  
  556.   "Fountain": {
  557.     "Desc": "Buy the Basin fountain check",
  558.     "Excludes": ["3000", "4000"]
  559.   },
  560.  
  561.   "FungalCoreElder": {
  562.     "Desc": "Bow to the Fungal Core Elder"
  563.   },
  564.  
  565.   "GWombSkip": {
  566.     "Desc": "Check Glowing Womb"
  567.   },
  568.  
  569.   "HiveMask": {
  570.     "Desc": "Check the Hive Mask Shard",
  571.     "Excludes": ["HiveKnight", "KEGrubs"]
  572.   },
  573.  
  574.   "JoniDarkRoom": {
  575.     "Desc": "Check Joni's Blessing",
  576.     "Excludes": ["Lantern"]
  577.   },
  578.  
  579.   "KEdgeRoot": {
  580.     "Desc": "Complete the Kingdom's Edge Root",
  581.     "Excludes": ["Bardoon"]
  582.   },
  583.  
  584.   "LoveKeySkip": {
  585.     "Desc": "Check Love Key",
  586.     "Excludes": ["Tear", "Caelif", "MossProphet"]
  587.   },
  588.  
  589.   "Nailmasters": {
  590.     "Desc": "Get 2 Nailmaster's checks"
  591.   },
  592.  
  593.   "PaleOreCheck": {
  594.     "Desc": "Get two Pale Ore checks (Grubs/Essence excluded)",
  595.     "Excludes": ["Nosk", "HallownestCrown"]
  596.   },
  597.  
  598.   "SanctuarySkip": {
  599.     "Desc": "Check the journal below Stone Sanctuary"
  600.   },
  601.  
  602.   "Sheo": {
  603.     "Desc": "Get Sheo's check"
  604.   },
  605.  
  606.   "Shops": {
  607.     "Desc": "Visit all 4 shops (Sly, Iselda, Salubra and Leg Eater)",
  608.     "Excludes": ["Cloth"]
  609.   },
  610.  
  611.   "SpellLocations": {
  612.     "Desc": "Check three different spell locations",
  613.     "Excludes": ["HarderVisitMounds"]
  614.   },
  615.  
  616.   "StagVessel": {
  617.     "Desc": "Check the Stag Nest vessel fragment",
  618.     "Excludes": ["StagNestStag"]
  619.   },
  620.  
  621.   "SSoulCheck": {
  622.     "Desc": "Check Shade Soul",
  623.     "Excludes": ["2Warriors"],
  624.     "Score": 1.30
  625.   },
  626.  
  627.   "ShriekCheck": {
  628.     "Desc": "Get the Abyss Shriek check"
  629.   },
  630.  
  631.   "TearCheck": {
  632.     "Desc": "Check Isma's Tear",
  633.     "Excludes": ["WaterwaysArenas"]
  634.   },
  635.  
  636.   "Trees4": {
  637.     "Desc": "Complete 4 full Whispering Roots"
  638.   },
  639.  
  640.   "UnnSkip": {
  641.     "Desc": "Check Shape of Unn",
  642.     "Excludes": ["Tear"]
  643.   },
  644.  
  645.   "VoidHeart": {
  646.     "Desc": "Get the Void Heart check"
  647.   },
  648.  
  649.   "BasinGrubs": {
  650.     "Desc": "Check/Free all grubs in Ancient Basin (2)"
  651.   },
  652.  
  653.   "NotAwfulKEGrubs": {
  654.     "Desc": "Check/Free all grubs in Kingdom's Edge (2) and in Hive (2)"
  655.   },
  656.  
  657.   "CoTGrubs": {
  658.     "Desc": "Check/Free all grubs in City of Tears (5)"
  659.   },
  660.  
  661.   "CrossroadsCanyonGrubs": {
  662.     "Desc": "Check/Free all grubs in Crossroads (5) and in Fog Canyon (1)"
  663.   },
  664.  
  665.   "DeepnestGrubs": {
  666.     "Desc": "Check/Free all grubs in Deepnest (5)"
  667.   },
  668.  
  669.   "FunGreenGrub": {
  670.     "Desc": "Check/Free all grubs in Greenpath (4) and in Fungal Wastes (2)"
  671.   },
  672.  
  673.   "PeaksGrub": {
  674.     "Desc": "Check/Free all grubs in Crystal Peak (7)"
  675.   },
  676.  
  677.   "QueenGrub": {
  678.     "Desc": "Check/Free all grubs in Queen's Gardens (3)"
  679.   },
  680.  
  681.   "WaterGrub": {
  682.     "Desc": "Check/Free all grubs in Waterways (3)"
  683.   },
  684.  
  685.   //Misc.
  686.   "420Rock": {
  687.     "Desc": "Break the 420 georock in Kingdom's Edge",
  688.     "Excludes": ["AncientNailsmith", "GHopper", "HopperHell"]
  689.   },
  690.  
  691.   "AncientNailsmith": {
  692.     "Desc": "Dream Nail the Ancient Nailsmith in K. Edge (Quick Slash corpse)",
  693.     "Excludes": ["420Rock", "GHopper", "HopperHell"]
  694.   },
  695.  
  696.   "800Essence": {
  697.     "Desc": "Collect 500 essence",
  698.     "Excludes": ["Seer"]
  699.   },
  700.  
  701.   "4000": {
  702.     "Desc": "Spend 4000 geo",
  703.     "Excludes": ["Fountain", "3000", "SlyKey", "Salubra"]
  704.   },
  705.  
  706.   "Bank": {
  707.     "Desc": "Have 1500 geo in the bank (you have to leave it there)",
  708.     "Excludes": ["Millibelle"]
  709.   },
  710.  
  711.   "Bardoon": {
  712.     "Desc": "Talk to Bardoon",
  713.     "Excludes": ["KEdgeRoot"]
  714.   },
  715.  
  716.   "BrettaSly": {
  717.     "Desc": "Rescue Bretta and Sly"
  718.   },
  719.  
  720.   "Brumm": {
  721.     "Desc": "Get Brumm's flame",
  722.     "Excludes": ["CarefreeMelody", "TMGrimm", "NKGrimm"]
  723.   },
  724.  
  725.   "ClothQuest": {
  726.     "Desc": "Complete either ending of the Cloth questline",
  727.     "Excludes": ["TLord", "WhiteLady", "Cloth"]
  728.   },
  729.  
  730.   "CityCrest": {
  731.     "Desc": "Use the City Crest OR ride both large elevators in City of Tears",
  732.     "Score": 1.0
  733.   },
  734.  
  735.   "DamnItGrimmchild": {
  736.     "Desc": "Kill 3 Oomas using a minion charm",
  737.     "Excludes": ["GWombWeavers"],
  738.     "Score": 0.87
  739.   },
  740.  
  741.   "DeepnestZote": {
  742.     "Desc": "Rescue Zote in Deepnest",
  743.   },
  744.  
  745.   "DefenderSign": {
  746.     "Desc": "Check/Read the Dung Defender's sign before Isma's Grove"
  747.   },
  748.  
  749.   "DirtmouthElevator": {
  750.     "Desc": "Open the Dirtmouth/Crystal Peak elevator",
  751.     "Excludes": ["Mimics"]
  752.   },
  753.  
  754.   "ElderFlower": {
  755.     "Desc": "Give the Flower to Elderbug"
  756.   },
  757.  
  758.   "Emilitia": {
  759.     "Desc": "Talk to Eternal Emilitia"
  760.   },
  761.  
  762.   "FlukeHermit": {
  763.     "Desc": "Talk to the Fluke Hermit",
  764.     "Excludes": ["Godhome"]
  765.   },
  766.  
  767.   "Godhome": {
  768.     "Desc": "Visit Godhome",
  769.     "Excludes": ["FlukeHermit"]
  770.   },
  771.  
  772.   "GoamGarpede": {
  773.     "Desc": "Check the Goam and Garpede journal entries"
  774.   },
  775.  
  776.   "LegEater": {
  777.     "Desc": "Buy out Leg Eater"
  778.   },
  779.  
  780.   "SlyKey": {
  781.     "Desc": "Buy out Sly after giving him his Key",
  782.     "Excludes": ["Salubra", "4000"],
  783.     "Score": 1.30
  784.   },
  785.  
  786.   "Lifeblood": {
  787.     "Desc": "10 Lifeblood masks at the same time"
  788.   },
  789.  
  790.   "LifebloodRoom": {
  791.     "Desc": "Enter the Lifeblood Core room without wearing any lifeblood charms"
  792.   },
  793.  
  794.   "LoreArchives": {
  795.     "Desc": "Check/Read three lore tablets in Teacher's Archives",
  796.     "Excludes": ["Uumuu", "Lumafly", "Dreamers"]
  797.   },
  798.  
  799.   "LoreCity": {
  800.     "Desc": "Check/Read two lore tablets in City of Tears proper (Entrance and Spire)",
  801.     "Excludes": ["WK", "Telescope", "Dreamers"]
  802.   },
  803.  
  804.   "LoreSanctum": {
  805.     "Desc": "Check/Read both lore tablets in Soul Sanctum",
  806.     "Excludes": ["SoulMaster", "SoulTyrant"]
  807.   },
  808.  
  809.   "Lumafly": {
  810.     "Desc": "Check the Charged Lumafly journal entry",
  811.     "Excludes": ["Uumuu", "LoreArchives", "Dreamers"]
  812.   },
  813.  
  814.   "MaskMaker": {
  815.     "Desc": "Talk to Mask Maker"
  816.   },
  817.  
  818.   "Midwife": {
  819.     "Desc": "Talk to Midwife",
  820.     "Excludes": ["DeepStag", "VisitDistantHive", "MaskMaker"]
  821.   },
  822.  
  823.   "MossProphet": {
  824.     "Desc": "Bow to Moss Prophet, dead or alive",
  825.     "Excludes": ["Caelif", "LoveKeySkip"]
  826.   },
  827.  
  828.   "MrMushroom1": {
  829.     "Desc": "Interact with Mr. Mushroom once (Does not require Spore Shroom)",
  830.     "Score": 0.88
  831.   },
  832.  
  833.   "Nail2": {
  834.     "Desc": "Buy the Nailsmith's second offer",
  835.     "Excludes": ["2Ore", "Nail3TheObtain", "Nail3"],
  836.     "Score": 0.55
  837.   },
  838.  
  839.   "Nail3": {
  840.     "Desc": "Buy the Nailsmith's third offer",
  841.     "Excludes": ["2Ore", "Nail2", "Nail3TheObtain"],
  842.     "Score": 0.78
  843.   },
  844.  
  845.   "NailHut": {
  846.     "Desc": "Use a Nail Art in its vanilla Nailmaster's Hut"
  847.   },
  848.  
  849.   "Ordeal20": {
  850.     "Desc": "Defeat 20 Zotes in the Eternal Ordeal",
  851.     "Types": ["Tiebreaker"],
  852.     "Excludes": ["Godhome", "Radiant"]
  853.   },
  854.  
  855.   "Overcharm": {
  856.     "Desc": "Talk to Salubra while overcharmed"
  857.   },
  858.  
  859.   "PoP": {
  860.     "Desc": "Complete Path of Pain",
  861.     "Types": ["Tiebreaker"],
  862.     "Excludes": ["Kingsmould", "Workshop"]
  863.   },
  864.  
  865.   "Workshop": {
  866.         "Desc": "Bow to the Kingsmold Mold in Palace's Workshop",
  867.         "Types": ["Tiebreaker"],
  868.         "Excludes": ["Kingsmould","PoP"]
  869.     },
  870.  
  871.   "PinsAll": {
  872.     "Desc": "Buy all 8 map pins from Iselda",
  873.     "Excludes": ["Pins", "TramPass"],
  874.     "Score": 1.15
  875.   },
  876.  
  877.   "Revek": {
  878.     "Desc": "Parry Revek with your nail 3 times without dying (Spirits' Glade guard)",
  879.     "Excludes": ["ShrineOfBelievers"]
  880.   },
  881.  
  882.   "Salubra": {
  883.     "Desc": "Buy out Salubra",
  884.     "Excludes": ["SlyKey", "4000"]
  885.   },
  886.  
  887.   "Springs": {
  888.     "Desc": "Take a bath the 4 non-godhome Hot Springs",
  889.     "Excludes": ["Marissa", "SpringSplash"]
  890.   },
  891.  
  892.   "SpringSplash": {
  893.     "Desc": "Splash the NPC in the Colosseum's hot spring"
  894.   },
  895.  
  896.   "Telescope": {
  897.     "Desc": "Look through Lurien's telescope",
  898.     "Excludes": ["WK", "LoreCity", "Dreamers"]
  899.   },
  900.  
  901.   "Tendrils": {
  902.     "Desc": "Check the Void Tendrils journal entry",
  903.     "Excludes": ["VoidPool"]
  904.   },
  905.  
  906.   "Tiso": {
  907.     "Desc": "Bow to Tiso's corpse"
  908.   },
  909.  
  910.   "Trilobite": {
  911.     "Desc": "Slash the Beast's Den Trilobite",
  912.     "Excludes": ["Dreamers"]
  913.   },
  914.  
  915.   "Tuk": {
  916.     "Desc": "Talk to Tuk"
  917.   },
  918.  
  919.   "VisitDistantHive": {
  920.     "Desc": "Visit Distant Village or Hive",
  921.     "Excludes": ["TramPass", "DeepStag", "Midwife"]
  922.  
  923.   },
  924.  
  925.   "VisitMounds": {
  926.     "Desc": "Visit Overgrown Mound or Crystalised Mound (Crystalised requires dive)",
  927.     "Excludes": ["HarderVisitMounds"]
  928.   },
  929.  
  930.   "HarderVisitMounds": {
  931.     "Desc": "Visit all 3 mounds (Crystalised requires dive)",
  932.     "Excludes": ["VisitMounds", "SpellLocations"]
  933.   },
  934.  
  935.   "VisitQueensShell": {
  936.     "Desc": "Visit Queen's Gardens or Cast-Off Shell",
  937.     "Excludes": ["Hornet2", "GardenStag", "GardensArenas"]
  938.   },
  939.  
  940.   "VisitSanctumWaterways": {
  941.     "Desc": "Visit Soul Sanctum or Royal Waterways"
  942.   },
  943.  
  944.   "VisitTower": {
  945.     "Desc": "Visit Tower of Love (Love Key not required)",
  946.     "Excludes": ["Collector", "Vitruvian"]
  947.   },
  948.  
  949.   "VoidPool": {
  950.     "Desc": "Swim in a Void Pool",
  951.     "Excludes": ["Tendrils"]
  952.   },
  953.  
  954.   "WhiteLady": {
  955.     "Desc": "Dream Nail White Lady",
  956.     "Excludes": ["TLord", "ClothQuest"]
  957.   },
  958.  
  959.   "WPShadeSkip": {
  960.     "Desc": "Sit down in Hidden Station",
  961.     "Excludes": ["HiddenStag", "Wings"]
  962.   },
  963.  
  964.   "Grubfather": {
  965.     "Desc": "Get all of the Grubfather's checks",
  966.     "Excludes": ["15Grub"]
  967.   },
  968.  
  969.   "Seer": {
  970.     "Desc": "Get all of the Seer's checks",
  971.     "Excludes": ["800Essence"]
  972.   },
  973.  
  974.   "ElderBaldurs": {
  975.     "Desc": "Kill all 4 Elder Baldurs"
  976.   },
  977.  
  978.   "CityArenas": {
  979.     "Desc": "Defeat both arenas in City of Tears"
  980.   },
  981.  
  982.   "DeepnestRoot": {
  983.     "Desc": "Complete the Deepnest Root",
  984.     "Excludes": ["WeaverSeal"]
  985.   },
  986.  
  987.   "WeaverSeal": {
  988.     "Desc": "Bow to the Seal of Binding in Weavers' Den",
  989.     "Excludes": ["DeepnestRoot"]
  990.   },
  991.  
  992.   "SharpShadowCheck": {
  993.     "Desc": "Check Sharp Shadow"
  994.   },
  995.  
  996.   "Caelif": {
  997.     "Desc": "Dream Nail Caelif & Fera Orthop (Queen's Gardens ghost)",
  998.     "Excludes": ["MossProphet", "LoveKeySkip"]
  999.   },
  1000.  
  1001.   "Vitruvian": {
  1002.     "Desc": "Bow to the Vitruvian Grub (Collector's secret)",
  1003.     "Excludes": ["Collector", "Lovekey", "VisitTower"],
  1004.     "Score": 1.30
  1005.   },
  1006.  
  1007.   "TollBenches": {
  1008.     "Desc": "Sit on all 4 toll benches (Greenpath, City, Gardens, Basin)"
  1009.   },
  1010.  
  1011.   "KeyLocations": {
  1012.     "Desc": "Check 3 Simple Key locations (Sly excluded)",
  1013.     "Excludes": ["PaleLurker"]
  1014.   },
  1015.  
  1016.   "GardensArenas": {
  1017.     "Desc": "Defeat both arenas in Queen's Gardens",
  1018.     "Excludes": ["VisitQueensShell"]
  1019.   },
  1020.  
  1021.   "LiftRoot": {
  1022.     "Desc": "Complete the Broken Elevator Root"
  1023.   },
  1024.  
  1025.   "CanyonNotch": {
  1026.     "Desc": "Check the Fog Canyon Charm Notch"
  1027.   }
  1028. };
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034. //
  1035.  
  1036. //
  1037.  
  1038. //
  1039.  
  1040. //
  1041.  
  1042. //
  1043.  
  1044. //
  1045.  
  1046. //
  1047.  
  1048. // Create Math.seedrandom function and maybe some other stuff idk can't be bothered to understand this obfuscated crap
  1049. (function(j, i, g, m, k, n, o) {
  1050.     function q(b) {
  1051.         var e, f, a = this,
  1052.             c = b.length,
  1053.             d = 0,
  1054.             h = a.i = a.j = a.m = 0;
  1055.         a.S = [];
  1056.         a.c = [];
  1057.         for (c || (b = [c++]); d < g;) a.S[d] = d++;
  1058.         for (d = 0; d < g; d++) e = a.S[d], h = h + e + b[d % c] & g - 1, f = a.S[h], a.S[d] = f, a.S[h] = e;
  1059.         a.g = function(b) {
  1060.             var c = a.S,
  1061.                 d = a.i + 1 & g - 1,
  1062.                 e = c[d],
  1063.                 f = a.j + e & g - 1,
  1064.                 h = c[f];
  1065.             c[d] = h;
  1066.             c[f] = e;
  1067.             for (var i = c[e + h & g - 1]; --b;) d = d + 1 & g - 1, e = c[d], f = f + e & g - 1, h = c[f], c[d] = h, c[f] = e, i = i * g + c[e + h & g - 1];
  1068.             a.i = d;
  1069.             a.j = f;
  1070.             return i
  1071.         };
  1072.         a.g(g)
  1073.     }
  1074.  
  1075.     function p(b, e, f, a, c) {
  1076.         f = [];
  1077.         c = typeof b;
  1078.         if (e && c == "object")
  1079.             for (a in b)
  1080.                 if (a.indexOf("S") < 5) try {
  1081.                     f.push(p(b[a], e - 1))
  1082.                 } catch (d) {}
  1083.                 return f.length ? f : b + (c != "string" ? "\0" : "")
  1084.     }
  1085.  
  1086.     function l(b, e, f, a) {
  1087.         b += "";
  1088.         for (a = f = 0; a < b.length; a++) {
  1089.             var c = e,
  1090.                 d = a & g - 1,
  1091.                 h = (f ^= e[a & g - 1] * 19) + b.charCodeAt(a);
  1092.             c[d] = h & g - 1
  1093.         }
  1094.         b = "";
  1095.         for (a in e) b += String.fromCharCode(e[a]);
  1096.         return b
  1097.     }
  1098.     i.seedrandom = function(b, e) {
  1099.         var f = [],
  1100.             a;
  1101.         b = l(p(e ? [b, j] : arguments.length ? b : [(new Date).getTime(), j, window], 3), f);
  1102.         a = new q(f);
  1103.         l(a.S, j);
  1104.         i.random = function() {
  1105.             for (var c = a.g(m), d = o, b = 0; c < k;) c = (c + b) * g, d *= g, b = a.g(1);
  1106.             for (; c >= n;) c /= 2, d /= 2, b >>>= 1;
  1107.             return (c + b) / d
  1108.         };
  1109.         return b
  1110.     };
  1111.     o = i.pow(g, m);
  1112.     k = i.pow(2, k);
  1113.     n = k * 2;
  1114.     l(i.random(), j)
  1115. })([], Math, 256, 6, 52);
  1116.  
  1117. //synerGen: a bingo generator based on SRLv5 and Hollow Knight's generators.
  1118. bingoGenerator = function(bingoList, opts) {
  1119.  
  1120.     //Create a magic square that the board will be based on
  1121.     function magicSquare() {
  1122.         var A = B = C = D = E = f = g = h = i = j = 0;
  1123.         //this whole thing generates one of the 144 "unique" 5x5 magic squares
  1124.         //for more info visit https://www.grogono.com/magic/5x5pan144.php
  1125.         var table1 = [];
  1126.         table1[0] = [0, 5, 10, 15, 20];
  1127.         table1[1] = [0, 5, 10, 20, 15];
  1128.         table1[2] = [0, 5, 15, 10, 20];
  1129.         table1[3] = [0, 5, 15, 20, 10];
  1130.         table1[4] = [0, 5, 20, 10, 15];
  1131.         table1[5] = [0, 5, 20, 15, 10];
  1132.  
  1133.         var table2 = [];
  1134.         table2[0] = [0, 1, 2, 3, 4];
  1135.         table2[1] = [0, 1, 2, 4, 3];
  1136.         table2[2] = [0, 1, 3, 2, 4];
  1137.         table2[3] = [0, 1, 3, 4, 2];
  1138.         table2[4] = [0, 1, 4, 2, 3];
  1139.         table2[5] = [0, 1, 4, 3, 2];
  1140.         table2[6] = [0, 2, 1, 3, 4];
  1141.         table2[7] = [0, 2, 1, 4, 3];
  1142.         table2[8] = [0, 2, 3, 1, 4];
  1143.         table2[9] = [0, 2, 3, 4, 1];
  1144.         table2[10] = [0, 2, 4, 1, 3];
  1145.         table2[11] = [0, 2, 4, 3, 1];
  1146.         table2[12] = [0, 3, 1, 2, 4];
  1147.         table2[13] = [0, 3, 1, 4, 2];
  1148.         table2[14] = [0, 3, 2, 1, 4];
  1149.         table2[15] = [0, 3, 2, 4, 1];
  1150.         table2[16] = [0, 3, 4, 1, 2];
  1151.         table2[17] = [0, 3, 4, 2, 1];
  1152.         table2[18] = [0, 4, 1, 2, 3];
  1153.         table2[19] = [0, 4, 1, 3, 2];
  1154.         table2[20] = [0, 4, 2, 1, 3];
  1155.         table2[21] = [0, 4, 2, 3, 1];
  1156.         table2[22] = [0, 4, 3, 1, 2];
  1157.         table2[23] = [0, 4, 3, 2, 1];
  1158.  
  1159.         var randTable1 = table1[Math.floor(6 * Math.random())];
  1160.         var randTable2 = table2[Math.floor(24 * Math.random())];
  1161.         A = randTable1[0];
  1162.         B = randTable1[1];
  1163.         C = randTable1[2];
  1164.         D = randTable1[3];
  1165.         E = randTable1[4];
  1166.         f = randTable2[0];
  1167.         g = randTable2[1];
  1168.         h = randTable2[2];
  1169.         i = randTable2[3];
  1170.         j = randTable2[4];
  1171.  
  1172.         var template = [];
  1173.         template[0] = [(A+f+1), (B+i+1), (C+g+1), (D+j+1), (E+h+1)];
  1174.         template[1] = [(D+g+1), (E+j+1), (A+h+1), (B+f+1), (C+i+1)];
  1175.         template[2] = [(B+h+1), (C+f+1), (D+i+1), (E+g+1), (A+j+1)];
  1176.         template[3] = [(E+i+1), (A+g+1), (B+j+1), (C+h+1), (D+f+1)];
  1177.         template[4] = [(C+j+1), (D+h+1), (E+f+1), (A+i+1), (B+g+1)];
  1178.  
  1179.         //here starts the translocations, rotations, and reflections that increase the possible magic squares to 28800
  1180.         var ro = Math.floor(4 * Math.random());
  1181.         var rf = Math.floor(2 * Math.random());
  1182.         var tH = Math.floor(5 * Math.random());
  1183.         var tV = Math.floor(5 * Math.random());
  1184.  
  1185.         template = translocate(template, tH, 0);
  1186.         template = translocate(template, tV, 1);
  1187.         template = rotate(template, ro);
  1188.         if (rf == 1)
  1189.             template.reverse();
  1190.  
  1191.         function inverse(t) { //inverts the table
  1192.             var s = [];
  1193.             for (var j = 0; j < t.length; j++)
  1194.                 s.push([]);
  1195.             for (var j = 0; j < t.length; j++) {
  1196.                 for (var k = 0; k < t.length; k++)
  1197.                     s[j][k] = t[k][j];
  1198.             }
  1199.             return s;
  1200.         }
  1201.  
  1202.         function rotate(t, i) { //rotates ccw i times
  1203.             for (var j = 1; j <= i; j++) {
  1204.                 t = inverse(t);
  1205.                 t.reverse();
  1206.             }
  1207.             return t;
  1208.         }
  1209.  
  1210.         function translocate(t, i, dir) {
  1211.             if (dir == 1) { //shifts down i times
  1212.                 for (j = 1; j <= i; j++) {
  1213.                     var s = t.shift();
  1214.                     t.push(s);
  1215.                 }
  1216.             } else {
  1217.                 for (j = 1; j <= i; j++) { //shifts left i times
  1218.                     for (k = 0; k <= 4; k++) {
  1219.                         var s = t[k].shift();
  1220.                         t[k].push(s);
  1221.                     }
  1222.                 }
  1223.             }
  1224.             return t;
  1225.         }
  1226.  
  1227.         return template;
  1228.     }
  1229.  
  1230.     //Reduces fluff in bingoList object if there's a method to set defaults
  1231.     function preprocessBingoList(bingoList) {
  1232.         for (const key of Object.keys(bingoList)) {
  1233.             bingoList[key].name = key;
  1234.  
  1235.             if (!bingoList[key].hasOwnProperty("Desc"))
  1236.                 bingoList[key].Desc = "#!#" + key + "#!#";
  1237.  
  1238.             if (!bingoList[key].hasOwnProperty("Diff"))
  1239.                 bingoList[key].Diff = 0;
  1240.  
  1241.             if (!bingoList[key].hasOwnProperty("Types"))
  1242.                 bingoList[key].Types = [];
  1243.  
  1244.             if (!bingoList[key].hasOwnProperty("Excludes"))
  1245.                 bingoList[key].Excludes = [];
  1246.  
  1247.             if (!bingoList[key].hasOwnProperty("Synergy"))
  1248.                 bingoList[key].Synergy = [];
  1249.  
  1250.             if (!bingoList[key].hasOwnProperty("Score"))
  1251.                 bingoList[key].Score = 0;
  1252.         }
  1253.     }
  1254.  
  1255.     //Make sure everything exists that should, pull out maxScore and bingoTypes from bingoList
  1256.     var bingoTypes = bingoList.bingoTypes;
  1257.     delete bingoList.bingoTypes;
  1258.     var maxScore = bingoList.maxScore;
  1259.     delete bingoList.maxScore;
  1260.     preprocessBingoList(bingoList);
  1261.  
  1262.     //Separate goals into currently choosable / unchoosable (all goals are choosable at the start)
  1263.     var choosable = [];
  1264.     var unchoosable = [];
  1265.     for (const key of Object.keys(bingoList))
  1266.         choosable.push(key);
  1267.  
  1268.     //Create counts for all types
  1269.     var types = { };
  1270.     for (const key of Object.keys(bingoTypes)) {
  1271.         if (!bingoTypes[key].hasOwnProperty("Max"))
  1272.             bingoTypes[key].Max = 5;
  1273.         types[key] = bingoTypes[key].Max;
  1274.     }
  1275.  
  1276.     //Seed the random
  1277.     seed = Math.seedrandom(opts.seed || Math.ceil(999999 * Math.random()));
  1278.     //console.log(seed);
  1279.  
  1280.     //create a 1-dimensional array from the 2-dimensional matrix magicSquare[][]
  1281.     var square = magicSquare();
  1282.     var bingoBoard = square[0].concat(square[1], square[2], square[3], square[4]);
  1283.  
  1284.     var unchosenDiffs = bingoBoard.slice();
  1285.     var chosenGoals = [];
  1286.     for (var i = 1; i <= 25; i++)
  1287.         chosenGoals.push("");
  1288.  
  1289.     for (var i = 1; i <= 25; i++) {
  1290.  
  1291.         //this is necessary on the edge case that all the exclusions and difficulties wind up eliminating every goal
  1292.         if (choosable.length == 0) {
  1293.             var newChoosableDiffs = [];
  1294.             //add all goals with difficulty one more or less than any of the remaining difficulties back into choosable[]
  1295.             for (var j of unchosenDiffs) {
  1296.                 var plusOne = j + 1;
  1297.                 var minusOne = j - 1;
  1298.                 if (!newChoosableDiffs.includes(plusOne) && plusOne <= 25)
  1299.                     newChoosableDiffs.push(plusOne);
  1300.                 if (!newChoosableDiffs.includes(minusOne) && minusOne >= 1)
  1301.                     newChoosableDiffs.push(minusOne);
  1302.             }
  1303.             for (var k = 0; k < unchoosable.length; k++) {
  1304.                 if (newChoosableDiffs.includes(bingoList[unchoosable[k]].Diff)) {
  1305.                     choosable = choosable.concat(unchoosable.splice(k, 1));
  1306.                     k--;
  1307.                 }
  1308.             }
  1309.             //if choosable[] is still empty, just move everything from unchoosable[] back
  1310.             if (choosable.length == 0) {
  1311.                 while (unchoosable.length > 0)
  1312.                     choosable = choosable.concat(unchoosable.splice(0, 1));
  1313.             }
  1314.         }
  1315.  
  1316.         //finally, choosing goals can begin
  1317.         //Get a random goal, add to chosen
  1318.         var index = Math.floor(Math.random() * choosable.length);
  1319.         var goal = bingoList[choosable[index]];
  1320.         var diff = goal.Diff;
  1321.         var diffIndex = 0;
  1322.         if (goal.Diff == 0) {
  1323.             diffIndex = chosenGoals.indexOf("");
  1324.         } else {
  1325.             diffIndex = bingoBoard.indexOf(diff);
  1326.         //deal with the edge case of the difficulty not matching
  1327.             if (chosenGoals[diffIndex] != "") {
  1328.                 diffIndex = bingoBoard.indexOf(diff + 1);
  1329.                 if (chosenGoals[diffIndex] != "") {
  1330.                     diffIndex = bingoBoard.indexOf(diff - 1);
  1331.                     if (chosenGoals[diffIndex] != "") {
  1332.                         diffIndex = chosenGoals.indexOf("");
  1333.                     }
  1334.                 }
  1335.             }
  1336.         }
  1337.         chosenGoals[diffIndex] = goal.Desc;
  1338.  
  1339.         //remove the chosen goal and any duplicates of it completely
  1340.         for (var j = 0; j < choosable.length; j++) {
  1341.             if (choosable[j] == goal.name) {
  1342.                 choosable.splice(j, 1);
  1343.             }
  1344.         }
  1345.         //remove the goal's difficulty from unchosenDiffs[]
  1346.         var unchosenDiffIndex = unchosenDiffs.indexOf(goal.Diff);
  1347.         if (goal.Diff == 0) {
  1348.             unchosenDiffIndex = unchosenDiffs.indexOf(bingoBoard[diffIndex]);
  1349.         }
  1350.         if (unchosenDiffIndex != -1) {
  1351.             unchosenDiffs.splice(unchosenDiffIndex, 1);
  1352.         }
  1353.  
  1354.         //increment type counters if relevant, also remove other goals of the same type if relevant
  1355.         for (var j = 0; j < goal.Types.length; j++) {
  1356.             types[goal.Types[j]]--;
  1357.             if (types[goal.Types[j]] <= 0) {
  1358.                 for (var k = 0; k < choosable.length; k++) {
  1359.                     for (var l = 0; l < bingoList[choosable[k]].Types.length; l++) {
  1360.                         if (bingoList[choosable[k]].Types[l] === goal.Types[j]) {
  1361.                             unchoosable = unchoosable.concat(choosable.splice(k, 1));
  1362.                             k--;
  1363.                             break;
  1364.                         }
  1365.                     }
  1366.                 }
  1367.             }
  1368.         }
  1369.  
  1370.         //decrement score
  1371.         maxScore = maxScore - goal.Score;
  1372.         //remove all goals of the same difficulty from choosable[], also remove excluded goals and goals with too high score if relevant
  1373.         for (var j = 0; j < choosable.length; j++) {
  1374.             if (bingoList[choosable[j]].Diff == goal.Diff && goal.Diff != 0) {
  1375.                 unchoosable = unchoosable.concat(choosable.splice(j, 1));
  1376.                 j--;
  1377.                 continue;
  1378.             }
  1379.             if (bingoList[choosable[j]].Score > maxScore) {
  1380.                 unchoosable = unchoosable.concat(choosable.splice(j, 1));
  1381.                 j--;
  1382.             }
  1383.             for (var k = 0; k < goal.Excludes.length; k++) {
  1384.                 if (choosable[j] == goal.Excludes[k]) {
  1385.                     unchoosable = unchoosable.concat(choosable.splice(j, 1));
  1386.                     j--;
  1387.                 }
  1388.             }
  1389.         }
  1390.  
  1391.         //duplicate all goals sharing synergies with the chosen goal in choosable[] to make them more likely to be chosen
  1392.         for (var j = 0; j < goal.Synergy.length; j++) {
  1393.             var temp = [];
  1394.             for (var k = 0; k < choosable.length; k++) {
  1395.                 if (goal.Synergy[j] == choosable[k]) //check if the goal itself is a synergy
  1396.                     temp.push(choosable[k]);
  1397.                 for (var l = 0; l < bingoList[choosable[k]].Synergy.length; l++) { //check if it shares a synergy group that isn't an existing goal
  1398.                     if (goal.Synergy[j] == bingoList[choosable[k]].Synergy[l]
  1399.                         && !choosable.includes(bingoList[choosable[k]].Synergy[l])
  1400.                         && !unchoosable.includes(bingoList[choosable[k]].Synergy[l]))
  1401.                             temp.push(choosable[k]);
  1402.                 }
  1403.             }
  1404.             choosable = choosable.concat(temp);
  1405.         }
  1406.     }
  1407.     return chosenGoals;
  1408. }
  1409.  
  1410. var a = bingoGenerator(bingoList, 1);
  1411. var inter_arr = []
  1412. var final_output = ""
  1413. a.forEach(function (item, index) {
  1414.   inter_arr.push("{\"name\": \"" + item + "\"}")
  1415. });
  1416.  
  1417. console.log("[" + inter_arr.join(",") + "]")
Add Comment
Please, Sign In to add comment