Auxiliary.SelectSameCount
Signature
lua
Auxiliary.SelectSameCount(int tp, Group g1, Group g2, [int min], [int max], [Card|Group|nil except]) -> Group|nilDescription
Lets tp build a selection that contains the same number of cards from g1 and g2. except is removed from both groups before selection. The result can be nil if min is greater than the computed max.
Parameters
tpintg1Groupg2Groupminintoptional - default: 1maxintoptional - default: min(#g1, #g2, 127)exceptCard|Group|niloptional
Returns
Group|nil
Source
Utilities/utility.lua:1424
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 5 indexed script(s).
- Search this function in the Script Explorer with
Auxiliary.SelectSameCount.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Melffys' Joyful Surprise | 79561872 | Scripts/c79561872.lua | 1 |
| Dark Rebellion Xyz Dragon of the Four Heavenly Dragons | 90091224 | Scripts/c90091224.lua | 1 |
| Mementomictlan Tecuhtlica - Creation King | 14529511 | Scripts/c14529511.lua | 1 |
| Sky Striker Special Maneuver - Lemnisgate! | 34433770 | Scripts/c34433770.lua | 1 |
| Fire King Sky Burn | 91703676 | Scripts/c91703676.lua | 1 |
Script Examples
Melffys' Joyful Surprise (79561872)
Source: Scripts/c79561872.lua
lua
if chk==0 then return #g1>0 and #g2>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=aux.SelectSameCount(tp,g1,g2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)Dark Rebellion Xyz Dragon of the Four Heavenly Dragons (90091224)
Source: Scripts/c90091224.lua
lua
local g2=g:Filter(Card.IsControler,nil,1-tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=aux.SelectSameCount(tp,g1,g2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)Mementomictlan Tecuhtlica - Creation King (14529511)
Source: Scripts/c14529511.lua
lua
and #g1>0 and #g2>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=aux.SelectSameCount(tp,g1,g2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)