Card Effect Commons - DCGO2/DCGO-Card-Scripts GitHub Wiki
Card Effect Commons contains many commonly used functions and classes for card effects. This class will be the most used class when creating card effects.
Commonly used functions to determine if certain effects can be used. Most of these return True/False if the parameters meet the appropriate conditions to carry out the effect. These effects are used most of the time within the CanUseCondition functions of card effects (or the trigger timing) find them all Here.
These classes/functions are meant to give an effect to a player/permanent (stack). There are commonly given effects or custom effects.
- These are NOT for status changes like DP reduction, Security Attack changes. But for entire effects like "Give opponents digimon '[On Deletion] Lose 1 memory.'".
- These are NOT for lasting effects, these are meant for effects that DO expire.
Find them all Here.
Methods to give a permanent or a player a specific keyword. Each keyword has specific conditions for activation and timing you can find details on each Here.
Methods to determine the Digimon with the lowest/highest DP, Cost, Level for certain effects.
public static bool IsMaxCost(Permanent permanent, Player owner, bool IsDigimonOnly)
- used to check if the permanent has the highest play cost on owners field
- permanent = the permanent (stack) being checked
- owner = the player which board is being checked
- IsDigimonOnly = determines if tamers will be checked as well
public static bool IsMinCost(Permanent permanent, Player owner, bool IsDigimonOnly, Func<Permanent, bool> condition = null)
- used to check if the permanent has the lowest play cost on owners field
- permanent = the permanent (stack) being checked
- owner = the player which board is being checked
- IsDigimonOnly = determines if tamers will be checked as well
- condition = a permanent specific condition, OPTIONAL
public static bool IsMaxDP(Permanent permanent, Player owner, Func<Permanent, bool> permanentCondition)
- used to check if the permanent has the highest DP on owners field
- permanent = the permanent (stack) being checked
- owner = the player which board is being checked
- permanentCondition = a permanent specific condition
public static bool IsMinDP(Permanent permanent, Player owner, Func<Permanent, bool> condition = null)
- used to check if the permanent is the lowest play cost on owners field
- permanent = the permanent (stack) being checked
- owner = the player which board is being checked
- condition = a permanent specific condition, OPTIONAL
public static bool IsMaxLevel(Permanent permanent, Player owner)
public static bool IsMinLevel(Permanent permanent, Player owner)
- used to check if the permanent is the highest/lowest level on owners field
- permanent = the permanent (stack) being checked
- owner = the player which board is being checked
public static bool IsMinLevelBoard(Permanent permanent)
- used to check if the permanent is the lowest level on the field
- permanent = the permanent (stack) being checked
These classes are general functions used in various situations the main ones you may need to know about are:
- GetFromHashtable
- HashtableSetting
- GameContextDetermination
- RevealLibrary
- TrashDigivolutionCards
- TrashLinkCards
Functions used to get certain information from within a given hashtable. Useful within card effects that require detailed information of the effect being performed or the action taken. Most of the time these are only used within other CardEffectCommon functions. Here
Functions to return common hashtable values for various purposes. Usually used by pre existing functions.
- CardEffectHashtable
- PierceCheckHashtableOfPermanent
- OnDeletionCheckHashtableOfPermanent
- WhenPermanentWouldRemoveFieldCheckHashtable
- OnDeletionHashtable
- OnEnterFieldHashtable
- WouldEnterFieldHashtable
- OnPlayCheckHashtableOfCard
- WhenDigivolvingCheckHashtableOfCard
- OptionMainCheckHashtable
- OnPlayCheckHashtableOfPermanent
- WhenDigivolutionCheckHashtableOfPermanent
- OnAttackCheckHashtableOfCard
- OnAttackCheckHashtableOfPermanent
- WhenDigivolutionCardWouldDiscardedCheckHashtable
Helpful functions to determine the current game state including what is on board, trash, hand, Etc. Examples of each can be found Here
Helpful functions to reveal cards from the deck and perform various actions with them (add to hand, trash, place back on top/bottom). Examples of each can be found Here
public static IEnumerator SelectTrashDigivolutionCards(Func<Permanent, bool> permanentCondition, Func<CardSource, bool> cardCondition, int maxCount, bool canNoTrash, bool isFromOnly1Permanent, ICardEffect activateClass, string selectString = "Digimon", Func<Permanent, List<CardSource>, IEnumerator> afterSelectionCoroutine = null)
- used to Select Digivolution Cards to trash
- permanentCondition = a permanent specific condition
- cardCondition = a card specific condition
- maxCount = maximum number of cards to trash
- canNoTrash = can the user decline to trash
- isFromOnly1Permanent = can you select from only 1 permanent
- activateClass = the ICardEffect using this selection
- selectString = text for selection box "Digimon" is default
- afterSelectionCoroutine = ienumerator to call after selection, passing the permanent and list of cards trashed
public static IEnumerator SelectTrashLinkedCards(Func<Permanent, bool> permanentCondition, Func<CardSource, bool> cardCondition, int maxCount, bool canNoTrash, bool isFromOnly1Permanent, ICardEffect activateClass, string selectString = "Digimon", Func<Permanent, List<CardSource>, IEnumerator> afterSelectionCoroutine = null)
- used to Select Linked Cards to trash
- permanentCondition = a permanent specific condition
- cardCondition = a card specific condition
- maxCount = maximum number of cards to trash
- canNoTrash = can the user decline to trash
- isFromOnly1Permanent = can you select from only 1 permanent
- activateClass = the ICardEffect using this selection
- selectString = text for selection box "Digimon" is default
- afterSelectionCoroutine = ienumerator to call after selection, passing the permanent and list of cards trashed