Skip to content

Cost.Discard ​

Source Code | Usage Examples | Cost 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").

aliases: aux.DiscardCost

Signature ​

Cost.Discard([CardFilter filter = Card.IsDiscardable, bool other = false, int count = 1]) → EffectCost

lua
Cost.Discard(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 ​

  • EffectCost ​

    The cost function generated based on the given parameters.