Skip to content

Card.RegisterEffect

Source Code | Usage Examples | Card Functions

Registers an effect to a card.

Signature

Card.RegisterEffect(Card c, Effect e, [bool forced = false, int ...]) → Effect|nil

lua
c:RegisterEffect(e,forced,...)

Parameters

  • Card c

    The card to register the effect to. This card becomes the effect's handler.

  • Effect e

    The effect to register to the card.

  • bool forced

    Optional. Defaults to false.

    If set to true, the effect will be registered even if the card currently cannot be affected by the effect.

  • int ...

    Optional.

    Any amount of EffectMarker values to be used to mark the effect.

Returns

  • Effect|nil

    Returns the effect (same as e) if successfully registered, nil otherwise.