Card Effect Factory ‐ Action Preventing Effects - DCGO2/DCGO-Card-Scripts GitHub Wiki
This is the list of miscellaneous "prevention" effects that stop actions from being carried out. This doesn't contain the effects of similar format that protect digimon, those can be found here.
For a digimon with an effect that prevents itself from attacking, use CanNotAttackSelfStaticEffect
public static CanNotAttackTargetDefendingPermanentClass CanNotAttackSelfStaticEffect(
Func<Permanent, bool> defenderCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- permanentCondition: the condition that a digimon targeted by an attack must meet for attack not to be possible. To make this effect prevent players from being attacked, have this function return true if the target permanent is null, implementing other effects should be self-explanatory
- 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 preventing attack
For a card that instead prevents other cards from attacking, use CanNotAttackStaticEffect
public static CanNotAttackTargetDefendingPermanentClass CanNotAttackStaticEffect(
Func<Permanent, bool> attackerCondition,
Func<Permanent, bool> defenderCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- attackerDescription: the condition that a digimon attempting an attack must meet for attack not to be possible.
- defenderCondition: the condition that a digimon targeted by an attack must meet for attack not to be possible. To make this effect prevent players from being attacked, have this function return true if the target permanent is null, implementing other effects should be self-explanatory
- 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 preventing attack
If a digimon shouldn't be able to be targeted by effects, use CanNotBeAttackedSelfStaticEffect
public static CanNotAttackTargetDefendingPermanentClass CanNotBeAttackedSelfStaticEffect(
Func<Permanent, bool> attackerCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- attackerDescription: the condition that a digimon attempting an attack must meet for it to be unable to attack this card
- 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 preventing attack targeting
To stop a digimon from being blocked, use CanNotBeBlockedStaticSelfEffect
public static CannotBlockClass CanNotBeBlockedStaticSelfEffect(
Func<Permanent, bool> defenderCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- defenderCondition: the condition that a digimon attempting to block must meet for it to be unable to block.
- 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 preventing blocking
For digimon with effects that stop themselves from attacking, use CanNotBlockStaticSelfEffect
public static CannotBlockClass CanNotBlockStaticSelfEffect(
Func<Permanent, bool> attackerCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- attackerDescription: the condition that a digimon attempting an attack must meet for it to be unable to be blocked by this card
- 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 preventing blocking targeting
If the effect should instead prevent other cards from blocking, use CanNotBlockStaticEffect
public static CannotBlockClass CanNotBlockStaticEffect(
Func<Permanent, bool> attackerCondition,
Func<Permanent, bool> defenderCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- attackerDescription: the condition that a digimon attempting an attack must meet for blocking to be disallowed
- defenderCondition: the condition that a digimon attempting to block an attack needs to meet for blocking to be disallowed
- 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 preventing blocking
If a card has an effect to prevent itself from digivolving, use CanNotDigivolveStaticSelfEffect
public static CanNotDigivolveClass CanNotDigivolveStaticSelfEffect(
Func<CardSource, bool> cardCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- cardCondition: A function that determines whether a given card is blocked by this effect from digivolving onto this card
- 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 who is adding this condition
- condition: a function to determine if this digivolution blocking condition should be active
- effectName: The name of the effect preventing digivolution
If a card should stop other cards from being able to digivolve, use CanNotDigivolveStaticEffect
public static CanNotDigivolveClass CanNotDigivolveStaticEffect(
Func<Permanent, bool> permanentCondition,
Func<CardSource, bool> cardCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- permanentCondition: A function for determining which permanents are blocked from digivolving
- cardCondition: A function that determines whether a given card is blocked by this effect from digivolving onto a card
- 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 who is adding this condition
- condition: a function to determine if this digivolution blocking condition should be active
- effectName: The name of the effect preventing digivolution
If a card shouldn't be allowed to suspend, use CantSuspendStaticEffect
public static CanNotSuspendClass CantSuspendStaticEffect(
Func<Permanent, bool> permanentCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- permanentCondition: A function for determining which permanents are blocked from suspending
- 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 who is adding this condition
- condition: a function to determine if this suspending blocking condition should be active
- effectName: The name of the effect preventing suspension
If a card shouldn't be allowed to unsuspend, use CantUnsuspendStaticEffect
public static CanNotSuspendClass CantUnsuspendStaticEffect(
Func<Permanent, bool> permanentCondition,
bool isInheritedEffect,
CardSource card,
Func<bool> condition,
string effectName)
- permanentCondition: A function for determining which permanents are blocked from unsuspending
- 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 who is adding this condition
- condition: a function to determine if this unsuspending blocking condition should be active
- effectName: The name of the effect preventing unsuspension