Card.IsLocation
Signature
lua
Card.IsLocation(Card c, int location) -> boolDescription
Checks whether c is currently in location. Cards treated as not being on the field return false for field locations, including during a Summon before it successfully reaches the Monster Zone.
Parameters
cCardlocationint
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3665
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 5851 indexed script(s).
- Search this function in the Script Explorer with
Card.IsLocation.
Script Examples
Salamandra with Chain (62091148)
Source: Scripts/c62091148.lua
lua
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return e:IsCostChecked()
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) endAstrograph 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 falsePendulum Evolution (55795155)
Source: Scripts/c55795155.lua
lua
end
function c55795155.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCode(13331639) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c55795155.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())