

Provides 2 different managers for the community to use:
This manager provides the various utilities needed for using curses.
Any added curses must utilize RegisterCurse() via CustomCard.BuildCard<MyCurse>(cardInfo => { CurseManager.instance.RegisterCurse(cardInfo); });.
Additionally, they should use the curseCategory in order to not be pickable for players.
The curseInteractionCategory can be used to denote cards that should only show up when a player has a curse.
CurseManager instance { get;}
A static reference of the class for accessibility from within static functions.
CardCategory curseCategory { get;}
The card category for every curse. If not utilized, curses may show up for regular picking.
CardCategory curseInteractionCategory { get;}
The card category for cards that interacted with cursed players. When utilized, cards with it will only show up when a player has a curse.
CardInfo RandomCurse(Player player)
Returns a random curse that is valid for the target player. Respects card rarity.
player the player to get the curse for.var player = PlayerManager.instance.players[0];
var curse = CurseManager.instance.RandomCurse(player);
void CursePlayer(Player player)
void CursePlayer(Player player, Action<CardInfo> callback)
Adds a random valid curse to the targeted player. Respects card rarity.
player the player to curse.callback an optional action to run with the card info of the added curse.var player = PlayerManager.instance.players[0];
CurseManager.instance.CursePlayer(player, (curse) => { ModdingUtils.Utils.CardBarUtils.instance.ShowImmediate(player, curse); });
void RegisterCurse(CardInfo cardInfo)
Registers a card as a curse with the curse manager. The card still needs to apply curseCategory on its own.
cardInfo the card to register.CustomCard.BuildCard<MyCurse>(cardInfo => { CurseManager.instance.RegisterCurse(cardInfo); });
CardInfo[] GetRaw()
Registers a card as a curse with the curse manager. The card still needs to apply curseCategory on its own.
var curse = CurseManager.instance.GetRaw();
bool HasCurse(Player player)
Returns true if a player has a curse.
player the player to check.var player = PlayerManager.instance.players[0];
var cursed = CurseManager.instance.HasCurse(player);
bool IsCurse(CardInfo cardInfo)
Returns true if the card is a registered curse.
cardInfo the card to check.var card = PlayerManager.instance.players[0].data.currentCards[0];
var isCurse = CurseManager.instance.IsCurse(card);
This manager provides the various utilities for rerolling a player's cards.
RerollManager instance { get;}
A static reference of the class for accessibility from within static functions.
CardCategory NoFlip { get;}
The card category for cards that should not be given out after a table flip.
Player flippingPlayer
The player responsible for the tableflip. Used to add the table flip card to the player.
bool tableFlipped
When set to true, a table flip will be initiated at the next end of a player's pick. Initiate the FlipTable() method if you wish to flip before then.
CardInfo tableFlipCard
The table flip card itself. It's automatically given out to the flipping player after a table flip.
List<Player> rerollPlayers
A list of players to reroll when the next reroll is initiated.
bool reroll
When set to true, a reroll will be initiated at the next end of a player's pick. Initiate the Reroll() method if you wish to reroll before then.
CardInfo rerollCard
The reroll card itself. It's automatically given out to the rerolling player after a table flip.
IEnumerator FlipTable(bool addCard = true)
Initiates a table flip for all players.
addCard whether the flipping player (if one exists) shoul be given the Table Flip Card (if it exists).
IEnumerator InitiateRerolls(bool addCard = true)
Initiates any rerolls in the queue.
addCard whether a player should be given the Reroll card after they reroll.
IEnumerator Reroll(Player player, bool addCard = true)
Initiates any rerolls in the queue.
player the player whose cards to rerolladdCard whether the player should be given the Reroll card afterwards.