Card Effect Commons ‐ Can Use Effects - DCGO2/DCGO-Card-Scripts GitHub Wiki
There are different functions for playing this card vs playing any card. You will find all the examples below.
public static bool CanTriggerOnPlay(Hashtable hashtable, CardSource card, Func<SelectCardEffect.Root, bool> rootCondition = null)
- hashtable - information about the card being played
- card - reference to the card being played
- rootCondition - conditions about where the card is being played from
public static bool CanTriggerOnPermanentPlay(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
Func<SelectCardEffect.Root, bool> rootCondition = null)
- hashtable - information about the card being played
- permanentCondition - conditions for the permanent that was played
- rootCondition - conditions about where the card is being played from
There are different functions for digivolving this card vs digivolving any card. You will find all the examples below.
public static bool CanTriggerWhenDigivolving(Hashtable hashtable, CardSource card, Func<SelectCardEffect.Root, bool> rootCondition = null)
- hashtable - information about the card being digivolved
- card - reference to the card being digivolved
- rootCondition - conditions about where the card is being digivolved from
public static bool CanTriggerWhenPermanentDigivolving(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
Func<SelectCardEffect.Root, bool> rootCondition = null)
- hashtable - information about the card being digivolved
- permanentCondition - conditions for the permanent that was digivolved
- rootCondition - conditions about where the card is being digivolved from
There are different functions for playing/digivolving this card vs playing/digivolving any card. You will find all the examples below.
static bool CanTriggerOnEnterField(Hashtable hashtable, CardSource card, bool isEvolution, Func<SelectCardEffect.Root, bool> rootCondition = null)
- hashtable - information about the card entering battle area
- card - reference to the card entering battle area
- isEvolution - is played or is digivolved
- rootCondition - conditions about where the card entering battle area from
static bool CanTriggerOnPermanentEnterField(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
bool isEvolution,
Func<SelectCardEffect.Root, bool> rootCondition = null)
- hashtable - information about the card entering battle area
- permanentCondition - conditions for the card entering battle area
- isEvolution - is played or is digivolved
- rootCondition - conditions about where the card entering battle area from
public static bool CanActivateSuspendCostEffect(CardSource card, bool includeBreeding = false)
public static bool CanActivatePermanentSuspendCostEffect(Permanent permanent, bool includeBreeding = false)
- card - reference to the card attempting to suspend (used on individual card effects to check if they can be suspended themselves)
- permanent - reference to the permanent attempting to be suspended (used when target is not the card using the effect)
- includeBreeding - determines if the breeding area should be included in the functions conditions
public static bool CanUnsuspend(Permanent permanent)
- permanent - reference to the permanent attempting to be unsuspended
public static bool CanUseIgnoreBattle(Hashtable hashtable, CardSource card)
- hashtable - contains information about the security card
- card - reference to the card attempting to use this function
public static bool CanTriggerOnAddDigivolutionCard(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
Func<ICardEffect, bool> cardEffectCondition,
Func<CardSource, bool> cardCondition)
- hashtable - contains information about the card added as a source (card added, card added to, effect used)
- permanentCondition - conditions that need to be met for the permanent of the added source
- cardEffectCondition - conditions that need to be met for the effect used to add the source
- cardCondition - conditions that need to be met for the card that was added
public static bool CanTriggerOnAttack(Hashtable hashtable, CardSource card)
public static bool CanTriggerOnPermanentAttack(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the attack (attacking permanent, defending permanent)
- card - reference to the card itself that is attacking
- permanentConditions - conditions that need to be met for the attacking permanent
public static bool CanTriggerOnAttackTargetSwitch(Hashtable hashtable, CardSource card)
public static bool CanTriggerOnPermanentAttackTargetSwitch(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the attack
- card - reference to the card itself that is attacking and was switched
- permanentConditions - conditions that need to be met for the attacking permanent
public static bool CanTriggerOnHandAdded(Hashtable hashtable, Player player, Func<ICardEffect, bool> cardEffectCondition)
- hashtable - contains information about the card added
- player - player in which the card was added
- cardEffectCondition - conditions for the effect used to add the card
public static bool CanTriggerWhenOwnerCardsReturnToHandFromTrash(Hashtable hashtable, Func<CardSource, bool> cardCondition, CardSource card)
public static bool CanTriggerWhenCardsReturnToHandFromTrash(Hashtable hashtable, Func<CardSource, bool> cardCondition, CardSource card)
- hashtable - information about the card that was added from trash
- cardCondtion - conditions for the card being returned to hand
- card - reference to the card using the effect
public static bool CanTriggerWhenOwnerCardsReturnToLibraryFromTrash(Hashtable hashtable, Func<CardSource, bool> cardCondition, CardSource card)
public static bool CanTriggerWhenCardsReturnToLibraryFromTrash(Hashtable hashtable, Func<CardSource, bool> cardCondition, CardSource card)
- hashtable - information about the card that was added from trash
- cardCondtion - conditions for the card being returned to hand
- card - reference to the card using the effect
There are many differences to on deletion effects based on how they are deleted or what you are checking for. You will find all the examples below.
public static bool CanTriggerOnDeletion(Hashtable hashtable, CardSource card)
- hashtable - contains information about the deletion (what and how)
- card - reference to the card checking for the trigger of the on deletion
public static bool CanTriggerOnPermanentDeleted(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the deletion (what and how)
- permanentCondition - conditions for the permanent that was deleted
public static bool IsByBattle(Hashtable hashtable)
- hashtable - contains information about the deletion (what and how)
public static bool IsByEffect(Hashtable hashtable, Func<ICardEffect, bool> cardEffectCondition)
- hashtable - contains information about the deletion (what and how)
- cardEffectCondition - conditions for the permanent that was deleted
There are many differences to on deletion effects based on how they are deleted or what you are checking for. You will find all the examples below.
public static bool CanActivateOnDeletion(CardSource card)
- card - the card attempting to activate its On Deletion
public static bool CanActivateOnDeletionInherited(Hashtable hashtable, CardSource card)
- hashtable - contains information about the deletion (what and how)
- card - the card attempting to activate its On Deletion
public static bool IsTopCardInTrashOnDeletion(Hashtable hashtable)
- hashtable - contains information about the deletion (what and how)
public static bool IsTopCardSamePermanent(Hashtable hashtable, CardSource card)
- hashtable - contains information about the deletion (what and how)
- card - the card attempting to activate its On Deletion
public static bool CanActivateSelfOnDeletionWithContainingCardName(Hashtable hashtable, string name, CardSource card)
- hashtable - contains information about the deletion (what and how)
- name - name the card must contain to activate its On Deletion
- card - the card attempting to activate its On Deletion
public static bool CanActivateSelfOnDeletionWithContainingTrait(Hashtable hashtable, string name, CardSource card)
- hashtable - contains information about the deletion (what and how)
- name - trait the card must contain to activate its On Deletion
- card - the card attempting to activate its On Deletion
public static bool CanActivateSelfOnDeletionWithCardColors(Hashtable hashtable, Func<List<CardColor>, bool> cardColorCondition, CardSource card)
- hashtable - contains information about the deletion (what and how)
- cardColorCondition - conditions for card color that must be met to activate its On Deletion
- card - the card attempting to activate its On Deletion
public static bool CanActivateSelefOnDeletionWithSaveText(Hashtable hashtable, CardSource card)
- hashtable - contains information about the deletion (what and how)
- card - the card attempting to activate its On Deletion
public static bool CanTriggerOnEndAttack(Hashtable hashtable, CardSource card)
- hashtable - contains information about the Attack
- card - reference to the card attempting to use End of Attack
Can trigger "when permanent moves" effect (moved refers to going from raising to battle area and visa versa)
public static bool CanTriggerOnMove(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the cards being moved
- permanentCondition - conditions for the card being moved
public static bool CanTriggerOnReturnToLibraryBottomDigivolutionCard(Hashtable hashtable, Func<CardSource, bool> cardCondition, CardSource card)
- hashtable - contains information about the cards being moved
- cardCondition - conditions for the card being returned
- card - the specific card being returned
public static bool CanTriggerWhenSelfPermanentSuspends(Hashtable hashtable, CardSource card)
- hashtable - contains information about the cards being suspended
- card - reference to the card being suspended
public static bool CanTriggerWhenPermanentSuspends(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the cards being suspended
- permanentCondition- conditions for the permanent being suspended
public static bool CanTriggerOnTrashBySelfDigiBurst(Hashtable hashtable, CardSource card)
- hashtable - contains information about the cards being trashed
- card - reference to the card being trashed
public static bool CanTriggerOnTrashSelfDigivolutionCard(Hashtable hashtable, Func<ICardEffect, bool> cardEffectCondition, CardSource card)
- hashtable - contains information about the cards being trashed
- cardEffectCondition - conditions for the effect that trashed cards
- card - reference to the card being trashed
public static bool CanTriggerOnTrashDigivolutionCard(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
Func<ICardEffect, bool> cardEffectCondition,
Func<CardSource, bool> cardCondition)
- hashtable - contains information about the cards being trashed
- permanentCondition - conditions for the permanent being trashed from
- cardEffectCondition - conditions for the effect that trashed cards
- cardCondition- conditions for the cards being trashed
public static bool CanTriggerOnTrashSelfHand(Hashtable hashtable, Func<ICardEffect, bool> cardEffectCondition, CardSource card)
- hashtable - contains information about the cards being trashed
- cardEffectCondition - conditions for the effect that trashed cards
- card - reference to the card being trashed
public static bool CanTriggerOnTrashHand(Hashtable hashtable, Func<ICardEffect, bool> cardEffectCondition, Func<CardSource, bool> cardCondition)
- hashtable - contains information about the cards being trashed
- cardEffectCondition - conditions for the effect that trashed cards
- cardCondition- conditions for the cards being trashed
public static bool CanTriggerWhenSelfPermanentUnsuspends(Hashtable hashtable, CardSource card)
- hashtable - contains information about the cards being unsuspended
- card - reference to the card being unsuspended
public static bool CanTriggerWhenPermanentUnsuspends(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the cards being unsuspended
- permanentCondition- conditions for the permanent that is unsuspended
public static bool CanTriggerOptionMainEffect(Hashtable hashtable, CardSource card)
- hashtable - contains information about the cards being played
- card - reference to the card being played
public static bool CanTriggerSecurityEffect(Hashtable hashtable, CardSource card)
- hashtable - contains information about the effect being triggered
- card - reference to the card being triggering the effect
public static bool CanTriggerWhenAddHand(Hashtable hashtable, Func<Player, bool> playerCondition, Func<ICardEffect, bool> cardEffectCondition)
- hashtable - contains information about the card being added
- playerCondition - conditions for the player adding a card
- cardEffectCondition - conditions for the card being added
public static bool CanTriggerWhenAddSecurity(Hashtable hashtable, Func<Player, bool> playerCondition)
- hashtable - contains information about the card being added
- playerCondition - conditions for the player adding a card
public static bool CanTriggerWhenDeleteOpponentDigimon(
Hashtable hashtable,
Func<Permanent, bool> winnerCondition,
Func<Permanent, bool> loserCondition)
- hashtable - contains information about the card being deleted
- winnerCondition - conditions for the card that deleted the other
- loserCondition - conditions for the card that was deleted
public static bool CanTriggerWhenDeleteOpponentDigimonByBattle(
Hashtable hashtable,
Func<Permanent, bool> winnerCondition,
Func<Permanent, bool> loserCondition,
bool isOnlyWinnerSurvive,
Func<Permanent, bool> winnerRealCondition = null,
Func<Permanent, bool> loserRealCondition = null)
- hashtable - contains information about the card being deleted
- winnerCondition - conditions for the card that deleted the other
- loserCondition - conditions for the card that was deleted
- isOnlyWinnerSurvive - whether or not the "winning" digimon can be the only survivor
- winnerRealCondition - conditions for the card that deleted the other, after other effect - OPTIONAL
- loserRealCondition - conditions for the card that was deleted, after other effect - OPTIONAL
There are different functions for trashing your own deck vs a card is trashed from any deck. You will find all the examples below.
public static bool CanTriggerWhenSelfDiscardLibrary(Hashtable hashtable, CardSource card)
- hashtable - contains information about the card being trashed
- card - reference to the card triggering effect
public static bool CanTriggerWhenDiscardLibrary(Hashtable hashtable, Func<CardSource, bool> cardCondition)
- hashtable - contains information about the card being trashed
- cardCondition - condition for the card being trashed
There are different functions for trashing your own security vs a card is trashed from any security. You will find all the examples below.
public static bool CanTriggerOnTrashSelfSecurity(Hashtable hashtable, Func<ICardEffect, bool> cardEffectCondition, CardSource card)
- hashtable - contains information about the card being trashed
- cardEffectCondition - condition for the effect doing the trashing
- card - reference to the card triggering effect
public static bool CanTriggerOnTrashSecurity(Hashtable hashtable, Func<ICardEffect, bool> cardEffectCondition, Func<CardSource, bool> cardCondition)
- hashtable - contains information about the card being trashed
- cardEffectCondition - condition for the effect doing the trashing
- cardCondition - condition for the card being trashed
public static bool CanTriggerWhenLinking(Hashtable hashtable, Func<Permanent, bool> permanentCondition, CardSource card)
- hashtable - contains information about the card being linked
- permanentCondition - condition for the permanent being linked
- card - reference to the card triggering effect
public static bool CanTriggerWhenLinked(Hashtable hashtable, Func<Permanent, bool> permanentCondition, Func<CardSource, bool> sourcecCondition)
- hashtable - contains information about the card being linked
- permanentCondition - condition for the permanent being linked
- sourcecCondition - condition for the card being linked
public static bool CanTriggerWhenLoseSecurity(Hashtable hashtable, Func<Player, bool> playerCondition)
- hashtable - contains information about the card being removed
- playerCondition - condition for the player losing security
There are different functions for digivolving your own digimon vs digivolving any digimon. You will find all the examples below.
public static bool CanTriggerWhenPermanentWouldDigivolveOfCard(Hashtable hashtable, Func<CardSource, bool> cardCondition, CardSource card)
- hashtable - contains information about the card being digivolved
- cardCondition - condition for the card digivolving
- card - reference to the card using effect
public static bool CanTriggerWhenPermanentWouldDigivolve(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
Func<CardSource, bool> cardCondition)
- hashtable - contains information about the card being digivolved
- permanentCondition - condition for the permanent being digivolved
- cardCondition - condition for the card digivolving
public static bool CanTriggerWhenPermanentWouldPlay(Hashtable hashtable, Func<CardSource, bool> cardCondition)
- hashtable - contains information about the card being played
- cardCondition - condition for the card being played
There are different functions for this permanent leaving the battle area vs any permanent. You will find all the examples below.
public static bool CanTriggerWhenRemoveField(Hashtable hashtable, CardSource card)
- hashtable - contains information about the card being removed
- card - reference to the card using effect
public static bool CanTriggerWhenPermanentRemoveField(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
- hashtable - contains information about the card being removed
- permanentCondition - condition for the permanent being removed
public static bool CanTriggerWhenUseDigiBurst(
Hashtable hashtable,
Func<Permanent, bool> permanentCondition,
Func<ICardEffect, bool> cardEffectCondition)
- hashtable - contains information about the Digi-Burst
- permanentCondition - condition for the permanent using Digi-Burst
- cardEffectCondition - condition for the card being trashed
There are different functions for using your option card vs any option card. You will find all the examples below.
public static bool CanTriggerWhenOwnerUseOption(
Hashtable hashtable,
Func<CardSource, bool> cardCondition,
Func<int, bool> constCondition,
CardSource card)
- hashtable - contains information about the card being used
- cardCondition - conditions for the card being used
- constCondition - conditions for the cost of card being used
- card - reference to the card using effect
public static bool CanTriggerWhenOwnerUseOption(
Hashtable hashtable,
Func<CardSource, bool> cardCondition,
Func<int, bool> constCondition,
CardSource card)
- hashtable - contains information about the card being used
- cardCondition - conditions for the card being used
- constCondition - conditions for the cost of card being used
- card - reference to the card using effect