PickPhaseImprovements
Utility Library For Pick Phase Shenanigans
模組介紹 作者原文
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)
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: