Card Effect Factory ‐ Protection Effects - DCGO2/DCGO-Card-Scripts GitHub Wiki

Protection effects is the overall term for anything that stops a card from being removed. As always, if the protection is just for a duration rather than permanent, use CardEffectCommons instead.

Cannot be returned to deck

If a card in play can't be returned to the deck, use CannotReturnToDeckStaticEffect

public static CannotReturnToLibraryClass CannotReturnToDeckStaticEffect(
    Func<Permanent, bool> permanentCondition,
    Func<ICardEffect, bool> cardEffectCondition,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition,
    string effectName)
  • permanentCondition: the condition that any permanent in play must meet to receive this protection.
  • cardEffectCondition: The condition that an effect that's trying to return this card must meet to be prevented by this effect.
  • 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 granting protection

Cannot be deleted

If a card in play can't be deleted, use CanNotBeDestroyedStaticEffect

public static CanNotBeDestroyedClass CanNotBeDestroyedStaticEffect(
    Func<Permanent, bool> permanentCondition,
    Func<ICardEffect, bool> cardEffectCondition,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition,
    string effectName)
  • permanentCondition: the condition that any permanent in play must meet to receive this protection.
  • cardEffectCondition: The condition that an effect that's trying to delete this card must meet to be prevented by this effect.
  • 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 granting protection

Cannot be deleted by battle

If a digimon can't be deleted in battle, use CanNotBeDestroyedByBattleStaticEffect

public static CanNotBeDestroyedByBattleClass CanNotBeDestroyedByBattleStaticEffect(
    Func<Permanent, Permanent, Permanent, CardSource, bool> canNotBeDestroyedByBattleCondition,
    Func<Permanent, bool> permanentCondition,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition,
    string effectName)
  • canNotBeDestroyedByBattleCondition: the condition that permanents engaged in battle must meet to prevent deletion. The 4 arguments consist of this card's permanent, the attacking permanent, the defending permanent, and the CardSource for the defending card.
  • permanentCondition: the condition that any permanent in play must meet to receive this protection.
  • 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 granting protection

Cannot be deleted by effect

If a card should be protected from being deleted by effect, use CanNotBeDestroyedBySkillStaticEffect

public static CanNotBeDestroyedBySkillClass CanNotBeDestroyedBySkillStaticEffect(
    Func<Permanent, bool> permanentCondition,
    Func<ICardEffect, bool> cardEffectCondition,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition,
    string effectName)
  • permanentCondition: the condition that any permanent in play must meet to receive this protection.
  • cardEffectCondition: The condition that an effect that's trying to delete this card must meet to be prevented by this effect.
  • 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 granting protection

Cannot return to hand

If a card should be prevented from returning to hand, use CannotReturnToHandStaticEffect

public static CannotReturnToHandClass CannotReturnToHandStaticEffect(
    Func<Permanent, bool> permanentCondition,
    Func<ICardEffect, bool> cardEffectCondition,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition,
    string effectName)
  • permanentCondition: the condition that any permanent in play must meet to receive this protection.
  • cardEffectCondition: The condition that an effect that's trying to return this card must meet to be prevented by this effect.
  • 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 granting protection

Immune from DP minus

To stop a digimon from having its DP reduced, use ImmuneFromDPMinusStaticEffect

public static ImmuneFromDPMinusClass ImmuneFromDPMinusStaticEffect(
    Func<Permanent, bool> permanentCondition,
    Func<ICardEffect, bool> cardEffectCondition,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition,
    string effectName)
  • permanentCondition: the condition that any permanent in play must meet to receive this protection.
  • cardEffectCondition: The condition that an effect that's trying to subtract DP must meet to be prevented by this effect.
  • 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 granting protection
⚠️ **GitHub.com Fallback** ⚠️