Group.IsExists
Signature
lua
Group.IsExists(Group g, function f, int count, [Card|Group|nil ex], ... any) -> boolDescription
Checks whether at least count cards in g satisfy filter f and are not excluded by ex. Extra arguments after ex are passed to f after the card argument.
How To Use It
Use this to check whether a Group contains enough cards with a property.
lua
if g:IsExists(Card.IsRace,1,nil,RACE_DRAGON) then
-- at least one Dragon is in g
endThe count parameter is useful for requirements such as "2 or more monsters with different names" once the filter captures the condition you need.
Parameters
gGroupffunctioncountintexCard|Group|niloptional...any
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libgroup.cpp:919
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 2279 indexed script(s).
- Search this function in the Script Explorer with
Group.IsExists.
Script Examples
Salamandra with Chain (62091148)
Source: Scripts/c62091148.lua
lua
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
if mat1:IsExists(s.fdfilter,1,nil) then
local cg=mat1:Filter(s.fdfilter,nil)
Duel.ConfirmCards(1-tp,cg)Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.desfilter,1,nil,tp)
end
function s.spfilter1(c,e,tp)Pendulum Evolution (55795155)
Source: Scripts/c55795155.lua
lua
if lscale>rscale then lscale,rscale=rscale,lscale end
local g=Duel.GetFieldGroup(tp,loc,0)
local res=g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
e1:Reset()
return res