Duel.GetLocationCountFromEx
Signature
lua
Duel.GetLocationCountFromEx(int player, [int reason_player], [Group|Card|nil targets], [Card|int|nil sc], [int zone]) -> int,intDescription
Returns the usable Monster Zone count for Special Summoning from the Extra Deck, followed by the usable zone mask. reason_player defaults to the current reason player. targets are treated as leaving the field before the count is checked.
Parameters
playerintreason_playerintoptionaltargetsGroup|Card|niloptionalscCard|int|niloptionalzoneintoptional
Returns
int- Number of usable Monster Zones.int- Usable zone mask.
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:4938
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 459 indexed script(s).
- Search this function in the Script Explorer with
Duel.GetLocationCountFromEx.
Script Examples
Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
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
return falseArtmage Non-Finito (74631897)
Source: Scripts/c74631897.lua
lua
return c:IsFusionSetCard(0x1cd) and c:IsLevelAbove(7)
and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
endPendulum Evolution (55795155)
Source: Scripts/c55795155.lua
lua
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local e1=Effect.CreateEffect(c)