Skip to content

Card.CopyEffect ​

Source Code | Usage Examples | Card Functions

Temporarily adds to a card the effects of the card with the specified id, that reset according to the provided reset flags.

Signature ​

Card.CopyEffect(Card c, int code, int reset_flag, [int reset_count = 1]) → int

lua
c:CopyEffect(code,reset_flag,reset_count)

Parameters ​

  • Card c ​

    The card that will receive the copy of the effects.

  • int code ​

    The passcode/ID of the card to copy effects from.

  • int reset_flag ​

    Composite Reset value used to reset the copied effects. If RESET_PHASE is included in the value, RESET_SELF_TURN and RESET_OPPO_TURN are also added automatically.

  • int reset_count ​

    Optional. Defaults to 1.

    The reset count applied with the reset values (e.g. to be used with phase-related resets).

Returns ​

  • int ​

    A unique id representing the instance of the copied effects, usable with RESET_COPY to reset all the effects gained by this function. May also be -1, indicating failure to copy the effects.