aux.SelectUnselectGroup
Source Code | Usage Examples | aux
Functions
Checks if a group contains a subgroup that fulfills a function.
Signature
aux.SelectUnselectGroup(Group g
, Effect e
, int tp
, int minc
, int maxc
, SubgroupCheck|nil rescon
, int chk
) → bool
aux.SelectUnselectGroup(g,e,tp,minc,maxc,rescon,chk)
Parameters
Group
g
The group to check.
Effect
e
The effect that will be passed to
rescon
.int
tp
The player that will be passed to
rescon
.int
minc
The minimum size of the subgroup that must exist in
g
.int
maxc
The maximum number of the subgroup that must exist in
g
.SubgroupCheck|nil
rescon
The function that must return
true
for a matching subgroup.int
chk
Must be
0
when checking.
Returns
Overload
aux.SelectUnselectGroup(Group g
, Effect e
, int tp
, int minc
, int maxc
, SubgroupCheck|nil rescon
, int chk
, int seltp
, int hintmsg
, [SubgroupCheck|nil cancelcon
, SubgroupCheck|nil breakcon
, bool cancelable
]) → Group
aux.SelectUnselectGroup(g,e,tp,minc,maxc,rescon,chk,seltp,hintmsg,cancelcon,breakcon,cancelable)
Makes a player select a subgroup from a group.
Parameters
Group
g
The group to select from.
Effect
e
The effect that will be passed to
rescon
,cancelcon
, andbreakcon
.int
tp
The player that will be passed to
rescon
,cancelcon
, andbreakcon
.int
minc
The minimum number of cards to be selected.
int
maxc
The maximum number of cards to be selected.
SubgroupCheck|nil
rescon
The function that must return
true
for a matching subgroup.int
chk
Must be
1
to perform the selection.int
seltp
The player performing the selection.
int
hintmsg
The HintMessage that will be displayed on selection.
SubgroupCheck|nil
cancelcon
Optional.
A function that allows the player to cancel the selection if it returns
true
for the currently selected cards.SubgroupCheck|nil
breakcon
Optional.
A function that forcibly stops the selection it returns
true
for the currently selected cards.bool
cancelable
Optional.
If
true
, allows the player to cancel the selection even if the conditions are not fulfilled.