Card Effect Factory ‐ Digivolution And Similar Effects - DCGO2/DCGO-Card-Scripts GitHub Wiki

This section is for continuous effects that affect digivolving or linking cards.

Add Digivolution Requirement

To give a digimon an alternative digivolution requirement, or to allow for non-triggered digivolution to a card in hand without a standard digivolution requirement existing (for instance, the warp digivolution enabled by BT21-010 Gammamon), use AddSelfDigivolutionRequirementStaticEffect

public static AddDigivolutionRequirementClass AddSelfDigivolutionRequirementStaticEffect(
    Func<Permanent, bool> permanentCondition,
    int digivolutionCost,
    bool ignoreDigivolutionRequirement,
    CardSource card,
    Func<bool> condition,
    string effectName = null,
    Func<CardSource, bool> cardCondition = null)
  • permanentCondition: The condition a permanent must meet to be able to be digivolved from by this method
  • digivolutionCost: the cost of the digivolution
  • ignoreDigivolutionRequirement: Whether or not this digivolution method is considered to be ignoring requirements. For example, the warp digivolution mentioned above would have this argument be true, but it would be false when implementing a digivolution method similar to what x-antibody digimon have.
  • card: The card who is adding this condition
  • condition: a function to determine if this digivolution method is currently valid
  • effectName: The name of the digivolution method, defaults to null, should only set to not-null if this digivolution is enabled by an effect
  • cardCondition: A function that determines whether a card can be digivolved to by this method. The default of null is correct if the card being implemented is the one that's digivolving on top of something, but if you're digivolving to a different card then this should be non-null.

Add link requirement

To add a link requirement to a card, use AddSelfLinkConditionStaticEffect. Note that this alone doesn't let a card link to another card, you need to use LinkEffect for that.

public static AddLinkConditionClass AddSelfLinkConditionStaticEffect(
    Func<Permanent, bool> permanentCondition,
    int linkCost,
    CardSource card,
    Func<bool> condition = null,
    Func<CardSource, bool> cardCondition = null,
    string effectName = null)
  • permanentCondition: The condition a permanent must meet to be able to be linked to by this card
  • linkCost: the cost of linking
  • card: The card who is adding this condition
  • condition: a function to determine if this link method is currently valid.
  • cardCondition: A function that determines whether a card can be linked to to by this method. The default of null is correct if the card being implemented is the one that's linking to something, but if you're linking a different card to something using this method then this should be non-null.
  • effectName: The name of the link method, defaults to null

Change digivolution cost

To change digivolution cost, use ChangeDigivolutionCostStaticEffect

public static ChangeCostClass ChangeDigivolutionCostStaticEffect( T changeValue, Func<Permanent, bool> permanentCondition, Func<CardSource, bool> cardCondition, Func<SelectCardEffect.Root, bool> rootCondition, bool isInheritedEffect, CardSource card, Func condition, bool setFixedCost)

  • changeValue: This should be either an int (if the change is by a constant amount) or a function that returns an int (if the change can vary). A negative value reduces digivolution cost, positive increases it
  • permanentCondition: The condition a permanent must meet for digivolution from it to have its cost changed by this effect
  • cardCondition: A function that determines whether a card being digivolved to can have its cost changed by this effect
  • rootCondition: This is used if the effect cares about where the card you're digivolving to is, if it doesn't matter then it should be set to null, or just given a function that always returns true.
  • 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 cost change is currently valid
  • setFixedCost: If true, this cost modification will replace the digivolution cost instead of modify it.

Changing link max

To alter the max link capacity of a card, use ChangeSelfLinkMaxStaticEffect

public static ChangeLinkMaxClass ChangeSelfLinkMaxStaticEffect<T>(
    T changeValue,
    bool isInheritedEffect,
    CardSource card,
    Func<bool> condition)
  • changeValue: This should be either an int (if the change is by a constant amount) or a function that returns an int (if the change can vary). Passing in a negative value should allow reducing the max number of links a card can 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.
⚠️ **GitHub.com Fallback** ⚠️