Skip to content

EffectTarget ​

subtype of function

A function used to check an effect's activation legality or perform its activation procedure, excluding costs. Usually passed to Effect.SetTarget of activated effects.

Functions that use this type as parameter

Functions that use this type as parameter ​

Functions that return this type

Functions that return this type ​

Signature ​

function(Effect e, int tp, Group eg, int ep, Group ev, Effect re, int r, int rp, int chk, [Card chkc]) → bool

lua
function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)

Parameters ​

  • Effect e ​

    The effect being activated.

  • int tp ​

    The player activating the effect.

  • Group eg ​

    A group of cards associated to the event that prompted the effect activation. The specifics of this group vary depending on the event code.

  • int ep ​

    The player associated to the event that prompted the effect activation.

  • Group ev ​

    A value associated to the event that prompted the effect activation. The specifics of this value vary depending on the event code.

  • Effect re ​

    The effect that caused the event that prompted the effect activation.

  • int r ​

    Composite Reason value of the event that prompted the effect activation.

  • int rp ​

    The player that caused the event that prompted the effect activation.

  • int chk ​

    Must be 0 when checking activation legality, and 1 when performing the activation procedure.

  • Card chkc ​

    Optional.

    The card being checked for target redirection, such as by the effect of Cairngorgon, Antiluminescent Knight.

Returns ​

  • bool ​

    If chk is 0, returns true if the effect can be legally activated.