Skip to content

aux.DiscardCost

Source Code | Usage Examples | aux Functions

Creates a baseline cost function used for effects that discard a card(s) as cost, such as Discard 1 card; ... (e.g. "Raigeki Break").

Signature

aux.DiscardCost([CardFilter filter = Card.IsDiscardable, bool other = false, int count = 1]) → CostFunction

lua
aux.DiscardCost(filter,other,count)

Parameters

  • CardFilter filter

    Optional. Defaults to Card.IsDiscardable.

    Additional filter to be used for the card(s) that are to be discarded (e.g. Pendulum Monster for "Dragonpit Magician").

  • bool other

    Optional. Defaults to false.

    If set to true, the activating card itself will be excluded from the discard check and the discarding itself. Used for effects such as You can discard 1 other card; ... as well as Spell/Trap activations (e.g. "Twin Twisters").

  • int count

    Optional. Defaults to 1.

    The number of cards to be discarded.

Returns

  • CostFunction

    The cost function generated based on the given parameters.