PickPhaseImprovements
Utility Library For Pick Phase Shenanigans
| Last updated | 2 weeks ago |
| Total downloads | 77363 |
| Total rating | 1 |
| Categories | Utilities |
| Dependency string | Root-PickPhaseImprovements-0.4.2 |
| Dependants | 10 other packages depend on this package |
This mod requires the following mods to function
Pykess-Pick_N_Cards
Pick more cards! (In a way compatible with other mods!)
Preferred version: 0.2.6Pykess-ModdingUtils
Utilities aimed at making modding easier and more accessible
Preferred version: 0.4.8Root-MorePicksPatch
Allows for the use of the picksToSet parameter of the CardChoice.StartPick function.
Preferred version: 1.0.0README
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<CardInfo,bool> 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<CardInfo, bool> 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<CardInfo, bool> 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<CardInfo, bool> 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<CardInfo[],CardInfo,ValidationResult> 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<CardInfo[], CardInfo[]> 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<CardInfo[]> 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)