Card Effect Factory ‐ Keyword Effects - DCGO2/DCGO-Card-Scripts GitHub Wiki
These functions are used for adding keywords to cards that passively have them. This is used both for keywords that aren't part of any effect (such as the on BT21-052 Examon (X Antibody)) and for keywords that cards gain so long as a particular condition is true (like the inherited on BT20-089 Code Cracker Fang & Hacker Judge). It is not used for keywords gained for a specified duration (like on BT21-014 BurningGreymon), which is instead handled by CardEffectCommons's similar effects. If you're trying to add a keyword to a different card by effect and there's not a non-self function listed here to accomplish it, use AddSkillClass
A list of all relevant functions is below:
AllianceSelfEffect gives a digimon alliance:
public static ICardEffect AllianceSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
ArmorPurgeEffect gives a card Armor Purge:
public static ActivateClass ArmorPurgeEffect(CardSource card)
- card: the card that's granting the effect.
BarrierSelfEffect gives a digimon barrier
public static ICardEffect BarrierSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
BlastDigivolveEffect gives a digimon the ability to blast digivolve. Note that this should not be used for blast DNA digivolution, the function in the next section is for that.
public static ActivateClass BlastDigivolveEffect(CardSource card, Func<bool> condition)
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
BlastDNADigivolveEffect lets a digimon blast DNA digivolve. If you want non-DNA blast instead, use the function above.
public static ActivateClass BlastDNADigivolveEffect(CardSource card, List blastDNAConditions, Func condition)
- card: The card that's granting the effect
- BlastDNACondition: A list of the different cards to blast DNA from, any 2 from this list are a valid pair. The BlastDNACondition objects that this argument expects a list of can be constructed with just the card name as the only argument for each one.
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
BlitzSelfEffect gives a digimon blitz
public static ActivateClass BlitzSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, bool isWhenDigivolving, ICardEffect rootCardEffect = null)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- isWhenDigivolving: Whether this effect triggers when digivolving or not
- rootCardEffect: Tracks the effect that triggered blitz, defaults to null, generally can be left off.
BlockerSelfStaticEffect gives a digimon blocker
public static BlockerClass BlockerSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
If you want to give other cards blocker, instead use BlockerStaticEffect
public static BlockerClass BlockerStaticEffect(Func<Permanent, bool> permanentCondition, bool isInheritedEffect, CardSource card, Func<bool> condition)
- permanentCondition: A function that determines whether or not a given permanent should gain Blocker
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon collision, use CollisionSelfStaticEffect
public static ActivateClass CollisionSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Decode, use DecodeSelfEffect
public static ActivateClass DecodeSelfEffect(CardColor color, int level, bool isInheritedEffect, CardSource card, Func<bool> condition,
ICardEffect rootCardEffect = null)
- color: Defines the colour of digimon that can be played by Decode
- level: Defines the level of digimon that can be played by Decode
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- rootCardEffect: Specifies the effect that's granting Decode, defaults to null and can generally be left off.
To give a digimon Decoy, use DecoySelfEffect
public static ActivateClass DecoySelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, Func<Permanent, bool> permanentCondition, string effectName, string effectDiscription, ICardEffect rootCardEffect = null)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- permanentCondition: The condition a permanent has to pass for this digimon to be able to use Decoy to protect it
- effectName: The name of the effect that's granting Decoy
- effectDiscription: The description of the effect that's granting Decoy
- rootCardEffect: Specifies the effect that's granting Decoy, defaults to null and can generally be left off unless using this with AddSkillClass
To give a digimon Evade, use EvadeSelfEffect
public static ActivateClass EvadeSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Execute, use ExecuteSelfEffect
public static ActivateClass ExecuteSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition,
ICardEffect rootCardEffect = null)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- rootCardEffect: Specifies the effect that's granting Execute, defaults to null and can generally be left off.
To give a digimon Fortitude, use FortitudeSelfEffect
public static ActivateClass FortitudeSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Fragment, use FragmentSelfEffect
public static ActivateClass FragmentSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, int trashValue, string effectName, string effectDiscription, ICardEffect rootCardEffect = null)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- trashValue: How many cards need to be trashed to use Fragment
- effectName: The name of the effect, for example "Fragment <3>"
- effectDiscription: The description of the effect
- rootCardEffect: Specifies the effect that's granting Fragment, defaults to null and can generally be left off.
To give a digimon Iceclad, use IcecladSelfCondition
public static IcecladClass IcecladSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Jamming, use JammingSelfStaticEffect
public static CanNotBeDestroyedByBattleClass JammingSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give jamming to another card, instead use JammingStaticEffect
public static CanNotBeDestroyedByBattleClass JammingStaticEffect(Func<Permanent, bool> permanentCondition, bool isInheritedEffect, CardSource card, Func<bool> condition)
- permanentCondition: A function that determines whether or not a given permanent should gain Jamming
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon the ability to link, use LinkEffect. Note that this doesn't define link costs or what you can link from, use AddSelfLinkConditionStaticEffect or AddLinkConditionStaticEffect for that
public static ActivateClass LinkEffect(CardSource card, Func<bool> condition = null)
- card: The card being linked
- Condition: The condition under which you can link. If it's unconditional, this argument should be null.
To give a digimon Material Save, use MaterialSaveEffect
public static ActivateClass MaterialSaveEffect(CardSource card, int materialSaveCount)
- card: The card that's granting the effect
- materialSaveCount: The number of cards that can be material saved.
To give a digimon Overclock, use OverclockSelfEffect
public static ActivateClass OverclockSelfEffect(string trait, bool isInheritedEffect, CardSource card, Func<bool> condition,
ICardEffect rootCardEffect = null)
- trait: The trait that any digimon deleted to activate Overclock must have
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- rootCardEffect: Specifies the effect that's granting Overclock, defaults to null and can generally be left off.
To give a digimon Partition, use PartitionSelfEffect
public static ActivateClass PartitionSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, List<PartitionCondition> cardSourceConditions)
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- cardSourceConditions: A list of the different cards to partition out. The PartitionCondition objects that this argument expects a list of can be constructed with just a level and CardColor for each, if there's a partition effect that allows a choice of colours to be partitioned out then just add more colours to the constructor call.
To give a digimon Piercing, use PierceSelfEffect
public static ActivateClass PierceSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, bool isLinkedEffect = false)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- isLinkedEffect: True if piercing should only be granted if this card is linked to something, false by default
To give a digimon Progress, use ProgressSelfEffect
public static CanNotAffectedClass ProgressSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Raid, use RaidSelfEffect
public static ActivateClass RaidSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, ICardEffect rootCardEffect = null, bool isLinkedEffect = false)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- rootCardEffect: Specifies the effect that's granting Raid, defaults to null and can generally be left off.
- isLinkedEffect: True if Raid should only be granted if this card is linked to something, false by default
To give a digimon Reboot, use RebootSelfStaticEffect
public static RebootClass RebootSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To instead give other cards Reboot, use RebootStaticEffect
public static RebootClass RebootStaticEffect(Func<Permanent, bool> permanentCondition, bool isInheritedEffect, CardSource card, Func<bool> condition)
- permanentCondition: A function that determines whether or not a given permanent should gain Reboot
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Retaliation, use RetaliationSelfEffect
public static ICardEffect RetaliationSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a digimon Rush, use RushSelfStaticEffect
public static RushClass RushSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To instead give other cards Rush, use RushStaticEffect
public static RushClass RushStaticEffect(Func<Permanent, bool> permanentCondition, bool isInheritedEffect, CardSource card, Func<bool> condition)
- permanentCondition: A function that determines whether or not a given permanent should gain Rush
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
To give a card Save, use SaveEffect
public static ActivateClass SaveEffect(CardSource card)
- card: The card that's granting the effect
To give a card Scapegoat, use ScapegoatSelfEffect
public static ActivateClass ScapegoatSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, string effectName, string effectDiscription, ICardEffect rootCardEffect = null)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- effectName: The name of the effect, for example ""
- effectDiscription: The description of the effect
- rootCardEffect: Specifies the effect that's granting Scapegoat, defaults to null and can generally be left off.
To give a card Vortex, use VortexSelfEffect
public static ActivateClass VortexSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition,
ICardEffect rootCardEffect = null)
- isInheritedEffect: True if the card should grant this effect as an inherit, false if it should only apply with it as the top card
- card: The card that's granting the effect
- condition: The condition under which the effect is gained. If it's unconditional, this argument should be null.
- rootCardEffect: Specifies the effect that's granting Vortex, defaults to null and can generally be left off.