PickPhaseImprovements
Utility Library For Pick Phase Shenanigans
About this mod Author’s original text
A work in progress mod for manipulating the Pick Phase
Currently supports giving players additional picks, giving players additional picks with conditions attached (ie: only vanilla cards), and creating shuffle effects both with or without conditions.
Additional picks and shuffle effects can also have an alternate hand-size, either relative to the player's normal hand size, or as a static value.
// Marks a card to trigger a shuffle when taken. handSize and isRelative are for ajusting the handsize of the new pick (default values leave it unchanged). Condition is an optional function that returns true if the card is allowed to show up during the new pick. Count will give multiple new hands.
PickPhaseImprovements.PickManager.RegisterShuffleCard(CardInfo cardInfo, int handSize = 0, bool isRelative = false, Func condition = null, int count = 1)
// Mostly for Internal use, sets up a shuffle effect to take place, will trigger if the player is Currently picking, otherwise will wait till the next time the player is picking.
// See above function for paramiter explination.
PickPhaseImprovements.PickManager.QueueShuffleForPicker(Player picker, int handSize = 0, bool isRelative = false, Func condition = null)
// Sets the player to have (picks) additional picks each round. must be reset manually during card removal.
PickPhaseImprovements.PickManager.GiveAdditionalPicks(this Player picker,int picks = 1)
// Gives an additional pick to the player each round with a condition and/or handsize adjustment. Must be removed with RemoveConditionalPick during card removal.
PickPhaseImprovements.PickManager.GiveConditionalPick(this Player picker, int handSize = 0, bool isRelative = false, Func condition = null)
// Removes a conditional pick, values for handSize, isRelative, and condition must match exactly. Returns true if the removal is successful.
PickPhaseImprovements.PickManager.RemoveConditionalPick(this Player picker, int handSize = 0, bool isRelative = false, Func condition = null)
pickStartCallback and pickEndCallback are optional actions that get called right befor an new hand is generated for that specific shuffle/connditional pick, and right after a card is picked from it (but before it is added to the player)
As of version 0.3.0 adds functionality to control what cards are being spawned in.
// Adds a function that determines if a card can spawn in based on what cards have already spawned in. Return Valid if you have no issues with the card spawning, Invalid if one of the cards in the hand is preventing it from spawning, and CurrentlyInvalid if it is being prevented from spawning but that could change once more cards are added to the hand.
PickPhaseImprovements.PickManager.RegisterDrawValidationFunction(Func func)
// Adds a function that is called after the hand of cards is generated but before the cards are spawned in. It takes the set of cards to spawn and returns a new array to replace it with, allowing for mods to modify which cards are being spawned.
PickPhaseImprovements.PickManager.RegisterHandModificationFunction(Func func, int priority = Priority.Normal)
// Adds a function that is called after the hand of cards is spawned in, the list of cardinfos that were spanwed is provided, Note: these are not the copies that were spawned in, but the master copies from the Cards array and should not be modified.
PickPhaseImprovements.PickManager.RegisterHandFinalizationAction(Action func)
// Used if a card needs custom Instaitaion data for use with IPunInstantiateMagicCallback (If you dont know what that means, you can ignore this function)
PickPhaseImprovements.PickManager.RegisterCustomPhotonData(CardInfo card, params object data)
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: