Card.IsCanBeSpecialSummoned
Signature
Card.IsCanBeSpecialSummoned(Card c, Effect e, int sumtype, int sumplayer, bool nocheck, bool nolimit, [int sumpos], [int toplayer], [int zone]) -> boolDescription
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.
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
endThis is only a legality check. It does not reserve a zone or Summon the card.
Parameters
cCard- Card being checked.eEffect- Effect that would perform the Special Summon.sumtypeint- Summon type value recorded for the Special Summon.sumplayerint- Player treated as performing the Special Summon.nocheckbool- If true, skips c's Summoning-condition check, including EFFECT_SPSUMMON_CONDITION-style restrictions.nolimitbool- If true, skips c's revive-limit or proper-Summon completion check.sumposintoptional - Summon position mask checked by the core; default: POS_FACEUP.toplayerintoptional - Player whose field c would be Summoned to; default: sumplayer.zoneintoptional - 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.
Script Examples
Salamandra with Chain (62091148)
Source: Scripts/c62091148.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
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 endArtmage Non-Finito (74631897)
Source: Scripts/c74631897.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)