Skip to content

Cost.DetachFromSelf ​

Source Code | Usage Examples | Cost Functions

Creates a baseline cost function used for effects that detach Xyz materials from the activating card as cost, such as You can detach 1 material from this card; ... (e.g. "M-X-Saber Invoker").

aliases: aux.dxmcostgendeprecated, Cost.Detachdeleted

Signature ​

Cost.DetachFromSelf(int|function min, [int|function max = min, function op]) → EffectCost

lua
Cost.DetachFromSelf(min,max,op)

Parameters ​

  • int|function min ​

    The minimum number of materials to detach.

  • int|function max ​

    Optional. Defaults to min.

    The maximum number of materials to detach.

  • function op ​

    Optional.

    Additional handling to apply to the materials after detaching them.

Returns ​

  • EffectCost ​

    The cost function generated based on the given parameters.