Skip to content

Cost.Choice ​

Source Code | Usage Examples | Cost Functions

Creates a baseline cost function that gives the player a choice between different baseline cost functions for the same effect (e.g. "Starliege Lord Galaxion").

Signature ​

Cost.Choice(table ...) → EffectCost

lua
Cost.Choice(...)

Parameters ​

  • table ... ​

    Any amount of choices represented by tables in the form {base cost function, effect description, additional check function} (e.g. {Cost.DetachFromSelf(1),aux.Stringid(id,0),s.extracheck}). The index of the player's choice will be set as the effect's label.

Returns ​

  • EffectCost ​

    The cost function generated based on the given parameters.