Group.FilterCount
Signature
lua
Group.FilterCount(Group g, function f, [Card|Group|nil ex], ... any) -> intDescription
Counts cards in g that satisfy f, excluding ex. Extra arguments after ex are passed to f after the Card argument.
Parameters
gGroupffunctionexCard|Group|niloptional...any
Returns
int
Source
D:\Programs\GitHub\ygopro-core\libgroup.cpp:913
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 439 indexed script(s).
- Search this function in the Script Explorer with
Group.FilterCount.
Script Examples
Ultra Polymerization (76647978)
Source: Scripts/c76647978.lua
lua
local ct=mg:GetCount()
return ct>0 and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE)
and mg:FilterCount(c76647978.mgfilter,nil,e,tp,c,mg)==ct
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
else return false endAshtraja Susanoo (17020474)
Source: Scripts/c17020474.lua
lua
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
while true do
local mct=selg:FilterCount(Card.IsType,nil,TYPE_MONSTER)
local tct=selg:FilterCount(Card.IsType,nil,TYPE_TRAP)
local finish=trueFavorite HERO Flame Wingman (13243124)
Source: Scripts/c13243124.lua
lua
end
function s.ffilter(c,fc,sub,mg,sg)
return not sg or sg:FilterCount(aux.TRUE,c)==0
or (sg:IsExists(Card.IsRace,1,c,c:GetRace())
and not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))