Skip to content

Group.IsExists ​

Signature ​

lua
Group.IsExists(Group g, function f, int count, [Card|Group|nil ex], ... any) -> bool

Description ​

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
end

The count parameter is useful for requirements such as "2 or more monsters with different names" once the filter captures the condition you need.

Parameters ​

  • g Group
  • f function
  • count int
  • ex Card|Group|nil optional
  • ... 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.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua2
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua2
Pendulum Evolution55795155Scripts/c55795155.lua1
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua2
Lady's Dragonmaid48658295Scripts/c48658295.lua5
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua2
Eternal Favorite87532344Scripts/c87532344.lua1
Surprise Fusion35167375Scripts/c35167375.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua2
Spellbook of the Grand Circle11911336Scripts/c11911336.lua1
Goyo Emperor59255742Scripts/c59255742.lua1
Accel Synchro Stardust Dragon30983281Scripts/c30983281.lua1
Ashtraja Susanoo17020474Scripts/c17020474.lua3
Deftero Enneacraft - "alazoneIA"92171126Scripts/c92171126.lua1
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua2
Yomagna the Fire Phantom17350692Scripts/c17350692.lua3
Fiendsmith's Sequence49867899Scripts/c49867899.lua3
D/D/D Alfred the Divine Sage King11852093Scripts/c11852093.lua2
El Shaddoll Apkallone50907446Scripts/c50907446.lua7
Mementotlan Fusion66518509Scripts/c66518509.lua6
Meteoroa Drytron24166324Scripts/c24166324.lua1
Favorite HERO Flame Wingman13243124Scripts/c13243124.lua3
Performage Cup Tricker6812770Scripts/c6812770.lua3
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
...and 2255 more

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