Created
August 3, 2018 19:45
-
-
Save slacker/f6590eff86ca0cf817404187e5dd2509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$options = @{ | |
'Draft' = 'Draft a custom starting deck of cards.'; | |
'Endless' = 'Winning will return you to Act 1 with the same deck. But beware, the blight eventually consumes all...'; | |
'Blight' = 'Boss chests contain blights after beating Act 3 on Endless.'; | |
'Hoarder' = 'Whenever you add a card to your deck, add two additional copies. You can no longer remove cards from your deck at the Merchant.'; | |
'Insanity' = 'Start with a random deck of 50 cards.'; | |
'Praise Snecko' = 'Replaces your starting relic with Snecko Eye.'; | |
'Shiny' = 'Starting deck is replaced with 1 of every rare card.'; | |
'Specialized' = 'Start with 5 copies of a single rare card'; | |
'Vintage' = 'Normal Enemies drop relics instead of cards.'; | |
'Inception' = 'Replaces your starting relic with Unceasing Top.'; | |
'All Star' = 'Start with 5 colorless cards.'; | |
'Brewmaster' = 'Start with 5 copies of Alchemize and the White Beast Statue.'; | |
'Diverse' = 'Cards are not restricted by your character.'; | |
'Heirloom' = 'Start with 1 Rare relic.'; | |
'Time Dilation' = 'All enemies start with the Slow debuff.'; | |
'My True Form' = 'Start with a copy of Demon Form, Wraith Form, and Echo Form.'; | |
'Binary' = 'Card rewards contain only 2 cards.'; | |
'One Hit Wonder' = 'Start the game with 1 max HP.'; | |
'Cursed Run' = 'Whenever you defeat a Boss, become Cursed. Your starting relic is replaced with Cursed Key, Darkstone Periapt, and Du-Vu Doll.'; | |
'Big Game Hunter' = 'Elite enemies are now swarming the Spire and drop better rewards.'; | |
'Lethality' = 'You start each combat with +3 Strength. All enemies start combat with +3 Strength.'; | |
'Midas' = 'Enemies drop 200% mroe gold, but you cannot upgrade cards at Rest Sites.'; | |
'Night Terrors' = 'Resting at Rest Sites heals 100% of your HP, but costs 5 max HP.'; | |
'Terminal' = 'Whenever you enter a new room, lose 1 Max HP. Start each combat with 5 Plated Armor.'; | |
'Certain Future' = 'The map contains only one path.'; | |
'Starter Deck' = 'Start with Busted Crown and Binary, so enemies no longer drop cards.' | |
} | |
$removed = 'Endless','Blight','One Hit Wonder' | |
$separated = ('Draft','Insanity','Shiny','Specialized'),('Praise Snecko','Inception') | |
Function Verify-NoRemoved ($seed) | |
{ | |
foreach ($option in $seed) { | |
if ($removed.contains($option.name)) { | |
return $false | |
} | |
} | |
return $true | |
} | |
Function Verify-AntiAffinity ($seed) | |
{ | |
foreach ($rule in $separated) { | |
$check = 0 | |
$seed | % { | |
if ($rule.contains($_.name)) { | |
$check ++ | |
} | |
} | |
if ($check -ge 2) {1 | |
return $false | |
} | |
} | |
return $true | |
} | |
do { | |
$seed = $options.getenumerator() | get-random -count 3 | |
} while ( | |
!(Verify-NoRemoved $seed) -or ` | |
!(Verify-AntiAffinity $seed) | |
) | |
return $seed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment