aux.ToHandOrElse
Source Code | Usage Examples | aux Functions
Makes a player either add cards to the hand or perform an alternative action.
Signature
aux.ToHandOrElse(Card|Group cg, int player, CardFilter check, CardFilter oper, int str, [any ...]) → any
lua
aux.ToHandOrElse(cg,player,check,oper,str,...)Parameters
Card|Group
cgThe cards to be either be added to the hand or perform the alternative action on.
int
playerThe player performing the action.
CardFilter
checkA filter that the card must fulfill to allow the alternative action.
CardFilter
operAn operation to perform on a card, returning
trueif it succeeds.int
strAn integer representing a string to use as prompt option for the alternative action.
any
...Optional.
Optional arguments to be passed to
checkandoper.
Returns
Overload
aux.ToHandOrElse(Card|Group cg, int player) → nil
lua
aux.ToHandOrElse(cg,player)Shortcut if the alternative action is sending to the GY.