Skip to content

aux.SelfDiscardCost

Source Code | Usage Examples | aux Functions

A baseline cost function used for effects that discard the activating card itself as cost, such as You can discard this card; ... (e.g. "Ash Blossom & Joyous Spring").

Signature

aux.SelfDiscardCost(Effect e, int tp, Group eg, int ep, Group ev, Effect re, int r, int rp, int chk) → bool

lua
aux.SelfDiscardCost(e,tp,eg,ep,ev,re,r,rp,chk)

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 if the cost can be paid, and 1 when performing the cost.

Returns

  • bool

    If chk is 0, returns true if the cost can be paid.