Skip to content

Card.IsCanBeSpecialSummoned ​

Signature ​

lua
Card.IsCanBeSpecialSummoned(Card c, Effect e, int sumtype, int sumplayer, bool nocheck, bool nolimit, [int sumpos], [int toplayer], [int zone]) -> bool

Description ​

Checks whether c can be Special Summoned by effect e using sumtype, sumplayer, sumpos, target player, and optional zone. Use the same nocheck, nolimit, position, target player, and zone values that the later Duel.SpecialSummon call will use. If nocheck is true, c's Summoning condition is skipped. If nolimit is true, c's revive limit or proper-Summon limit is skipped. Leave both false unless the card text and local pattern justify bypassing those checks.

How To Use It ​

Use this in activation checks before selecting a monster to Special Summon.

The parameters should match the later Duel.SpecialSummon call as closely as possible: same effect, Summon type, Summon player, target player, position, and zone restrictions.

lua
function s.spfilter(c,e,tp)
    return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
end

This is only a legality check. It does not reserve a zone or Summon the card.

Parameters ​

  • c Card - Card being checked.
  • e Effect - Effect that would perform the Special Summon.
  • sumtype int - Summon type value recorded for the Special Summon.
  • sumplayer int - Player treated as performing the Special Summon.
  • nocheck bool - If true, skips c's Summoning-condition check, including EFFECT_SPSUMMON_CONDITION-style restrictions.
  • nolimit bool - If true, skips c's revive-limit or proper-Summon completion check.
  • sumpos int optional - Summon position mask checked by the core; default: POS_FACEUP.
  • toplayer int optional - Player whose field c would be Summoned to; default: sumplayer.
  • zone int optional - Allowed Monster Zone bitmask; default: 0xff.

Returns ​

  • bool - True if c can be Special Summoned with the supplied parameters.

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3637

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 4172 indexed script(s).
  • Search this function in the Script Explorer with Card.IsCanBeSpecialSummoned.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua1
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua3
Artmage Non-Finito74631897Scripts/c74631897.lua1
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua1
Lady's Dragonmaid48658295Scripts/c48658295.lua2
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua1
Eternal Favorite87532344Scripts/c87532344.lua2
Surprise Fusion35167375Scripts/c35167375.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua4
Spellbook of the Grand Circle11911336Scripts/c11911336.lua1
Ultra Polymerization76647978Scripts/c76647978.lua2
Goyo Emperor59255742Scripts/c59255742.lua2
Accel Synchro Stardust Dragon30983281Scripts/c30983281.lua2
Melffy Playtime Surprise58036097Scripts/c58036097.lua1
Ashtraja Susanoo17020474Scripts/c17020474.lua1
Deftero Enneacraft - "alazoneIA"92171126Scripts/c92171126.lua1
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua1
Yomagna the Fire Phantom17350692Scripts/c17350692.lua1
Fiendsmith's Sequence49867899Scripts/c49867899.lua1
D/D/D Alfred the Divine Sage King11852093Scripts/c11852093.lua1
Mementotlan Fusion66518509Scripts/c66518509.lua1
Meteoroa Drytron24166324Scripts/c24166324.lua1
Favorite HERO Flame Wingman13243124Scripts/c13243124.lua2
Mixousia the Confounder80843006Scripts/c80843006.lua1
...and 4148 more

Script Examples ​

Salamandra with Chain (62091148) ​

Source: Scripts/c62091148.lua

lua
function s.filter2(c,e,tp,m,f,chkf)
	return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WARRIOR+RACE_DRAGON) and (not f or f(c))
		and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
end
function s.spfilter1(c,e,tp)
	if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or not c:IsControler(tp) then return false end
	if c:IsLocation(LOCATION_EXTRA) then return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end
	if c:IsLocation(LOCATION_GRAVE) then return aux.NecroValleyFilter()(c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
function s.filter2(c,e,tp,m,f,chkf)
	return c:IsType(TYPE_FUSION) and (not f or f(c))
		and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)